i~. MCS@-51PROGRAMMER’SGUIDE AND INSTRUCTION SET
JNZ rel
Function:
Example:
Bytea:
Cyclea:
Encoding:
Operation:
JZ rel
Jump if AccumulatorNot Zero
If anybit ofthe Accum
ulatorisa one,branchto theindicatedaddress;otherwiseproceedwith
the next instruction. The branch destinationis computedby addingthe signedrelativedis-
placement in the secondinstructionbyte to the PC, after incrementingthe PC twice. The
Accumulatoris not modified.No tlags are affected.
The AccumulatororiginallyholdsOOH.The instructionsequence,
JNZ LABEL1
INC A
JNZ LAEEL2
willset the Accumulatorto OIHand continueat labelLABEL2.
2
2
0111
10’001 EiEl
JNz
(PC)+ (PC) + 2
IF (A) # O
THEN (PC) ~ (PC) + rel
Function:
Daaoription:
Bytea:
Cycles:
E“ncodirrg:
Operation:
Jump if AccumulatorZero
If allbits ofthe Accumulatorare zero,branchto the addressindica@ otherwiseproceedwith
the
next instruction.The branch destinationis computedby addingthe signedrelative-dis-
placement in the secondinstructionbyte to the PC, after incrementingthe PC twice. The
Accumulatoris not modified.No flagsare affected.
The AccumulatororiginallycontainsOIH.The instructionsequen~
JZ LABELI
DEC A
JZ LABEL2
willchangethe Aec.umulator to OOHand causeprogramexeeutionto continueat the instruc-
tion identifiedby the labelLABEL2.
“
.4
2
I
0110
0000
[
rel. addreee
Jz
(PCJ)+ (w)+
2
IF (A) = O
THEN (PC) t @C) + rel
2-50