SPRUI30H November 2015 – May 2024 DRA745 , DRA746 , DRA750 , DRA756
Store Word to Memory with a SP-Relative 6-Bit Unsigned Constant Offset
STW dst, *+SP[ucst6]
Functional unit = D
16 bit
15 | 13 | 12 | 7 | 6 | 0 |
dst | ucst6 | 1 | 1 | 1 | 1 | 0 | 1 | 0 |
3 | 6 | opcode |
The entire content (word) of dst is stored to memory (effective address). The memory address is formed from the stack pointer (SP) and an offset (number of words) that is a 6-bit unsigned constant (ucst6). If an offset is not given, the assembler assigns an offset of zero. You must type the brackets, [ ], around the specified offset, if you use the optional offset parameter.
The square brackets, [ ], indicate that the ucst6 is scaled by a left-shift of 2 bits. After scaling, ucst6 is added to SP. The result of the calculation is the effective address in memory that contains the content from dst.
Word addresses must be aligned on word (two LSBs are 0) boundaries.
None
*(SP[ucst6]) = *dst