JR e

Jump e relative.
Function: PC <- PC + e
 
Format:
0001 1000
 
byte 1: 18
 
<-- e-2 -->
 
byte 2: offset value
 
Description: The given offset value is added to the program counter using two's complement arithmetic so as to enable both forward and backward jumps. The offset value is added to the value of PC + 2 (after the jumps). As a result, the effective offset is -126 to +129 bytes. The assembler automatically subtracts the value of PC + 2 from the source offset value to generate the hex code.
 
Data Flow:
 
Timing: 3 M cycles; 12 T states: 6 usec @ 2 MHz
 
Addressing Mode: relative
 
Flags:
 
(no effect)
 
Example:
JR D4

OBJECT CODE
Before:
 
After:
 
(This is a backwards jump.)