I would like to do some byte manipulation using MIPS instruction set.
- I have register
$S0
which has0x8C2E5F1E
and register$S1
which has0x10AC32BB
. - I would like to store the second byte of
$S0
,5F
, into the third byte of$S1
,AC
.
My logic would be to store the byte of register $S0
into another register, shift it to the desired byte. Then I would and register $S1
with 0xFF00FFFF
. Finally, I would just or the two registers.
How does that sound? Is it correct? Any better way?
Any suggestions or solution would be appreciated.