Question: Write in ARM assembly language to solve the problems: All assembly language programs must run without errors on the simulator Write ARM assembly code to

Write in ARM assembly language to solve the problems:
 Write in ARM assembly language to solve the problems: All assembly

All assembly language programs must run without errors on the simulator Write ARM assembly code to implement the following statements, using 32-bit integer variables. You must: 1. Use branch and link instructions to call the subroutines. 2. Return from the subroutines by using the link register. 3. Put the argument to the abs subroutine in register r8 and put the return value from abs in register r8. 4. Put the return values from a_minus_b and b_minus_a in ro and ri, respectively. 5. Initialize a and b with DCD directives. 6. In addition to returning values in the registers specified in 4., a_minus_b and b_minus a must update the memory locations associated with a and b. 7. Make four different files that test the following combinations of inputs: a. a = -8, b = 9 b. a = -295, b = -45 C. a = 81, b = -243 d. a = 280, b = 8 8. Submit all four files in Canvas This program uses Euclid's algorithm to find the greatest common divisor of two numbers. Because Euclid's algorithm only works on positive numbers, first take the absolute values of both numbers. int abs (int) int b_minus_a (int, int) int a minus_b(int, int) int main() int a = 8; int b --9; a = abs (a); b - abs (b); while (a != b) if (a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!