yes, that works.
if you wish to set immediates, you can use
addiu $reg, $reg, 5
remember that the immediate on addiu is signed, so if you give a negative
number, it will be sign extended to remain negative.
if you wish to just load in 16 bits to the lower portion of a register,
you can use:
ori $reg, $reg, 5
this will zero-extend the immediate.
Post by Aaron StaleyPost by Jeremy Daniel Tzengquestion is the subject thanks.
In xspim, set value
in MIPS, add $reg, $reg, $zero