Question: Write an ARM assembly program that performs the following tasks: 1 . Load two integers ( e . g . , 1 2 and 5

Write an ARM assembly program that performs the following tasks:
1. Load two integers (e.g.,12 and 5) into registers r0 and r1.
2. Use a conditional branch instruction to compare the two numbers.
3. If the first number is greater, store the difference in register r2.
4. If the second number is greater or equal, store the sum in register r2.
5. Output the result stored in r2 using an appropriate ARM instruction for terminating the
program.
Instructions:
Write the program in proper ARM assembly syntax.
Use ARM v7 ISA instructions only.
Comment each instruction to explain what it does

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 Programming Questions!