206k views
2 votes
After resetting/clearing your ARM simulator, write a series of ARM instructions to solve the following two problems. Look at the values in both Dec and Bin views. Store a value of #1001 (decimal value "One Thousand and One") in R0 using no more than 2 operations. Store a value of #16714400 (decimal value "Sixteen Million Seven Hundred and Fourteen Thousand Four Hundred") in R0 using no more than 2 operations.

User Mafrosis
by
7.2k points

1 Answer

1 vote

Final answer:

To store specific values in R0 using the ARM instruction set, you would use MOV for the first number and a combination of MOV and ORR for the larger number, applying appropriate immediate values and masking or shifting bits as needed.

Step-by-step explanation:

To store a value of #1001 (decimal 'One Thousand and One') in R0 using no more than two operations in an ARM simulator, you can use the following instructions:

  • MOV R0, #1001

To store a value of #16714400 (decimal 'Sixteen Million Seven Hundred and Fourteen Thousand Four Hundred') in R0 using no more than two operations, a possible set of instructions could be:

  • MOV R0, #(16714400 AND 0xFFFF)
  • ORR R0, R0, #(16714400 LSL 16)

User PJ King
by
7.4k points