Question: ARM Assembly - In this exercise you are going to use the system stack, and the PUSH and POP directives to copy an array and
ARM Assembly -
In this exercise you are going to use the system stack, and the PUSH and POP directives to copy an array and reverse the elements. You are given starter code in PA4-2.s that sets up the two arrays, inArray, and outArray. inArray has data in it set up using DCD, and outArray is an empty array of 10 words created using the FILL directive. Heres what your code needs to do:
Create a loop that reads each value inArray and pushes it on the stack using PUSH.
Create a second loop that reads each value of the stack using POP and puts each value into subsequent locations in outArray.
If you do this correctly, you will see the values in outArray will be in the opposite order from the inArray. There are many ways to accomplish this, but for this exercise you must use the the system stack with PUSH and POP to perform the reversal.

Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
