Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(Help me with the quetions below) 1. Which instruction would you use to load reg

ID: 3803297 • Letter: #

Question

(Help me with the quetions below)

1. Which instruction would you use to load register R4 with 20000008 hexadecimal?

LDR R4, #20000008

LDR R4, =0x20000008

None of the above.

2. Assume that R0 contains the hexadecimal value 20000000. If you want to store the 32 bit value in R5 at the address 20000008, without changing the value in R0, which instruction would you use?

STR R5, [R0]

STR [R0], R5

STR R0, [R5, #8]

None of the above.

3.If you were translating an if..else statement from pseudocode to ARM assembly language, and the logical operator used in the if was ==, which branch would you use following the CMP instruction?

BEQ

BLO

BNE

None of the above.

4. If you were translating an if..else statement from pseudocode to ARM assembly language, and the logical operator used in the if is >, which branch would you use following the CMP instruction?

BNE

BEQ

BLO

BLS

5. Which of the following are advantage of programming in assembly language? (Select all that apply.)

easy to learn compared to high-level languages

compact programs

highly portable

fastest code

direct hardware access

Explanation / Answer

Answer:

1)Correct Answer is Option A i.e LDR R4, #20000008

2)Correct Answer is Option B i.e STR [R0], R5

3)Correct Answer is Option A i.e BEQ

4)Correct Answer is Option C i.e BLO

5)Correct Answer is Option C and Option E i.e highly portable and direct hardware access.