I am new to mips. I have the following instruction:
addi $s3, $0, '\n'
$s3 is now equal to 0x0000000a
Now I want to set $s4 to be 0x1001000a
I am trying this:
lui $s4, 0x1001
ori $s4, $s4, $s3
But I am getting an error on the ori statement. Any help would be appreciated. Thanks.
The i
in ori
means "immediate" - this form of the instruction expects an immediate (literal constant) for the third argument.
In your case you have a register for the third argument, so you just want or
:
lui $s4, 0x1001
or $s4, $s4, $s3
User contributions licensed under CC BY-SA 3.0