I | T | H | S | V | N | Z | C |
– | – | – | ⇔ | ⇔ | ⇔ | ⇔ | – |
R7 • R6 • R5 • R4 • R3 • R2 • R1 • R0
Set if two’s complement overflow resulted from the operation; cleared otherwise. Two’s complement overflow occurs if and only if Rd was $7F before the operation.
R7
Set if MSB of the result is set; cleared otherwise.
R7 • R6 • R5 • R4 • R3 • R2 • R1 • R0
Set if the result is $00; cleared otherwise.
R (Result) equals Rd after the operation.
Example:
clr r22 ; clear r22
loop: inc r22 ; increment r22
...
cpi r22,$4F ; Compare r22 to $4f
brne loop ; Branch if not equal
nop ; Continue (do nothing)