<< Previous | Next >>

JRE cx,label     Jump Relative     Rabbit 4000/5000 Instruction

Opcode
Instruction
Operation
---- JRE cx,label
JRE cx,mn1
if {cx} PC = PC2 + ee
ED A3 ee low eehigh JRE GT,mn if {GT} PC = PC + ee
ED B3 ee low eehigh JRE LT,mn if {LT} PC = PC + ee
ED AB ee low eehigh JRE GTU,mn if {GTU} PC = PC + ee
ED BB ee low eehigh JRE V,mn if {V} PC = PC + ee

1 The 16-bit constant mn is the destination logical address of the jump

2 The value of PC after the instruction fetch.

8-Bit Access
16-Bit Unaligned
16-Bit Aligned
Rabbit 4000
9
n/a
n/a
Rabbit 5000
10
10
10

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

Description

If condition "cx" is true, 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 a 16-bit signed displacement value, "ee".

The displacement value "ee" is relative to the address of the first byte of the instruction following JRE. This fact is because the processor calculates the new PC value after it increments the PC for the instruction fetch of JRE. If condition "cx" is not true, PC is incremented normally.

Condition Code
Flag Bit Value
Description
GT
(Z or (S xor V))=0
True when Z is 0 and L/V and S are either both 1 or both 0.
LT
(S xor V)=1
True when either S is 1 or L/V is 1.
GTU
((C=0) and (Z=0))=1
True when C and Z are both 0.
V
L/V=1
True when L/V flag is set: there is overflow.

Note that the relative jump has a range of [-32768, 32767] from the address of the first byte of the instruction following the JRE instruction.


Rabbit Instructions << Previous | Next >> rabbit.com