<< Previous | Next >>

> JRE cc,label Jump Relative Rabbit 4000 Instruction

> Opcode | Instruction | Clocks | Operation
> ---- | JRE cc,label JRE cc,mn1 | 9 (2,2,2,2,1) | if {cc} PC = PC2 + ee
> ED C3 ee low eehigh | JRE NZ,mn | 9 (2,2,2,2,1) | if {NZ} PC = PC + ee
> ED CB ee low eehigh | JRE Z,mn | 9 (2,2,2,2,1) | if {Z} PC = PC + ee
> ED D3 ee low eehigh | JRE NC,mn | 9 (2,2,2,2,1) | if {NC} PC = PC + ee
> ED DB ee low eehigh | JRE C,mn | 9 (2,2,2,2,1) | if {C} 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.

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

> #### Description

> If condition "cc" 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 "cc" is not true, PC is incremented normally.

> Condition Code | Flag Bit Value | Description
> NZ | Z=0 | True when the Z flag has not been set
> Z | Z=1 | True when the Z flag has been set
> NC | C=0 | True when the C flag has not been set
> C | C=1 | True when the C flag has been set

> 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.

<< Previous | Next >>