.75
P
Â
JR
Jump Relative
Instruction Format:
JR cc, dst
Operation:
If cc is true, PC ← PC + dst
If the condition specified by the cc is true, the relative address is added to the PC and control passes to the
instruction located at the address specified by the PC (See page 3-8 for a list of condition codes). Otherwise,
the instruction following the JR instruction is executed. The range of the relative address is +127 to
-128, and the original value of the PC is taken to be the address of the first instruction byte following the JR
instruction.
Flags:
When the instruction is executed, the flags are set as follows:
C:
The value set by the preceding instruction.
Z:
The value set by the preceding instruction.
S:
The value set by the preceding instruction.
V:
The value set by the preceding instruction.
D:
The value set by the preceding instruction.
H:
The value set by the preceding instruction.
Example: The result of the last arithmetic operation executed is negative. The next nine bytes are skipped
with the following statement. If the result is not negative, execution continues with the instruction following
the JR instruction.
JR MI, 9
Op Code: 5B 09
Example: A short form of a jump -45 is:
JR -45
Op Code: 8B D3
The instruction jumps backwards 45 bytes, unconditionally. The condition code is blank in this case, and is
assumed to be always true.
cc
OPC
OPC (Hex)
ccB
dst
(cc=0 to F)
Address Mode
dst
RA
Need help?
Do you have a question about the Z8 PLUS and is the answer not in the manual?
Questions and answers