Syntax: |
Operation: |
Operands: |
Program Counter: |
Opcode |
Comment |
Stack |
CPSE Rd,Rr |
If Rd == Rr then PC = PC + 2 (or 3) else PC = PC + 1 |
0 <= d <= 31, 0 <= r <= 31 |
PC = PC + 1, Condition false - no skip PC = PC + 2, Skip a one word instruction PC = PC + 3, Skip a two word instruction |
000100rdddddrrrr |
This instruction performs a compare between two registers Rd and Rr and skips the next instruction if Rd == Rr.
I |
– |
||
T |
– |
||
H |
– |
||
S |
– |
||
V |
– |
||
N |
– |
||
Z |
– |
||
C |
– |
inc r4 ; Increase r4 cpse r4,r0 ; Compare r4 to r0 neg r4 ; Only executed if r4<>r0 nop ; Continue (do nothing)
1 (2 bytes)
Name |
Cycles i |
ii |
iii |
AVRe |
1 |
2 |
3 |
AVRxm |
1 |
2 |
3 |
AVRxt |
1 |
2 |
3 |
AVRrc |
1 |
2 |
N/A |
i) If the condition is false (no skip).
ii) If the condition is true (skip is executed) and the instruction skipped is one word.
iii) If the condition is true (skip is executed) and the instruction skipped is two words.