MIPS Instruction Set

Since registers are referred to by almost all instructions, there must be a convention to map register names into numbers. MIPS software follows the following convention for procedure calling in allocating its 32 registers:

Figure 2.1 MIPS register conventions.

Figure 2.1 MIPS register conventions.

Instruction for Making Decisions

MIPS assembly language includes two decision-making instructions, similar to an if statement with a go to.

The test for equality or inequality is probably the most popular test, but sometimes it is useful to see if a variable is less than another variable, like a for loop.

It also includes an instruction just for the procedures: it jumps to an address and simultaneously saves the address of the following instruction in register $ra — return address.

Untitled