.data
x: .word -2
y: .word x
z: .byte 0
.set a, 3
.set b, '4'
.set c, 's'
.text
set z, %r1
set c, %r4
stb %r4, [%r1]
set y, %r2
lduh [%r2+2], %r3
ld [%r3], %r1
st %r1, [%r2]
set a, %r4
st %r4, [%r3]
Assuming that the .data section is mapped to start at address 0x1800 in
memory at run time,
a) Give the contents of registers %r1-%r4, and
b) Give the contents of memory from address 0x1800 up to, but not including, 0x1809, after this code is executed.
Explain it