Question: Problem 3 : Write an ARMv 7 assembly program that reverses a given list of integer value which terminates with 0 . Requirements: 1 .
Problem : Write an ARMv assembly program that reverses a given list of integer value which terminates with
Requirements:
Assume the input list is stored in memory, starting at a label called inputlist
The list is terminated by at the end.
The program must reverse the list in memory eg will become
Use a loop and LDRSTR command to accomplish the reversal.
Assume the only zero value will be end of this list
Example:
Define the list in the memory like this: inputlist dcd
After this line the memory should look something like this:
Extra Credit Assignment
After reversing this above list the memory should something like below:
Here you can see that the list list is now reserved in the same memory location for the inputlist.
Hints:
Use a register to point to the start of the string.
Use another register to find the end of the string by searching for the
Swap characters from the start and end of the string until they meet in the middle.
Ensure your program exits cleanly after completing the reversal.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
