user manual

8XC251SA, SB, SP, SQ USER’S MANUAL
A-74
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:
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: 33 22
States: 25 14
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:
Example: The instruction
JSGE LABEL1
causes program execution to continue at LABEL1 if the N flag and the OV flag have the
same value.
CY AC OV N Z
—— ! ! !
[Encoding] 0 0 0 1 1 0 0 0 rel. addr
CY AC OV N Z
—— ! ! !