52
8134I–AVR–12/10
XMEGA D3
29. Instruction Set Summary
Mnemonics Operands Description Operation Flags #Clocks
Arithmetic and Logic Instructions
ADD Rd, Rr Add without Carry Rd ←Rd + Rr Z,C,N,V,S,H 1
ADC Rd, Rr Add with Carry Rd ←Rd + Rr + C Z,C,N,V,S,H 1
ADIWRd, K Add Immediate to Word Rd ←Rd + 1:Rd + K Z,C,N,V,S 2
SUB Rd, Rr Subtract without Carry Rd ←Rd - Rr Z,C,N,V,S,H 1
SUBI Rd, K Subtract Immediate Rd ←Rd - K Z,C,N,V,S,H 1
SBC Rd, Rr Subtract with Carry Rd ←Rd - Rr - C Z,C,N,V,S,H 1
SBCI Rd, K Subtract Immediate with Carry Rd ←Rd - K - C Z,C,N,V,S,H 1
SBIWRd, K Subtract Immediate from Word Rd + 1:Rd ←Rd + 1:Rd - K Z,C,N,V,S 2
AND Rd, Rr Logical AND Rd ←Rd • Rr Z,N,V,S 1
ANDI Rd, K Logical AND with Immediate Rd ←Rd • K Z,N,V,S 1
OR Rd, Rr Logical OR Rd ←Rd v Rr Z,N,V,S 1
ORI Rd, K Logical OR with Immediate Rd ←Rd v K Z,N,V,S 1
EOR Rd, Rr Exclusive OR Rd ←Rd ⊕ Rr Z,N,V,S 1
COM Rd One’s Complement Rd ←$FF - Rd Z,C,N,V,S 1
NEG Rd Two’s Complement Rd ←$00 - Rd Z,C,N,V,S,H 1
SBR Rd,K Set Bit(s) in Register Rd ←Rd v K Z,N,V,S 1
CBR Rd,K Clear Bit(s) in Register Rd ←Rd • ($FFh - K) Z,N,V,S 1
INC Rd Increment Rd ←Rd + 1 Z,N,V,S 1
DEC Rd Decrement Rd ←Rd - 1 Z,N,V,S 1
TST Rd Test for Zero or Minus Rd ←Rd • Rd Z,N,V,S 1
CLR Rd Clear Register Rd ←Rd ⊕ Rd Z,N,V,S 1
SER Rd Set Register Rd ←$FF None 1
MUL Rd,Rr Multiply Unsigned R1:R0 ←Rd x Rr (UU) Z,C 2
MULS Rd,Rr Multiply Signed R1:R0 ←Rd x Rr (SS) Z,C 2
MULSU Rd,Rr Multiply Signed with Unsigned R1:R0 ←Rd x Rr (SU) Z,C 2
FMUL Rd,Rr Fractional Multiply Unsigned R1:R0 ←Rd x Rr<<1 (UU) Z,C 2
FMULS Rd,Rr Fractional Multiply Signed R1:R0 ←Rd x Rr<<1 (SS) Z,C 2
FMULSU Rd,Rr Fractional Multiply Signed with Unsigned R1:R0 ←Rd x Rr<<1 (SU) Z,C 2
Branch Instructions
RJMP k Relative Jump PC ←PC + k + 1 None 2
IJMP Indirect Jump to (Z) PC(15:0)
PC(21:16)
←
←
Z,
0
None 2
EIJMP Extended Indirect Jump to (Z) PC(15:0)
PC(21:16)
←
←
Z,
EIND
None 2
JMP k Jump PC ←k None 3
RCALL k Relative Call Subroutine PC ←PC + k + 1 None 2 / 3(1)
ICALL Indirect Call to (Z) PC(15:0)
PC(21:16)
←
←
Z,
0
None 2 / 3(1)
EICALL Extended Indirect Call to (Z) PC(15:0)
PC(21:16)
←
←
Z,
EIND
None 3(1)
CALL k call Subroutine PC ←k None 3 / 4(1)