M=”-51 programmers GUIDE AND INSTRUCTION SET
Bytes:
Cycles:
Encoding:
Operation:
JC rel
3
2
I“” ”’l” ”””1 DEEl EiEiEl
JBc
(PC) - (PC) + 3
IF (bit) = 1
THEN
(bit)* O
(PC)~ (PC) + rel
Function:
Daacription:
Exsmple:
Bytes
cycles:
Encoding:
Operation:
Jump if Carryis set
If the carry flag is set, branch to the addreas indicated;otherwise proceedwith the next
instruction.Thebranchdestinationis computedbyaddingthe signedrelative-displacementin
the secondinstructionbyte to the PC, after incrementingthe PC twice.Noflagsare afkted.
The carry flagis clesred.The instructionsequence,
JC LABEL1
CPL C
JC LABEL2
willset the carry and causeprogramexecutionto continueat the instructionidentifiedby the
labelLABEL2.
2
2
0100 0000
=
JC
(PC)+ (PC)+ 2
IF (C) = 1
THEN
(PC)~ (PC) + rel
2-47