pstb

Prefixed Store Byte

pstb RS, D(RA), R

Stores byte using 34-bit offset.

Details

The Prefixed Store Byte instruction stores the byte from the uppermost byte of register RS into memory at an address calculated by adding the contents of registers RA and RB. If RA is zero, the effective address (EA) is set to zero; otherwise, EA is set to the value in RA. The byte from RS is then stored at the address EA.

Pseudocode Operation

if RA = 0 then b ← 0
else           b ← (RA)
EA ← b + (RB)
MEM(EA, 1) ← (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

pstb r3, 0(r4), 0

Encoding

Binary Layout
1
0
2
6
R
8
0
9
D0
14
38
32
RS
38
RA
43
D1
48
 
Format MLS:D-form
Opcode 0x06000000
Extension Prefixed

Operands

  • RS
    Source
  • D
    Offset
  • RA
    Base
  • R
    PC-Rel