how to implement swap in mips code example
Example: swap address in mips
lui $t0, 0x8008 ;$t0 = 0x80080000
lw $t1 0($t0) ;load (0x80080000) in $t1
lw $t2 4($t0) ;load (0x80080004) in $t2
sw $t1 4($t0) ;store $t1 in 0x80080004
sw $t2 0($t0) ;store $t2 in 0x80080000