 | 8051 Instruction Set Manual |  |
|
|
| CJNEThe CJNE instruction compares the first two operands and branches to the specified destination if their values are not equal. If the values are the same, execution continues with the next instruction. See Also: DJNZ | CJNE @Rn, #immediate, offset | |
| Bytes | 3 | | Cycles | 2 | | Encoding | | | Operation |
CJNE
PC = PC + 3
IF (Rn) <> immedate
PC = PC + offset
IF (Rn) < immediate
C = 1
ELSE
C = 0
| | Example |
CJNE @R1, #24H, LABEL
|
| CJNE A, #immediate, offset | |
| Bytes | 3 | | Cycles | 2 | | Encoding | | | Operation |
CJNE
PC = PC + 3
IF A <> immediate
PC = PC + offset
IF A < immediate
C = 1
ELSE
C = 0
| | Example |
CJNE A, #01H, LABEL
|
| Bytes | 3 | | Cycles | 2 | | Encoding | | | Operation |
CJNE
PC = PC + 3
IF A <> (direct)
PC = PC + offset
IF A < (direct)
C = 1
ELSE
C = 0
| | Example |
CJNE A, 60h, LABEL
|
| CJNE Rn, #immediate, offset | |
| Bytes | 3 | | Cycles | 2 | | Encoding | | | Operation |
CJNE
PC = PC + 3
IF Rn <> immedate
PC = PC + offset
IF Rn < immediate
C = 1
ELSE
C = 0
| | Example |
CJNE R6, #12H, LABEL
|
Related Knowledgebase Articles |
|