Intel 8XC251SA, 8XC251SP, 8XC251SQ, 8XC251SB manual JNZ rel, JNZ LABEL1 INC a JNZ LABEL2

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

1 458
Download 458 pages 25.38 Kb
Page 325
Image 325

INSTRUCTION SET REFERENCE

Bytes:

States:

[Encoding]

Binary Mode

Not Taken

Taken

3

3

2

5

 

 

0 1 1 1

1 0 0 0

 

 

Source Mode

Not Taken

Taken

22

14

rel. addr

Hex Code in: Binary Mode = [A5][Encoding]

Source Mode = [Encoding]

Operation: JNE

(PC) (PC) + 2 IF (Z) = 0

THEN (PC) (PC) + rel

JNZ rel

Function: Jump if accumulator not zero

Description: If any bit of the accumulator is set, branch to the specified 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.

Flags:

CY

AC

OV

N

Z

 

 

 

 

 

!

 

 

 

 

 

Example:

Bytes:

States:

[Encoding]

The accumulator contains 00H. After executing the instruction sequence

JNZ LABEL1

INC A

JNZ LABEL2

the accumulator contains 01H and program execution continues at label LABEL2.

Binary Mode

 

Source Mode

 

Not Taken

Taken

 

Not Taken

Taken

2

2

2

 

2

2

5

2

 

5

 

 

 

 

 

 

0 1 1 1

0 0 0 0

 

rel. addr

 

 

 

 

 

 

 

 

Hex Code in: Binary Mode = [Encoding]

Source Mode = [Encoding]

Operation: JNZ

(PC) (PC) + 2 IF (A) 0

THEN (PC) (PC) + rel

A-73

Page 325
Image 325
Intel 8XC251SA, 8XC251SP, 8XC251SQ, 8XC251SB, Embedded Microcontroller manual JNZ rel, JNZ LABEL1 INC a JNZ LABEL2