Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions