Skip to content

STR (Store Register)

Stores a value from a register into memory.

These instructions store 32-bit values from a register into memory.

0x41 STR [rIdx], rSrc

Uses the address stored in rIdx to store a 32-bit value from rSrc into memory.

ArgumentDescription
rIdxThe register containing the memory address to write to.
rSrcThe source register where the data to be stored is.

0x42 STR [rIdx + imm16], rSrc

Adds a signed 16-bit offset to rIdx to form an effective address, then stores the 32-bit value from rSrc at that location in memory.

ArgumentDescription
rIdxThe base register containing the memory address.
imm16A signed offset (−32,768 to 32,767) added to the base address.
rSrcThe source register where the data to be stored is.

0x43 STR [rIdx + rOff * imm4], rSrc

Computes an effective address as rIdx + (rOff × imm4), then stores the 32-bit value in rDst at that memory location.

ArgumentDescription
rIdxThe base register containing the memory address.
rOffThe register whose value is scaled and added to the base address.
imm4A 4-bit scale factor (0–15) multiplied with rOff to form the offset.
rSrcThe source register where the data to be stored is.

0x44 STR [imm32], rSrc

Stores the 32-bit value from rSrc into the fixed memory address specified by imm32.

ArgumentDescription
imm32The 32-bit absolute address to write to.
rSrcThe source register where the data to be stored is.