27. Instruction Set Summary
Mnemonics
Operands
Description
Operation
Flags
#Clocks
LSR
ROL
ROR
ASR
SWAP
BSET
BCLR
BST
BLD
SEC
CLC
SEN
CLN
SEZ
CLZ
SEI
Rd
Rd
Rd
Rd
Rd
s
Logical Shift Right
Rotate Left Through Carry
Rotate Right Through Carry
Arithmetic Shift Right
Swap Nibbles
Flag Set
Flag Clear
Bit Store from Register to T
Bit load from T to Register
Set Carry
Rd(n) ←Rd(n+1), Rd(7) ←0
Rd(0)←C,Rd(n+1)←Rd(n),C←Rd(7)
Rd(7)←C,Rd(n)←Rd(n+1),C←Rd(0)
Rd(n) ←Rd(n+1), n=0..6
Rd(3..0)←Rd(7..4),Rd(7..4)←Rd(3..0)
Z,C,N,V
Z,C,N,V
Z,C,N,V
Z,C,N,V
None
SREG(s)
SREG(s)
T
None
C
C
N
N
Z
Z
I
I
S
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
SREG(s) ←1
SREG(s) ←0
T ←Rr(b)
Rd(b) ←T
C ←1
s
Rr, b
Rd, b
Clear Carry
Set Negative Flag
Clear Negative Flag
Set Zero Flag
Clear Zero Flag
C ←0
N ←1
N ←0
Z ←1
Z ←0
I ←1
I ←0
S ←1
S ←0
V ←1
V ←0
T ←1
T ←0
H ←1
H ←0
Global Interrupt Enable
Global Interrupt Disable
Set Signed Test Flag
Clear Signed Test Flag
Set Twos Complement Overflow.
Clear Twos Complement Overflow
Set T in SREG
CLI
SES
CLS
SEV
CLV
SET
CLT
S
V
V
T
T
H
H
Clear T in SREG
SEH
CLH
Set Half Carry Flag in SREG
Clear Half Carry Flag in SREG
DATA TRANSFER INSTRUCTIONS
Move Between Registers
Copy Register Word
Load Immediate
MOV
MOVW
LDI
LD
LD
LD
LD
LD
LD
LDD
LD
LD
LD
LDD
LDS
ST
ST
ST
ST
ST
ST
STD
ST
ST
ST
STD
STS
LPM
LPM
LPM
SPM
IN
OUT
PUSH
POP
Rd, Rr
Rd, Rr
Rd, K
Rd ←Rr
Rd+1:Rd ←Rr+1:Rr
Rd ←K
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
1
1
1
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
3
3
3
-
Rd, X
Load Indirect
Rd ←(X)
Rd, X+
Rd, - X
Rd, Y
Rd, Y+
Rd, - Y
Rd,Y+q
Rd, Z
Rd, Z+
Rd, -Z
Rd, Z+q
Rd, k
Load Indirect and Post-Inc.
Load Indirect and Pre-Dec.
Load Indirect
Load Indirect and Post-Inc.
Load Indirect and Pre-Dec.
Load Indirect with Displacement
Load Indirect
Load Indirect and Post-Inc.
Load Indirect and Pre-Dec.
Load Indirect with Displacement
Load Direct from SRAM
Store Indirect
Store Indirect and Post-Inc.
Store Indirect and Pre-Dec.
Store Indirect
Store Indirect and Post-Inc.
Store Indirect and Pre-Dec.
Store Indirect with Displacement
Store Indirect
Store Indirect and Post-Inc.
Store Indirect and Pre-Dec.
Store Indirect with Displacement
Store Direct to SRAM
Load Program Memory
Load Program Memory
Load Program Memory and Post-Inc
Store Program Memory
In Port
Rd ←(X), X ←X + 1
X ←X - 1, Rd ←(X)
Rd ←(Y)
Rd ←(Y), Y ←Y + 1
Y ←Y - 1, Rd ←(Y)
Rd ←(Y + q)
Rd ←(Z)
Rd ←(Z), Z ←Z+1
Z ←Z - 1, Rd ←(Z)
Rd ←(Z + q)
Rd ←(k)
X, Rr
(X) ←Rr
X+, Rr
- X, Rr
Y, Rr
Y+, Rr
- Y, Rr
Y+q,Rr
Z, Rr
Z+, Rr
-Z, Rr
Z+q,Rr
k, Rr
(X) ←Rr, X ←X + 1
X ←X - 1, (X) ←Rr
(Y) ←Rr
(Y) ←Rr, Y ←Y + 1
Y ←Y - 1, (Y) ←Rr
(Y + q) ←Rr
(Z) ←Rr
(Z) ←Rr, Z ←Z + 1
Z ←Z - 1, (Z) ←Rr
(Z + q) ←Rr
(k) ←Rr
R0 ←(Z)
Rd ←(Z)
Rd, Z
Rd, Z+
Rd ←(Z), Z ←Z+1
(Z) ←R1:R0
Rd ←P
P ←Rr
STACK ←Rr
Rd ←STACK
Rd, P
P, Rr
Rr
1
1
2
2
Out Port
Push Register on Stack
Pop Register from Stack
MCU CONTROL INSTRUCTIONS
No Operation
Rd
NOP
SLEEP
WDR
None
None
None
None
1
1
1
(see specific descr. for Sleep
(see specific descr. for WDR/timer)
For On-chip Debug Only
Sleep
Watchdog Reset
BREAK
Break
N/A
288
Atmel ATA5505 [Preliminary]
9219A–RFID–01/11