8XC251SA, SB, SP, SQ USER’S MANUAL
A-72
JNC rel
Function: Jump if carry not set
Description: If the CY flag is clear, branch to the address specified; 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 to point to the next
instruction. The CY flag is not modified.
Flags:
Example: The CY flag is set. The instruction sequence
JNC LABEL1
CPL CY
JNC LABEL2
clears the CY flag and causes program execution to continue at label LABEL2.
Binary Mode Source Mode
Not Taken Taken Not Taken Taken
Bytes: 2 2 2 2
States: 14 14
Hex Code in: Binary Mode = [Encoding]
Source Mode = [Encoding]
Operation: JNC
(PC) ← (PC) + 2
IF (CY) = 0
THEN (PC) ← (PC) + rel
JNE rel
Function: Jump if not equal
Description: If the Z flag is clear, branch to the address specified; 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.
Flags:
Example: The instruction
JNE LABEL1
causes program execution to continue at LABEL1 if the Z flag is clear.
CY AC OV N Z
! ————
[Encoding] 0 1 0 1 0 0 0 0 rel. addr
CY AC OV N Z
———— !