Intel Embedded Microcontroller manual JNC rel, JNC LABEL1 CPL CY JNC LABEL2, JNE rel, JNE LABEL1

Models: Embedded Microcontroller 8XC251SP 8XC251SA 8XC251SQ 8XC251SB

1 458
Download 458 pages 25.38 Kb
Page 324
Image 324

8XC251SA, SB, SP, SQ USER’S MANUAL

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:

CY

AC

OV

N

Z

 

 

 

 

 

!

 

 

 

 

 

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:

1

4

1

 

4

[Encoding]

 

 

 

 

 

 

0 1 0 1

0 0 0 0

 

rel. addr

 

 

 

 

 

 

 

 

 

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:

 

CY

AC

OV

N

Z

 

 

 

 

 

 

 

!

Example:

 

 

 

 

 

The instruction

 

 

 

 

 

JNE LABEL1

 

 

 

 

causes program execution to continue at LABEL1 if the Z flag is clear.

A-72

Page 324
Image 324
Intel Embedded Microcontroller, 8XC251SA, 8XC251SP, 8XC251SQ manual JNC rel, JNC LABEL1 CPL CY JNC LABEL2, JNE rel, JNE LABEL1