R3000 instruction set

From Final Fantasy Hacktics Wiki
Revision as of 07:19, 27 July 2014 by Raijinili (talk | contribs) (Created page with "== Intro == == Instructions == ==== add ==== Add Example: add $d,$s,$t ==== addu ==== Add unsigned Example: addu $d,$s,$t ==== sub ==== Subtract Example: sub $d,$...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Intro

Instructions

add

Add

Example:

add $d,$s,$t

addu

Add unsigned

Example:

addu $d,$s,$t

sub

Subtract

Example:

sub $d,$s,$t

subu

Subtract unsigned

Example:

subu $d,$s,$t

addi

Add immediate

Example:

addi $t,$s,C

addiu

Add immediate unsigned

Example:

addiu $t,$s,C

mult

Multiply

Example:

mult $s,$t

multu

Multiply unsigned

Example:

multu $s,$t

div

Divide

Example:

div $s, $t

divu

Divide unsigned

Example:

divu $s, $t

lw

Load word

Example:

lw $t,C($s)

lh

Load halfword

Example:

lh $t,C($s)

lhu

Load halfword unsigned

Example:

lhu $t,C($s)

lb

Load byte

Example:

lb $t,C($s)

lbu

Load byte unsigned

Example:

lbu $t,C($s)

sw

Store word

Example:

sw $t,C($s)

sh

Store half

Example:

sh $t,C($s)

sb

Store byte

Example:

sb $t,C($s)

lui

Load upper immediate

Example:

lui $t,C

mfhi

Move from high

Example:

mfhi $d

mflo

Move from low

Example:

mflo $d

mfcZ

Move from Control Register

Example:

mfcZ $t, $d

mtcZ

Move to Control Register

Example:

mtcZ $t, $d

and

And

Example:

and $d,$s,$t

andi

And immediate

Example:

andi $t,$s,C

or

Or

Example:

or $d,$s,$t

ori

Or immediate

Example:

ori $t,$s,C

xor

Exclusive or

Example:

xor $d,$s,$t

nor

Nor

Example:

nor $d,$s,$t

slt

Set on less than

Example:

slt $d,$s,$t

slti

Set on less than immediate

Example:

slti $t,$s,C

sll

Shift left logical immediate

Example:

sll $d,$t,shamt

srl

Shift right logical immediate

Example:

srl $d,$t,shamt

sra

Shift right arithmetic immediate

Example:

sra $d,$t,shamt

sllv

Shift left logical

Example:

sllv $d,$t,$s

srlv

Shift right logical

Example:

srlv $d,$t,$s

srav

Shift right arithmetic

Example:

srav $d,$t,$s

beq

Branch on equal

Example:

beq $s,$t,C

bne

Branch on not equal

Example:

bne $s,$t,C

j

Jump

Example:

j C

jr

Jump register

Example:

jr $s

jal

Jump and link

Example:

jal C

nop

No operation (do nothing)

Example:

nop