Saturday, March 28, 2015

mips assembly


Instructions
all instruction are 32 bit long
instruction fall into three categories:
R-type: register type instructions
I-type: immediate 
J-type: jump instructions

jump

There are the list of instructions we'll look at.
  • beq Branches if the quantities of two registers are equal.
  • bne Branches if the quantities of two registers are NOT equal.
  • bgtz Branches if a quantity in a register is greater than zero (quantity is 32 bit, 2C).
  • bgez Branches if a quantity in a register is greater than or equal to zero (quantity is 32 bit, 2C).
  • bltz Branches if a quantity in a register is less than zero (quantity is 32 bit, 2C).
  • blez Branches if a quantity in a register is less than or equal to zero (quantity is 32 bit, 2C).
  • j Jump to an address
  • jr Jump to an address stored in a register
  • jal Jump to an address, and store the return address in a register.
  • jalr Jump to an address stored in a register, and store the return address in another register.




http://www.cs.umd.edu/class/sum2003/cmsc311/Notes/

No comments: