pstb
Prefixed Store Byte
Stores byte using 34-bit offset.
Details
Stores the least significant byte of the source register to memory using a 34-bit signed offset (split between prefix and suffix). The effective address is computed from a base register or the program counter (determined by the R bit), supporting both absolute and PC-relative addressing modes. This is a two-instruction prefixed store with no condition register or status flag effects.
Pseudocode Operation
D ← EXTS(D0 || D1)
EA ← if R = 0 then (if RA = 0 then 0 else GPR[RA]) + D else CIA + D
MEM(EA, 1) ← GPR[RS][56:63]
Programming Note
The pstb instruction is useful for storing a single byte from the uppermost byte of a register into memory. Ensure that RA and RB are correctly set to avoid incorrect memory addresses. This instruction operates at user privilege level and can raise an exception if the EA is out of bounds or if there's a protection fault.
Example
Encoding
Operands
-
RS
Source -
D
Offset -
RA
Base -
R
PC-Rel