Syntax: |
Operation: |
Operands: |
Program Counter: |
Opcode |
Comment |
Stack |
STS k,Rr |
(k) = Rr |
16 <= r <= 31, 0 <= k <= 127 |
PC = PC + 1 |
10101kkkddddkkkk |
Stores one byte from a Register to the data space. The data space usually consists of the Register File, I/O memory, and SRAM, refer to the device data sheet for a detailed definition of the data space.
A 7-bit address must be supplied. The address given in the instruction is coded to a data space address as follows:
ADDR[7:0] = (INST[8], INST[8], INST[10], INST[9], INST[3], INST[2], INST[1], INST[0])
Memory access is limited to the address range 0x40...0xbf of the data segment.
This instruction is not available on all devices. Refer to Appendix A.
I |
– |
||
T |
– |
||
H |
– |
||
S |
– |
||
V |
– |
||
N |
– |
||
Z |
– |
||
C |
– |
lds r16,0x00 ; Load r16 with the contents of data space location 0x00 add r16,r17 ; add r17 to r16 sts 0x00,r16 ; Write result to the same address it was fetched from
1 (2 bytes)
Name Note: Registers r0...r15 are remapped to r16...r31. |
Cycles |
AVRe |
N/A |
AVRxm |
N/A |
AVRxt |
N/A |
AVRrc |
1 |