<<< Example adding three numbers | Index | Pseudo-addressing modes >>> |
Load word from memory:
lw $t1, 4($t2) # $t1 = Memory[$t2+4]
$t1 is the destination register
$t2 contains the base address (pointer to memory)
4 is the offset from the base address
Store word in memory:
sw $t1, 4($t2) # Memory[$t2+4] = $t1
$t1 is the source register
$t2 contains the base address (pointer to memory)
4 is the offset from the base address
<<< Example adding three numbers | Index | Pseudo-addressing modes >>> |