109 / 132 page

HT80C51 User Manual
80C51 Family Instruction Set – Instruction definitions
Handshake Solutions
© Philips Electronics N.V. 2005
Page 109 of 132
JNC rel
Function: Jump if Carry Not set
Description: If the carry flag is a zero, branch to the address indicated; otherwise proceed with the next instruc-
tion. The branch destination is computed by adding the signed relative-displacement in the sec-
ond instruction byte to the PC, after incrementing the PC twice to point to the next instruction. The
carry flag is not modified.
Example: The carry flag is set. The instruction sequence,
JNC LABEL1
CPL C
JNC LABEL2
will clear the carry and cause program execution to continue at the instruction identified by the la-
bel LABEL2.
Bytes: 2
Cycles: 2
Encoding:
Operation: JNC
(PC)
← (PC) + 2
IF (C) = 0
THEN
(PC)
← (PC) + rel
JNZ rel
Function: Jump if Accumulator Not Zero
Description: If any bit of the Accumulator is a one, branch to the indicated address; otherwise proceed with the
next instruction. The branch destination is computed by adding the signed relative-displacement in
the second instruction byte to the PC, after incrementing the PC twice. The Accumulator is not
modified. No flags are affected.
Example: The Accumulator originally holds 00H. The instruction sequence,
JNZ LABEL1
INC A
JNZ LABEL2
will set the Accumulator to 01H and continue at label LABEL2.
Bytes: 2
Cycles: 2
Encoding:
Operation: JNZ
(PC)
← (PC) + 2
IF A
≠ 0
THEN
(PC)
← (PC) + rel
0
1
0
1
0
0
0
0
rel. address
0
1
1
1
0
0
0
0
rel. address