AT94K Family
35
Conditional Branch Summary
Complete Instruction Set Summary
Test Boolean Mnemonic Complementary Boolean Mnemonic Comment
Rd > Rr Z•(N ⊕ V) = 0 BRLT Rd ≤ Rr Z+(N ⊕ V) = 1 BRGE Signed
Rd ≥ Rr (N ⊕ V) = 0 BRGE Rd < Rr (N ⊕ V) = 1 BRLT Signed
Rd = Rr Z = 1 BREQ Rd ≠ Rr Z = 0 BRNE Signed
Rd ≤ Rr Z+(N ⊕ V) = 1 BRGE Rd > Rr Z•(N ⊕ V) = 0 BRLT Signed
Rd < Rr (N ⊕ V) = 1 BRLT Rd ≥ Rr (N ⊕ V) = 0 BRGE Signed
Rd > Rr C + Z = 0 BRLO Rd ≤ Rr C + Z = 1 BRSH Unsigned
Rd ≥ Rr C = 0 BRSH/BRCC Rd < Rr C = 1 BRLO/BRCS Unsigned
Rd = Rr Z = 1 BREQ Rd ≠ Rr Z = 0 BRNE Unsigned
Rd ≤ Rr C + Z = 1 BRSH Rd > Rr C + Z = 0 BRLO Unsigned
Rd < Rr C = 1 BRLO/BRCS Rd ≥ Rr C = 0 BRSH/BRCC Unsigned
Carry C = 1 BRCS No Carry C = 0 BRCC Simple
Negative N = 1 BRMI Positive N = 0 BRPL Simple
Overflow V = 1 BRVS No Overflow V = 0 BRVC Simple
Zero Z = 1 BREQ Not Zero Z = 0 BRNE Simple
Instruction Set Summary
Mnemonics Operands Description Operation Flags #Clock
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
ADIW Rd, K Add Immediate to Word Rd+1: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
SBIW Rd, 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