Intel 8XC251SP, 8XC251SA, 8XC251SQ, 8XC251SB manual JSG rel, JSG LABEL1, Jsge rel, Jsge LABEL1

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

1 458
Download 458 pages 25.38 Kb
Page 326
Image 326

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

JSG rel

Function: Jump if greater than (signed)

Description: If the Z flag is clear AND the N flag and the OV flag have the same value, 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

 

 

 

 

 

JSG LABEL1

 

 

 

 

causes program execution to continue at LABEL1 if the Z flag is clear AND the N flag and the OV flag have the same value.

 

Binary Mode

 

Source Mode

 

 

Not Taken

Taken

 

Not Taken

Taken

Bytes:

3

3

2

 

2

States:

2

5

1

 

4

[Encoding]

 

 

 

 

 

 

0 0 0 1

1 0 0 0

 

rel. addr

 

 

 

 

 

 

 

 

 

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

Source Mode = [Encoding]

Operation: JSG

(PC) (PC) + 2

IF [(N) = 0 AND (N) = (OV)] THEN (PC) (PC) + rel

JSGE rel

Function: Jump if greater than or equal (signed)

Description: If the N flag and the OV flag have the same value, 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

 

 

 

 

 

JSGE LABEL1

 

 

 

 

causes program execution to continue at LABEL1 if the N flag and the OV flag have the same value.

A-74

Page 326
Image 326
Intel 8XC251SP, 8XC251SA, 8XC251SQ, 8XC251SB, Embedded Microcontroller manual JSG rel, JSG LABEL1, Jsge rel, Jsge LABEL1