98 Altera Corporation
32-Bit Instruction Set
STS8s

Store 8-bit Data To Memory (Stack-Addressing Mode)

Operation: bnMem32[align32(%sp+ IMM10)] bnR0 where n = IMM10[1..0]
Assembler Syntax: STS8s [%sp,IMM10],%r0
Example: STS8s [%sp,13],%r0 ; can only be %sp and %r0
Description: Stores one of the four bytes of %r0 to memo ry at the byte-address given by (%sp
plus IMM10). The two least-significant bits of IMM10 selects which byte of %r0 is
stored (byte 3 is most significant).
STS8s may be used in combination with FILL8 to implement a byte-store
operation to a byte-offset from the stack-pointer in a 1Kbyte range. Given a by te
held in bits 7..0 of any register %rX, the following sequence writes this byte to
memory at the byte-offset Y from %sp (%sp presumed to hold a word-aligned
address):
FILL8 %r0,%rX
STS8s [%sp,Y],%r0
Condition Codes: Flags: Unaffected
Instruction Format: i10
Instruction Fields: I MM10 = 10-bit immediate value
1514131211109876543210
011000 IMM10
NVZC
−−−−