Complete the code to use the immediate addressing mode to load the value 5 into register R0.
MOV R0, #[1]
The immediate addressing mode uses a '#' followed by a constant value. Here, #5 loads the value 5 directly into R0.
Complete the code to move the value from register R1 into register R0 using register addressing mode.
MOV R0, [1]Register addressing mode uses the register name directly without '#' or brackets. Here, R1 moves the value from R1 to R0.
Fix the error in the code to correctly load the value from memory at an offset of 4 from register R2 into R0.
LDR R0, [R2[1]]In ARM offset addressing, the offset is specified with a comma and a '#' before the number inside the brackets. So, [R2, #4] correctly accesses memory at R2 plus 4 bytes.
Fill both blanks to create a store instruction that saves the value in R0 to the memory address at R3 plus an immediate offset of 8.
STR R0, [[1][2]]
The correct syntax for offset addressing in store instructions is STR R0, [R3, #8]. The comma separates the base register and the immediate offset.
Fill all three blanks to create a load instruction that loads into R1 the value from the memory address at R4 plus an offset stored in register R5.
LDR [1], [[2], [3]]
This uses register offset addressing mode. The instruction LDR R1, [R4, R5] loads the value from the address computed by adding R4 and R5 into R1.
