JR e

Operation

PC <- PC + e

Mnemonic

JR

Operands

e

b7b6b5b4b3b2b1b0
0 0 0 1 1 0 0 0$18
e-2

Description

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.

Condition Bits Affected

None

Example

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:

LocationInstruction
$480$18
$481$03
$482---
$483---
$484---
$485<- PC after jump