EasyManuals Logo

Intel MCS 51 User Manual

Intel MCS 51
334 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #76 background imageLoading...
Page #76 background image
i~.
MCS@-5fPROGRAMMER’SGUIDE AND INSTRUCTION SET
JB bityrei
Function:
Description:
Bytes:
Cycierx
Encoding:
Operstion:
JBC bitrei
Jumpif Bit set
If the indicatedbit is a one,jump to the addreasindicat@ otherwiseproceedwith the next
instruction.Thebranch destinationis computedbyaddingthe signedreistive-displscem
ent in
the third instruction byte to the PC, after incrementingthe PC to the fnt byte of the next
instruction.The
bit tested k nor modified. No tlags are affected.
The data
present at inputport 1is 11OO1O1OB.The Accumulatorhoids56(O1O1O11OB).The
instructionsequence,
JB P1.2,LABEL1
JB ACC.2,LABEL2
willcauseprogram executionto branch to the instructionat label LABEL2.
3
2
0010
1004 EEzEEl EizEl
JB
(PC)+ (PC)+
3
IF (bit) = 1
THEN
(PC) +- (PC) + rel
Function: lump if Bit is setandClearbit
Description:
If the indicatedbit is one,branch to the addressindicated;otherwiseproceedwith the next
instruction.17re
bit wili not be cleared ~~itis already a zero. The branchdestinationiscomput-
ed by adding the signedrelative-displacementin the third instructionbyte to the PC, after
incrementingthe PC to the tlrst byte of the nextinstruction.No flagsare affected.
Note:When this instructionis used to test an output pin, the valueusedas the originaldata
willbe read from the output data latch, notthe inputpin.
Exempie:
The
Accumulatorholds56H(01010110B).Theinstructionsequence,
JBC ACC.3,LABELI
3BC ACC.2,LABEL2
willcauseprogram executionto continueat the instructionidentifiedby the label LABEL2,
withthe Accumulatormodifiedto 52H (OIO1OO1OB).
2-46

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Intel MCS 51 and is the answer not in the manual?

Intel MCS 51 Specifications

General IconGeneral
BrandIntel
ModelMCS 51
CategoryMicrocontrollers
LanguageEnglish

Related product manuals