PC <- PC + e
JR
e
b7 | b6 | b5 | b4 | b3 | b2 | b1 | b0 | |
---|---|---|---|---|---|---|---|---|
0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | $18 |
e-2 |
This instruction provides for unconditional branching to other segments of a program. The value of displacement e is added to the Program Counter (PC) and the next instruction is fetched from the location designated by the new contents of the PC. This jump is measured from the address of the instruction op code and contains a range of -126 to +129 bytes. The assembler automatically adjusts for the twice incremented PC.
None
To jump forward five locations from address $480, the following assembly language statement is used:
JR $+5
The resulting object code and final Program Counter value is shown in the following table:
Location | Instruction | |
---|---|---|
$480 | $18 | |
$481 | $03 | |
$482 | --- | |
$483 | --- | |
$484 | --- | |
$485 | <- PC after jump |