Question: Question 2 ( 1 0 points ) ARM 7 does not have any division instruction. Yet, you still can implement division by utilizing ASR. Basically,

Question 2(10 points)
ARM7 does not have any division instruction. Yet, you still can implement division by utilizing ASR. Basically, if you want to divide the content of a register by 7, you multiply it by 9362, and then you shift the result using ASR\#16. The effective result is \(9362\div 2^{16}=9362\div 65536\approx 1/7\), which is divided by 7.
Write 3 ARM assembly instructions to divide the content of RO by 7 and store the result in R1.
Use R2 as a working register.
Test your code by putting these 3 instructions in a program. Assign various values to RO.
What are the 3 instructions you used?
To facilitate automatic marking,
- Use CAPITAL letters ONLY--except 0x, make it a small letter.
- When writing an instruction, you write it in two words:
* The first word is the instruction mnemonic, and
* The second word is all operands together. Do NOT leave ANY spaces between operands.
The 1st instruction is:
The 2nd instruction is:
The 3 rd instruction is: The 1st instruction is:
The 2nd instruction is:
The 3rd instruction is:
Question 2 ( 1 0 points ) ARM 7 does not have any

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!