is it this instruction is correct Using SPIM ?
add $t1,$zero,-1
after run program the $t1 is fill by "ffffffff"
You want addi instead of add
addi
add
addi $t1, $zero, -1
The addi instruction sign-extends the 16-bit immediate, so it should place 0xffffffff in $t1.
0xffffffff
$t1
You want
addiinstead ofaddThe
addiinstruction sign-extends the 16-bit immediate, so it should place0xffffffffin$t1.