In MAL instructions, registers are identified by a $ symbol followed by a register number in the range 0-31. For example,
add $4, $5, $6adds the contents of registers $5 and $6, with the result in register $4.
The usage of the general registers is governed by certain conventions, as shown below.
Except for the zero value in $0 and the return address stored in $ra ($31), the usage of the general registers is arbitrary. The conventions shown above are implemented by software.
The floating point registers are numbered $f0-$f31. No alternate names are provided for floating point registers.
Floating point numbers can be either 32 bits (single precision) or 64 bits (double precision). For this reason the registers are combined into even/odd pairs. Only the even-numbered registers are used for single precision representations.