stb
Store Byte
stb RS, D(RA)
Stores the low 8 bits of a register to memory.
Details
The stb instruction stores the lower byte (bits 56-63) of the contents of register RS into the memory location specified by the effective address EA, which is calculated as (RA|0) + EXTS64(D).
Pseudocode Operation
if 'stb' then
EA ← (RA|0) + EXTS64(D)
MEM(EA, 1) ← (RS)56:63
Programming Note
The stb instruction is commonly used to store a single byte from a register into memory. Ensure that the destination address is properly aligned for optimal performance and avoid accessing invalid or protected memory regions to prevent exceptions.
Example
stb r3, 0(r4)
Encoding
Binary Layout
10
0
DS
6
RS
11
RA
16
SIMM[15:0]
Operands
-
RS
Source Register -
D
Displacement -
RA
Base Register -
EA
Effective Address