Question: ARM Assembly Program- Write an assembly program that takes two integer values, startval and endval where startval
ARM Assembly Program- Write an assembly program that takes two integer values, startval and endval where startval <= endval, and sums all the integers between those two values. For example, if startval = 1, and endval = 5, the program would compute 1 + 2 + 3 + 4 + 5, which is 15. Some code is provided in PA3-1.s to get you started. This code creates the two integers, startval and endval, loads startval into R1 and endval into R2. Your program should use a loop to add up all the integers between those two numbers. The final result should be in R0. You must use a loop to do this. Hint: Think about how you might write such a loop in C++ or Java, and convert that into ARM assembly.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
