go to previous page   go to home page   hear noise   go to next page


addu $s1,$s0,40000 

Translates into:

li   $at,40000    # use pseudoinstruction li
addu $s1,$s0,$at  # perform 32-bit addition


The li in the above is itself a pseudoinstruction. The extended assembler will translate it, also, into basic instructions.

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)


Translate this instruction

negu $v2,$s3 

into a basic instruction:

sub  ,$0,