Microcontrollers Lab 4


  1. Using the stack pointer to store and access an array.
  2. Understanding how to implement a FOR loop in assembly language.


NOTE: You MUST use TI Code Composer Studio 7.4 Program to do this lab!

I believe you have to have a Board called MSP432 to be able to do this lab.

  1. Store the following number sequence on stack: {10, 8, 5, 4, 6, 3, 2, 0}
  2. Write a FOR loop to implement bubble sort on the array above and arrangeit in ascending order.
  3. Remember to pop out all values from the stack at the end of your code.


  1. Provide a screenshot of your code.
  2. Show the stack contents (screenshot of memory map) after storing the values mentioned above.
  3. Show the stack contents (screenshot of memory map) after the 3rd, 5th, 7th loop execution.
  4. Show the final sorted stack contents (screenshot of memory map)

Each of the above deliverables must be supported by a screenshot and crisp explanation. The lab report must be completed in the template


Last Updated on September 26, 2018 by EssayPro