03 STS

Updated 4 Oct 2026

STS

  • The STS (Store Direct to Data Space) instruction is used to store (copy) a value from a General Purpose Register (Rr) into a specific data-memory address (K).

Instruction Syntax

STS K, Rr
  • Rr: The source register that holds the value to be stored.
    • Can be any of the 32 general-purpose registers: R0–R31.
  • K: The data-memory address where the value from Rr will be stored.
    • Must be within the range:
      • Hexadecimal: $0000 - $08FF
      • (Values outside this range will result in an error.)

Examples

Valid Instruction:
STS 0x25A, R22
  • R22: R22 is valid since it is within the register range R0–R31.
  • K: 0x25A is within the valid data-memory address range $0000–$08FF.
  • Effect: Store the value from R22 into the data address 0x25A.