Jump if Carry is set
Instruction | JC relative address |
---|---|
Function | Jump if Carry is set |
Bytes | 2 |
Cycles | 2 |
Encoding | 0 1 0 0 0 0 0 0 A7...A0 |
Operation | PC = PC + 2 IF C = 1 PC = PC + relative address |
Description | If the carry flag is set, JC branches to the address indicated; otherwise, it proceeds with the next instruction. The branch destination is computed by adding the signed relative-displacement in the second instruction byte to the PC, after incrementing the PC twice. No flags are affected. |
Flags Affected | C AC F0 RS1 RS0 OV P |
Example | The carry flag is cleared. The following instruction sequence, JC LABEL1 CPL C JC LABEL 2 sets the carry and causes program execution to continue at the instruction identified by the label LABEL2. |
Bytes: Number of bytes required to encode the instruction. Cycles: Number of instruction cycles required to execute the instruction. Note that there are 12 oscillator cycles to one instruction cycle on a standard 8051. Encoding: Lists the byte encoding for the instruction. Operation: Lists, step-by-step, the operations performed by the instruction. Flags Affected: are highlighted in Bold |
Related topics:
8051 Boolean Variable Manipulation Instructions | 8051 CPL Instruction | 8051 CLR Instruction | 8051 SETB Instruction | 8051 ORL Instruction | 8051 ANL Instruction | 8051 MOV Instruction | 8051 JBC Instruction | 8051 JB Instruction | 8051 JNC Instruction | 8051 JNB Instruction
List of topics: 8051
No comments:
Post a Comment