If C = 1, continue
If C = 0, PC <- PC + e
JR
NC,e
b7 | b6 | b5 | b4 | b3 | b2 | b1 | b0 | |
---|---|---|---|---|---|---|---|---|
0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | $30 |
e-2 |
This instruction provides for conditional branching to other segments of a program depending on the results of a test on the Carry Flag. If the flag is equal to 0, 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. The 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.
If the flag = 1, the next instruction executed is taken from the location following this instruction.
None
The Carry flag is reset and it is required to repeat the jump instruction. The assembly language statement is
JR NC,$
The resulting object code and Program Counter after the jump are:
Location | Instruction | |
---|---|---|
$480 | $30 <- PC after jump | |
$481 | $00 |