Opcode | Syntax | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||
add | add $1 $2 $3 | $1 = $2 + $3 | |||||||||||||||||||||||||||||||||||||||||||||||||||
addi | addi $1 $2 n | $1 = $2 + n | |||||||||||||||||||||||||||||||||||||||||||||||||||
and | and $1 $2 $3 | $1 = $2 & $3 | |||||||||||||||||||||||||||||||||||||||||||||||||||
andi | andi $1 $2 n | $1 = $2 & n | |||||||||||||||||||||||||||||||||||||||||||||||||||
halt | halt | stop the executor (metaistruction) | |||||||||||||||||||||||||||||||||||||||||||||||||||
beq | beq $1 $2 n | PC = PC + n if $1 == $2 | |||||||||||||||||||||||||||||||||||||||||||||||||||
bne | bne $1 $2 n | PC = PC + n if $1 != $2 | |||||||||||||||||||||||||||||||||||||||||||||||||||
div | div $1 $2 | hi = $1 / $2, lo = remainder of $1 / $2 | |||||||||||||||||||||||||||||||||||||||||||||||||||
lui | lui $1 n | write n into high 16 bit of $1 | |||||||||||||||||||||||||||||||||||||||||||||||||||
lw | lw $1 $2 n | load in $1 from address $2+n | |||||||||||||||||||||||||||||||||||||||||||||||||||
j | j t | Program Counter = t | |||||||||||||||||||||||||||||||||||||||||||||||||||
jr | jr $1 | Program Counter = $1 | |||||||||||||||||||||||||||||||||||||||||||||||||||
mfhi | mfhi $1copy the value of hi in $1
| mflo | mflo $1 | copy the value of lo in $1
| mthi | mthi $1 | copy the value of $1 in hi
| mtlo | mtlo $1 | copy the value of $1 in lo
| mult | mult $1 $2 | hi = $1 * $2 (only low 32 bits of multiplication)
| nop | nop | do nothing
| or | or $1 $2 $3 | $1 = $2 | $3
| ori | ori $1 $2 n | $1 = $2 | n
| sll | sll $1 $2 k | $1 = $2 << k
| sllv | sllv $1 $2 $3 | $1 = $2 << $3
| slt | slt $1 $2 $3 | if $2 < $3 then $1 = 1 else $1 = 0
| slti | slti $1 $2 n | if $2<n then $1=1 else $1=0
| srl | srl $1 $2 k | $1 = $2 >> k
| srlv | srlv $1 $2 $3 | $1 = $2 >> $3
| sub | sub $1 $2 $3< | $1 = $2 - $3
| sw | sw $1 $2 n | store $1 at address $2+n
| xor | xor $1 $2 $3 | $1 = $2 ^ $3
| xori | xori $1 $2 n | $1 = $2 ^ n
| |
![]() |
21:19:11 Tue 05-Dec-2000 http://punto.dov.it/~paolo/Xmas/docs/all_istructions_available.php3 |