Excalibur electronic A-MNL-NIOSPROG-01.1 DJ Equipment User Manual


 
98 Altera Corporation
32-Bit Instruction Set
STS8s
Store 8-bit Data To Memory (Stack-Addressing Mode)
Operation:
bn
Mem32[align32(%sp + IMM10)]
bn
R0 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 memory 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 byte
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: IMM10 = 10-bit immediate value
1514131211109876543210
011000 IMM10
NVZC
−−−−