Syntax: |
Operation: |
Operands: |
Program Counter: |
Opcode |
Comment |
Stack |
SWAP Rd |
R(7:4) ↔ Rd(3:0) |
0 <= d <= 31 |
PC = PC + 1 |
1001010ddddd0010 |
Swaps high and low nibbles in a register.
I |
– |
||
T |
– |
||
H |
– |
||
S |
– |
||
V |
– |
||
N |
– |
||
Z |
– |
||
C |
– |
||
R (Result) |
R (Result) equals Rd after the operation. |
inc r1 ; Increment r1 swap r1 ; Swap high and low nibble of r1 inc r1 ; Increment high nibble of r1 swap r1 ; Swap back
1 (2 bytes)
Name |
Cycles |
AVRe |
1 |
AVRxm |
1 |
AVRxt |
1 |
AVRrc |
1 |