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

Question 12 (16 points) For each ARM i in the tables: nstruction below, answer t

ID: 2293233 • Letter: Q

Question

Question 12 (16 points) For each ARM i in the tables: nstruction below, answer the following questions by filling out the blanks L. What is the addressing mode of the instruction? 2. What is the effective address (EA) of the operand? whatwill be the change to the content of memory or registers after the instruction is executed? Before each instruction is executed, the initial content of memory and processor registers Is shown in Figure 2. Please note that, the instructions are executed individually. The execution of each instruction does not depend on the results of other instructions. address memory OxEE 0x1000.0000 0x1000.0001 0x1000.0000 RO 0x1000.0002 0x0000.0004 R1 0x1000.0003 0x0000.0001R2 0x1000.0004 0x1234.5678 R3 0x1000.0005 0x9ABC.DEFO R4 0x1000.0006 OxDD register OxBB 0x99 0x77 0x55 0x33 0x11 0x1000.0007 Figure 2 LDRSH R3, [R0 , #2)! Q12.1) Addressing Mode EA Value of RO after execution Value of R3 after execution 212.2) LDRSB R4, [RO], R1 Addressing Mode EA Value of RO after execution Value of R4 after execution

Explanation / Answer

Answer :- 1) LDRSH R3, [R0, #2]!
1. R0 = R0 + 2 = 0x1000_0000 + 2 = 0x1000_0002 = EA.
2. R3 = lower 15-bit value at address 0x1000_0002 = 0x00BB. Then from bit 31 to 16 we copy the bit 15 value i.e. zero here, thus final value in register R3 = 0x0000_000BB.
Addressing mode :- register indirect pre-incrementing mode with writeback as ! symbol has been added.

Answer :- 2) LDRSB R4, [R0], R1
1. R4 = signed byte from address in R0, so R4 = 0xFFFFFFBB, note 0xBB has 1 in its MSB hence copying 1 to each bit from 31 to 8.
2. R0 = R0 + R1 = 0x10000000 + 0x00000004 = 0x10000004 = EA.
3. Addressing mode :- register indirect post increment.

Answer :- 3) STR R1, [R0, R2, LSL #1]
1. First R0 = R0 + (R2 x 2) = 0x10000000 + (0x00000001 x 2) = 0x10000003 = EA.
2. Value at memory address 0x10000003 = R1 = 0x00000004. Rest memory addresses are unchanged.
3. Value of R0 after instruction = no change = 0x10000000.
4. Value of R1 after instruction = no change = 0x00000004.
5. value of R2 after instruction = no change = 0x00000001.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote