Cjne – Texas Instruments MSC1210 User Manual
Page 291
8052 Instruction Set
E-7
8052 Instruction Set
CJNE
Compare and Jump if Not Equal
Syntax
CJNE operand1,operand2,reladdr
Instructions
OpCode
Bytes
Cycles
Flags
CJNE A,#data8,reladdr
0xB4
3
2
C
CJNE A,direct,reladdr
0xB5
3
2
C
CJNE @R0,#data8,reladdr
0xB6
3
2
C
CJNE @R1,#data8,reladdr
0xB7
3
2
C
CJNE R0,#data8,reladdr
0xB8
3
2
C
CJNE R1,#data8,reladdr
0xB9
3
2
C
CJNE R2,#data8,reladdr
0xBA
3
2
C
CJNE R3,#data8,reladdr
0xBB
3
2
C
CJNE R4,#data8,reladdr
0xBC
3
2
C
CJNE R5,#data8,reladdr
0xBD
3
2
C
CJNE R6,#data8,reladdr
0xBE
3
2
C
CJNE R7,#data8,reladdr
0xBF
3
2
C
CJNE compares the value of operand1 and operand2 and branches to the
indicated relative address if the two operands are not equal. If the two operands
are equal, program flow continues with the instruction following the CJNE
instruction.
The carry (C) bit is set if operand1 is less than operand2, otherwise it is cleared.
See also: DJNZ
CLR
Clear Register
Syntax
CLR register
Instructions
OpCode
Bytes
Cycles
Flags
CLR bitAddr
0xC2
2
1
None
CLR C
0xC3
1
1
C
CLR A
0xE4
1
1
None
CLR clears (sets to 0) the bit(s) of the indicated register. If the register is a bit
(including the carry bit), only the specified bit is affected. Clearing the accumu-
lator sets the accumulator value to 0.
See also: SETB