<< Previous | Next >>

> JR label Jump Relative Rabbit 2000/3000/4000 Instruction

> Opcode | Instruction | Clocks | Operation
> 18 e | JR label JR mn1 | 5 (2,2,1) | PC = PC2 + e

> 1 The 16-bit constant mn is the destination logical address of the jump. 2 The value of PC after the instruction fetch.

> Flags | ALTD | IOI/IOE
> S | Z | L/V | C | F | R | SP | S | D
> - | - | - | - |  |  |  |  |

> #### Description

> This instruction transfers control to the specifed address. The address is specified by a label or logical address. The assembler translates the label or logical address "mn" to an 8-bit signed displacement value, "e".

> The displacement value "e" is relative to the address of the first byte of the instruction following JR. This fact is because the processor calculates the new PC value after it increments the PC for the instruction fetch of JR.

> Note that the relative jump has a limited range of [-128, 127] from the address of the first byte of the instruction following the JR instruction.

> #### See Also: SJP label

<< Previous | Next >>