Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write ARM assembly code to implement the following C statements, assuming all variables are 32-bit integers. Note: Use ARM v7 Legacy version. All assembly language

Write ARM assembly code to implement the following C statements, assuming all variables are 32-bit integers.

Note: Use ARM v7 Legacy version.

image text in transcribed

All assembly language programs must run without errors on the simulator Write ARM assembly code to implement the following C statements, assuming all variables are 32-bit integers. You must: 1. 2. 3. 4. 5. 6. 7. 8. Use a branch and link instruction to call the subroutine Return from the subroutine by using the link register Put the argument to the subroutine (num1 or num2) in register r8 Put the return value from the subroutine (x) in register r9 Initialize num1 and num2 with DCD directives Make space for result with a SPACE directive and then write the result to that location. You may use registers for a and b Make four different files that test the following combinations of inputs: b. num1--8, num2- 9 d. num1--8, num2=-9 9. Submit all four files in Canvas This program multiplies two numbers by repeated addition First, take absolute values of both numbers, do multiplication, then adjust result as necessary. Taking the absolute value is done as a subroutine. int abs (int) int main () int numl-8; int num2-9; int result; int a, b aabs (numl); b-abs (num2); result -0 for (i -0; i

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

Question

Question in Computer Science Please Write Correct answer 1 6 .

Answered: 1 week ago

Question

Create a complex 3 D object using at least two primitive shapes.

Answered: 1 week ago