![]() |
|
| << Previous | Next >> | |
| | |
JR cc,label Jump Relative Rabbit 2000/3000/4000/5000 Instruction
---- JR cc,labelcc,mn1
JRif {cc} PC = PC2 + e 20 e JR NZ,mn if {NZ} PC = PC + e 28 e JR Z,mn if {Z} PC = PC + e 30 e JR NC,mn if {NC} PC = PC + e 38 e JR C,mn if {C} PC = PC + e
1 The 16-bit constant mn is the destination logical address of the jump.
2 The value of PC after the instruction fetch.
Rabbit 2000/3000/4000 Rabbit 5000
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 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. If condition cc is false, PC is incremented normally.
True when the Z flag has not been set True when the Z flag has been set True when the C flag has not been set True when the C flag has been set
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.
| Rabbit Instructions | << Previous | Next >> | rabbit.com |