SlideShare ist ein Scribd-Unternehmen logo
1 von 12
BOOLEAN INSTRUCTIONS CLR,CPL,SETB,AND,OR
BOOLEAN INSTRUCTIONS This group of instructions is associated with the single-bit operations of the 8051. This group allows manipulating the individual bits of bit addressable registers and memory locations as well as the CY flag. The P, OV, and AC flags cannot be directly altered. This group includes: Set, clear, and, or complement, move. Conditional jumps.
CLR <bit> CLR C CLR instruction can operate on the carry flag CLR C  The CARRY flag is set to 0 CLR bit CLR instruction can operate on any directly addressable     bit CLR P2.7 If Port 2 has been previously written with DCH (11011100), then the operation leaves the port set to 5CH (01011100)
SETB <bit> SETB C SETB instruction operates on the carry flag and sets the specified bit to 1 SETB C sets the carry flag to 1  SETB bit SETB instruction operates on any    directly-addressable bit and sets the specified bit to 1 SETB P2.0 Port 2 has the value of 24H (00100100), the Port 2 value changes to 25H (00100101)
CPL <bit> CPL C This operation complements the carry flag CPL C CPL bit CPL instruction complements any directly addressable Bit CPL P2.2 If Port 2 has the value of 53H (01010011) then after the execution the port set to 55H (01010101)
ANL ANL C, <source-bit> This instruction ANDs the bit addressed with the carry bit and stores the result in the carry bit itself ANL C,P2.7 ;AND carry flag with bit 7 of P2 ANL C, /<source-bit> If a slash (/) is used in the source operand bit, the logical complement of the source bit is used, but the source bit itself is not affected ANL C,/OV ;AND with inverse of OV flag
ORL ORL C, <source-bit> This instruction ORs the bit addressed with the carry bit and stores the result in the carry bit itself ORL C,P2.5 ;OR carry flag with bit 5 of P2 ORL C, /<source-bit> If a slash (/) is used in the source operand bit, the logical complement of the source bit is used, but the source bit itself is not affected ORL C,/OV ;OR with inverse of OV flag
MOV <dest-bit>,<source-bit> One of the operands must be the carry flag; the other may be any directly-addressable bit MOV C,P3.3 MOV P2.0,C If P2=C5H (11000101), P3.3=0 and CY=1 initially, after instructions,   	P2=C4H (11000100) and CY=0
JC / JNC addr Jump to a relative address if CY is set / cleared.
JB / JNB <bit>,addr Jump to a relative address if a bit is set / cleared.
JBC <bit>,addr Jump to a relative address if a bit is set and clear the bit.  JBC P1.3,ARRAY1 If P1=56H (01010110), the above instruction sequence will cause the program to branch to the instruction at ARRAY1, modifying P1 to 52H (01010010)

Weitere ähnliche Inhalte

Was ist angesagt?

8051 Microcontroller I/O ports
8051 Microcontroller I/O ports8051 Microcontroller I/O ports
8051 Microcontroller I/O portsanishgoel
 
Addressing modes of 8051
Addressing modes of 8051Addressing modes of 8051
Addressing modes of 8051SARITHA REDDY
 
8086 pin details
8086 pin details8086 pin details
8086 pin detailsAJAL A J
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 80869840596838
 
Microcontroller 8051 and its interfacing
Microcontroller 8051 and its interfacingMicrocontroller 8051 and its interfacing
Microcontroller 8051 and its interfacingAnkur Mahajan
 
Interfacing technique with 8085- ADC[0808]
Interfacing technique with 8085- ADC[0808]Interfacing technique with 8085- ADC[0808]
Interfacing technique with 8085- ADC[0808]Guhan k
 
Stacks & subroutines 1
Stacks & subroutines 1Stacks & subroutines 1
Stacks & subroutines 1deval patel
 
DAC Interfacing with 8051.pdf
DAC Interfacing with 8051.pdfDAC Interfacing with 8051.pdf
DAC Interfacing with 8051.pdfSrikrishna Thota
 
Unit II arm 7 Instruction Set
Unit II arm 7 Instruction SetUnit II arm 7 Instruction Set
Unit II arm 7 Instruction SetDr. Pankaj Zope
 
8259 Programmable Interrupt Controller
8259 Programmable Interrupt Controller8259 Programmable Interrupt Controller
8259 Programmable Interrupt Controllerabhikalmegh
 
Data transfer instruction set of 8085 micro processor
Data transfer instruction set of 8085 micro processorData transfer instruction set of 8085 micro processor
Data transfer instruction set of 8085 micro processorvishalgohel12195
 
8086 microprocessor-architecture
8086 microprocessor-architecture8086 microprocessor-architecture
8086 microprocessor-architectureprasadpawaskar
 

Was ist angesagt? (20)

3 jump, loop and call instructions
3 jump, loop and call instructions3 jump, loop and call instructions
3 jump, loop and call instructions
 
8051 Microcontroller I/O ports
8051 Microcontroller I/O ports8051 Microcontroller I/O ports
8051 Microcontroller I/O ports
 
Addressing modes of 8051
Addressing modes of 8051Addressing modes of 8051
Addressing modes of 8051
 
8086 pin details
8086 pin details8086 pin details
8086 pin details
 
Direct Memory Access
Direct Memory AccessDirect Memory Access
Direct Memory Access
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
Microcontroller 8051 and its interfacing
Microcontroller 8051 and its interfacingMicrocontroller 8051 and its interfacing
Microcontroller 8051 and its interfacing
 
Interfacing technique with 8085- ADC[0808]
Interfacing technique with 8085- ADC[0808]Interfacing technique with 8085- ADC[0808]
Interfacing technique with 8085- ADC[0808]
 
Interrupt 8085
Interrupt 8085Interrupt 8085
Interrupt 8085
 
Adc interfacing
Adc interfacingAdc interfacing
Adc interfacing
 
8251 USART
8251 USART8251 USART
8251 USART
 
Stacks & subroutines 1
Stacks & subroutines 1Stacks & subroutines 1
Stacks & subroutines 1
 
8051 instruction set
8051 instruction set8051 instruction set
8051 instruction set
 
DAC Interfacing with 8051.pdf
DAC Interfacing with 8051.pdfDAC Interfacing with 8051.pdf
DAC Interfacing with 8051.pdf
 
Unit II arm 7 Instruction Set
Unit II arm 7 Instruction SetUnit II arm 7 Instruction Set
Unit II arm 7 Instruction Set
 
8259 Programmable Interrupt Controller
8259 Programmable Interrupt Controller8259 Programmable Interrupt Controller
8259 Programmable Interrupt Controller
 
Interfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 MicrocontrollerInterfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 Microcontroller
 
Data transfer instruction set of 8085 micro processor
Data transfer instruction set of 8085 micro processorData transfer instruction set of 8085 micro processor
Data transfer instruction set of 8085 micro processor
 
8086 microprocessor-architecture
8086 microprocessor-architecture8086 microprocessor-architecture
8086 microprocessor-architecture
 
8051 ch9-950217
8051 ch9-9502178051 ch9-950217
8051 ch9-950217
 

Ähnlich wie boolean 8051

Lecture 4 (8051 instruction set) rv01
Lecture 4 (8051 instruction set) rv01Lecture 4 (8051 instruction set) rv01
Lecture 4 (8051 instruction set) rv01cairo university
 
74LS47 / DM74LS47 Datasheet PDF
74LS47 / DM74LS47 Datasheet PDF74LS47 / DM74LS47 Datasheet PDF
74LS47 / DM74LS47 Datasheet PDFDatasheet
 
08 chapter03 06_status_bits_otl_otu_scan_logic_fa16
08 chapter03 06_status_bits_otl_otu_scan_logic_fa1608 chapter03 06_status_bits_otl_otu_scan_logic_fa16
08 chapter03 06_status_bits_otl_otu_scan_logic_fa16John Todora
 
The 8051 microcontroller
The 8051 microcontrollerThe 8051 microcontroller
The 8051 microcontrollerPallaviHailkar
 
7447_datasheet.pdf© 2001 Fairchild Semiconductor Corporati.docx
7447_datasheet.pdf© 2001 Fairchild Semiconductor Corporati.docx7447_datasheet.pdf© 2001 Fairchild Semiconductor Corporati.docx
7447_datasheet.pdf© 2001 Fairchild Semiconductor Corporati.docxalinainglis
 
8051 data type and directives
8051 data type and directives8051 data type and directives
8051 data type and directivesSARITHA REDDY
 
8051 data types and directives
8051 data types and directives8051 data types and directives
8051 data types and directivesSARITHA REDDY
 
WINSEM2023-24_BECE204L_TH_VL2023240505625_2024-01-29_Reference-Material-I.pptx
WINSEM2023-24_BECE204L_TH_VL2023240505625_2024-01-29_Reference-Material-I.pptxWINSEM2023-24_BECE204L_TH_VL2023240505625_2024-01-29_Reference-Material-I.pptx
WINSEM2023-24_BECE204L_TH_VL2023240505625_2024-01-29_Reference-Material-I.pptxSrinivasanUma1
 
MICROCONTROLLER .pptx
MICROCONTROLLER .pptxMICROCONTROLLER .pptx
MICROCONTROLLER .pptxArulMozhie1
 
8051 MMD Chapter 1.ppt
8051 MMD Chapter 1.ppt8051 MMD Chapter 1.ppt
8051 MMD Chapter 1.pptnotagain0712
 
Embedded system (Chapter 3) io_port_programming
Embedded system (Chapter 3) io_port_programmingEmbedded system (Chapter 3) io_port_programming
Embedded system (Chapter 3) io_port_programmingIkhwan_Fakrudin
 
Embedded systems io programming
Embedded systems   io programmingEmbedded systems   io programming
Embedded systems io programmingimtiazalijoono
 
Microprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 FeaturesMicroprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 FeaturesSrikrishna Thota
 
1203 Ppi 8155
1203 Ppi 81551203 Ppi 8155
1203 Ppi 8155techbed
 

Ähnlich wie boolean 8051 (20)

Uc 2(vii)
Uc 2(vii)Uc 2(vii)
Uc 2(vii)
 
Lecture 4 (8051 instruction set) rv01
Lecture 4 (8051 instruction set) rv01Lecture 4 (8051 instruction set) rv01
Lecture 4 (8051 instruction set) rv01
 
74LS47 / DM74LS47 Datasheet PDF
74LS47 / DM74LS47 Datasheet PDF74LS47 / DM74LS47 Datasheet PDF
74LS47 / DM74LS47 Datasheet PDF
 
08 chapter03 06_status_bits_otl_otu_scan_logic_fa16
08 chapter03 06_status_bits_otl_otu_scan_logic_fa1608 chapter03 06_status_bits_otl_otu_scan_logic_fa16
08 chapter03 06_status_bits_otl_otu_scan_logic_fa16
 
The 8051 microcontroller
The 8051 microcontrollerThe 8051 microcontroller
The 8051 microcontroller
 
Hemanth143
Hemanth143 Hemanth143
Hemanth143
 
8085 lab
8085 lab8085 lab
8085 lab
 
7447_datasheet.pdf© 2001 Fairchild Semiconductor Corporati.docx
7447_datasheet.pdf© 2001 Fairchild Semiconductor Corporati.docx7447_datasheet.pdf© 2001 Fairchild Semiconductor Corporati.docx
7447_datasheet.pdf© 2001 Fairchild Semiconductor Corporati.docx
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
8051 data type and directives
8051 data type and directives8051 data type and directives
8051 data type and directives
 
8051 data types and directives
8051 data types and directives8051 data types and directives
8051 data types and directives
 
WINSEM2023-24_BECE204L_TH_VL2023240505625_2024-01-29_Reference-Material-I.pptx
WINSEM2023-24_BECE204L_TH_VL2023240505625_2024-01-29_Reference-Material-I.pptxWINSEM2023-24_BECE204L_TH_VL2023240505625_2024-01-29_Reference-Material-I.pptx
WINSEM2023-24_BECE204L_TH_VL2023240505625_2024-01-29_Reference-Material-I.pptx
 
MICROCONTROLLER .pptx
MICROCONTROLLER .pptxMICROCONTROLLER .pptx
MICROCONTROLLER .pptx
 
8051 MMD Chapter 1.ppt
8051 MMD Chapter 1.ppt8051 MMD Chapter 1.ppt
8051 MMD Chapter 1.ppt
 
Embedded system (Chapter 3) io_port_programming
Embedded system (Chapter 3) io_port_programmingEmbedded system (Chapter 3) io_port_programming
Embedded system (Chapter 3) io_port_programming
 
Embedded systems io programming
Embedded systems   io programmingEmbedded systems   io programming
Embedded systems io programming
 
Ladder
LadderLadder
Ladder
 
8155 GPPI
8155 GPPI8155 GPPI
8155 GPPI
 
Microprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 FeaturesMicroprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 Features
 
1203 Ppi 8155
1203 Ppi 81551203 Ppi 8155
1203 Ppi 8155
 

Mehr von VJ Aiswaryadevi (15)

8051
80518051
8051
 
memory 8051
memory  8051memory  8051
memory 8051
 
logical 8051
logical 8051logical 8051
logical 8051
 
interrupts
interruptsinterrupts
interrupts
 
mup
mupmup
mup
 
branch ins 8051
branch ins 8051branch ins 8051
branch ins 8051
 
arithmetic ins in 8051
arithmetic ins in 8051arithmetic ins in 8051
arithmetic ins in 8051
 
8051 archi
8051 archi8051 archi
8051 archi
 
8051 microprocessor
8051 microprocessor8051 microprocessor
8051 microprocessor
 
8051 microprocessor
8051 microprocessor8051 microprocessor
8051 microprocessor
 
Groupware
GroupwareGroupware
Groupware
 
Db
DbDb
Db
 
302 B+Tree Ind Hash
302 B+Tree Ind Hash302 B+Tree Ind Hash
302 B+Tree Ind Hash
 
storage media
storage mediastorage media
storage media
 
B Trees
B TreesB Trees
B Trees
 

Kürzlich hochgeladen

mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 

Kürzlich hochgeladen (20)

mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 

boolean 8051

  • 1.
  • 3. BOOLEAN INSTRUCTIONS This group of instructions is associated with the single-bit operations of the 8051. This group allows manipulating the individual bits of bit addressable registers and memory locations as well as the CY flag. The P, OV, and AC flags cannot be directly altered. This group includes: Set, clear, and, or complement, move. Conditional jumps.
  • 4. CLR <bit> CLR C CLR instruction can operate on the carry flag CLR C The CARRY flag is set to 0 CLR bit CLR instruction can operate on any directly addressable bit CLR P2.7 If Port 2 has been previously written with DCH (11011100), then the operation leaves the port set to 5CH (01011100)
  • 5. SETB <bit> SETB C SETB instruction operates on the carry flag and sets the specified bit to 1 SETB C sets the carry flag to 1 SETB bit SETB instruction operates on any directly-addressable bit and sets the specified bit to 1 SETB P2.0 Port 2 has the value of 24H (00100100), the Port 2 value changes to 25H (00100101)
  • 6. CPL <bit> CPL C This operation complements the carry flag CPL C CPL bit CPL instruction complements any directly addressable Bit CPL P2.2 If Port 2 has the value of 53H (01010011) then after the execution the port set to 55H (01010101)
  • 7. ANL ANL C, <source-bit> This instruction ANDs the bit addressed with the carry bit and stores the result in the carry bit itself ANL C,P2.7 ;AND carry flag with bit 7 of P2 ANL C, /<source-bit> If a slash (/) is used in the source operand bit, the logical complement of the source bit is used, but the source bit itself is not affected ANL C,/OV ;AND with inverse of OV flag
  • 8. ORL ORL C, <source-bit> This instruction ORs the bit addressed with the carry bit and stores the result in the carry bit itself ORL C,P2.5 ;OR carry flag with bit 5 of P2 ORL C, /<source-bit> If a slash (/) is used in the source operand bit, the logical complement of the source bit is used, but the source bit itself is not affected ORL C,/OV ;OR with inverse of OV flag
  • 9. MOV <dest-bit>,<source-bit> One of the operands must be the carry flag; the other may be any directly-addressable bit MOV C,P3.3 MOV P2.0,C If P2=C5H (11000101), P3.3=0 and CY=1 initially, after instructions, P2=C4H (11000100) and CY=0
  • 10. JC / JNC addr Jump to a relative address if CY is set / cleared.
  • 11. JB / JNB <bit>,addr Jump to a relative address if a bit is set / cleared.
  • 12. JBC <bit>,addr Jump to a relative address if a bit is set and clear the bit. JBC P1.3,ARRAY1 If P1=56H (01010110), the above instruction sequence will cause the program to branch to the instruction at ARRAY1, modifying P1 to 52H (01010010)