I want to load a word from memory ,at adress of x +4 into a registry but the following code doesn't work. What am I doing wrong?
.data
x: .word 10
y: .word 11
z: .word 12
.text
main:
lw $t0, x
lw $t1, 4($t0)
li $v0, 10
syscall
I get an Unaligned Adress in inst/data fetch error and Exception Occured