[prev] 21 [next]

Exercise 6: MIPS Addressing

Consider the following memory contents and MIPS instructions

Label Address      Content         Instructions
x:    0x10010000   0x00010101    * la $t0, x
y:    0x10010004   0x10010000    * lw $t0, x
z:    0x10010008   0x0000002A      la $s0, z
eol:  0x1001000C   0x0000000A    * lw $t0, ($s0)
                                   li $s0, 8
                                 * lw $t0, y($s0)
                                   lw $s0, y
                                 * lw $t0  ($s0)
                                   li $s0, 4
                                 * lw $t0, x+4($s0)

What will be (a) the computed address, (b) the value of the destination register ($t0 or $s0) after each of the starred MIPS instructions is executed?