A good answer might be:
addu $s1,$s0,40000 ==
li $at,40000 # use pseudoinstruction li
addu $s1,$s0,$at # perform 32-bit addition
Subtraction
The li
in the above is itself a pseudoinstruction.
It will be further translated into a basic instruction.
There is also (with the extended assembler)
a subu d,s,x
instruction where the last operand can be a register,
a 16-bit immediate, or a 32-bit immediate.
This instruction translates into the pseudoinstruction
addu d,s,-x
(which is then translated into basic instructions).
The negu d,s
pseudoinstruction calculates the two's complement negation of
register $s and puts it in register $d.
negu d,s # d <-- -s
# (pseudoinstruction)
QUESTION 5:
Fill in the blanks:
negu $v2,$s3 == sub ____,$0,____