This group of instructions is used to save value from any register or its part to memory. There are special commands for byte, wyde, tetra and octa data.
All instructions allows to form memory address by two ways:
- as a sum of the values from two registers (second and third operands);
- as a sum of a register value (second operand) and byte immediate constant (third operand).
So every operation of this group have two modifications.
Such method of address calculation makes possible to realize indirect and index method of data addressing easily.
To understand the difference between signed and unsigned save please read a page about sign and unsigned data and especially about sign extension.
Code | Mnemonic | Name |
Comments |
A0 | STB $X, $Y, $Z |
store byte |
the lowest byte from register X is stored to memory address [$Y + $Z] (integer overflow may occure) |
A1 | STB $X, $Y, Z |
store byte immediate |
the lowest byte from register X is stored to memory address [$Y + Z] (integer overflow may occure) |
A2 | STBU $X, $Y, $Z |
store byte unsigned |
the lowest byte from register X is stored to memory address [$Y + $Z] (no overflow!) |
A3 | STBU $X, $Y, Z |
store byte unsigned immediate |
the lowest byte from register X is stored to memory address [$Y + Z] (no overflow!) |
A4 | STW $X, $Y, $Z |
store wyde |
the lowest 2 bytes from register X is stored to memory address [$Y + $Z] (integer overflow may occure) |
A5 | STW $X, $Y, Z |
store wyde immediate |
the lowest 2 bytes from register X is stored to memory address [$Y + Z] (integer overflow may occure) |
A6 | STWU $X, $Y, $Z |
store wyde unsign |
the lowest 2 bytes from register X is stored to memory address [$Y + $Z] (no overflow!) |
A7 | STWU $X, $Y, Z |
store wyde unsign immediate |
the lowest 2 bytes from register X is stored to memory address [$Y + Z] (no overflow!) |
A8 | STT $X, $Y, $Z |
store tetra |
the lowest 4 bytes from register X is stored to memory address [$Y + $Z] (integer overflow may occure) |
A9 | STT $X, $Y, Z |
store tetra immediate |
the lowest 4 bytes from register X is stored to memory address [$Y + Z] (integer overflow may occure) |
AA | STTU $X, $Y, $Z |
store tetra unsigned |
the lowest 4 bytes from register X is stored to memory address [$Y + $Z] (no overflow!) |
AB | STTU $X, $Y, Z |
store tetra unsigned immediate |
the lowest 4 bytes from register X is stored to memory address [$Y + Z] (no overflow!) |
AC | STO $X, $Y, $Z |
store octa |
register X is stored to address [$Y + $Z] (no overflow!) |
AD | STO $X, $Y, Z |
store octa immediate |
register X is stored to address [$Y + Z] (no overflow!) |
AE | STOU $X, $Y, $Z |
store octa unsign |
(identical to AC instruction) |
AF | STOU $X, $Y, Z |
store octa unsign immediate |
(identical to AD instruction) |
The instruction STHT and STCO will be described later.

Examples:
- instruction STBU $1, $2, $3 does the following: calculate memory address as a sum of the values from registers 2 and 3; writes the lowest byte from register 1 to memory; operation is always successful
- the only difference of instruction STBU $1, $2, 3 and the previous one is in memory address calculation: here it is a sum of the registers 2 value and constant 3; note that if the last operand is 0, instruction just write to memory address stored in register 2
- instruction STB $1, $2, $3 have some specific in comparison with the first example: an integer exception may occure if register 1 value is not in byte range between -128 and 127 excludely: for example if $1 = FFFF FFFF FFFF FFFF, operation will be successful, but for 0000 FFFF FFFF FFFF - not
- instruction STT $1, $2, $3 stores 4 lower bytes to memory address [$2 + $3] from register 1
Related topics:
"MMIX basics" page