185k views
1 vote
Using a 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. Take a screenshot of VisUAL showing the completed execution of your program and paste it into your submission document.
Store a value of #16714400 (decimal value "Sixteen Million Seven Hundred and Fourteen Thousand Four Hundred") in R0 using no more than 2 operations. Take a screenshot of VisUAL showing the completed execution of your program and paste it into your submission document.

1 Answer

7 votes

Final answer:

In ARM assembly, the MOV instruction can be used to store a simple decimal value like 1001 in register R0 directly. For a larger value like 16714400, a combination of MOV and ORR can achieve the required result. Instructions must be provided with the correct number of significant figures and proper units if applicable.

Step-by-step explanation:

To solve the ARM assembly problems using a simulator like VisUAL, you will need to perform a series of instructions to store the specified decimal values in register R0. The key in ARM assembly is to use a combination of operations such as MOV and ORR to achieve this in no more than two steps.

Here's how you can do it for each number: For the value 1001 (decimal), which is 0x3E9 in hexadecimal, you can use the following instructions: MOV R0, #1001 ; loads the decimal value 1001 into R0. Remember, for precision in every operation, you must express your answers to problems with the correct number of significant figures and proper units when applicable.

If you're unable to provide screenshots here, make sure to add them as instructed in your submission document once you've completed the execution of your program in VisUAL.

User Mykola Semenov
by
8.1k points