REGISTERS

Registers are what we call variables in a high level language. A MISP processor has 32 register named from 0 to 31 and distributed in the following way.

zero       : It always contains the value 0
 
at, k0, k1 : Reserved for the assembler (at) and the operating
             system (k0, k1).
 
v0, v1     : v0 is used to set the value for a system call, and also it
             can be use in addition to v1 to store values returned from a
             system call or other procedure call
 
a0 - a3    : Stores the values of the arguments
             passed to a system or procedure call.
 
t0 - t9    : Temporary registers whose values are not preserved after a
             function call.
 
s1 - s7    : Temporary registers whose values are preserved during a
             function call
 
sp         : Stack pointer. It points to the “top” of the stack.
 
fp         : Frame pointer. It is used to save the value of a frame in a
             function call.
 
gp         : Global pointer. It points into the middle of a 64k block of
             memory in the heap that holds constant and global variables.
 
ra         : Return address. It is use to save and restore the address
             before and after a function call.