SlideShare a Scribd company logo
1 of 25
Download to read offline
RISC vs CISC
1
2
3
Architecture
4
Bus Interface Unit (BIU)
BIU fetches instructions, reads data from memory and I/O ports, writes data to
memory and I/ O ports.
Execution Unit (EU)
EU executes instructions that have already been fetched by the BIU.
BIU and EU functions separately.
Register Organization of 8086
5
Architecture
8086 Microprocessor
6
EU
Registers
Accumulator Register (AX)
Consists of two 8-bit registers AL and AH, which can be
combined together and used as a 16-bit register AX.
AL in this case contains the low order byte of the word,
and AH contains the high-order byte.
The I/O instructions use the AX or AL for inputting /
outputting 16 or 8 bit data to or from an I/O port.
Multiplication and Division instructions also use the AX or
AL.
Execution Unit (EU)
Architecture
8086 Microprocessor
7
EU
Registers
Base Register (BX)
Consists of two 8-bit registers BL and BH, which can be
combined together and used as a 16-bit register BX.
BL in this case contains the low-order byte of the word,
and BH contains the high-order byte.
This is the only general purpose register whose contents
can be used for addressing the 8086 memory.
All memory references utilizing this register content for
addressing use DS as the default segment register.
Execution Unit (EU)
Architecture
8086 Microprocessor
8
EU
Registers
Counter Register (CX)
Consists of two 8-bit registers CL and CH, which can be
combined together and used as a 16-bit register CX.
When combined, CL register contains the low order byte of
the word, and CH contains the high-order byte.
Instructions such as SHIFT, ROTATE and LOOP use the
contents of CX as a counter.
Execution Unit (EU)
Example:
The instruction LOOP START automatically decrements
CX by 1 without affecting flags and will check if [CX] =
0.
If it is zero, 8086 executes the next instruction;
otherwise the 8086 branches to the label START.
Architecture
8086 Microprocessor
9
EU
Registers
Execution Unit (EU)
10
11
Architecture
8086 Microprocessor
12
Flag Register
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
OF DF IF TF SF ZF AF PF CF
Carry Flag
This flag is set, when there is a
carry out of MSB in case of
addition or a borrow in case of
subtraction.
Parity Flag
This flag is set to 1, if the lower
byte of the result contains even
number of 1’s ; for odd number
of 1’s set to zero.
Auxiliary Carry Flag
This is set, if there is a carry from the
lowest nibble, i.e, bit three during
addition, or borrow for the lowest nibble,
i.e, bit three, during subtraction.
Zero Flag
This flag is set, if the result of
the computation or comparison
performed by an instruction is
zero
Sign Flag
This flag is set, when the
result of any computation
is negative
Tarp Flag
If this flag is set, the processor enters
the single step execution mode by
generating internal interrupts after
the execution of each instruction
Interrupt Flag
Causes the 8086 to recognize external
mask interrupts; clearing IF disables
these interrupts.
Direction Flag
This is used by string manipulation instructions. If this flag bit is ‘0’, the
string is processed beginning from the lowest address to the highest address,
i.e., auto incrementing mode. Otherwise, the string is processed from the
highest address towards the lowest address, i.e., auto incrementing mode.
Over flow Flag
This flag is set, if an overflow occurs, i.e, if the result of a signed
operation is large enough to accommodate in a destination register. The
result is of more than 7-bits in size in case of 8-bit signed operation and
more than 15-bits in size in case of 16-bit sign operations, then the
overflow will be set.
Execution Unit (EU)
13
Architecture
8086 Microprocessor
Sl.No. Type Register width Name of register
1 General purpose register 16 bit AX, BX, CX, DX
8 bit AL, AH, BL, BH, CL, CH, DL, DH
2 Pointer register 16 bit SP, BP
3 Index register 16 bit SI, DI
4 Instruction Pointer 16 bit IP
5 Segment register 16 bit CS, DS, SS, ES
6 Flag (PSW) 16 bit Flag register
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
OF DF IF TF SF ZF AF PF CF
14
Architecture
8086 Microprocessor
Register Name of the Register Special Function
AX 16-bit Accumulator Stores the 16-bit results of arithmetic and logic operations
AL 8-bit Accumulator Stores the 8-bit results of arithmetic and logic operations
BX Base register Used to hold base value in base addressing mode to access
memory data
CX Count Register Used to hold the count value in SHIFT, ROTATE and LOOP
instructions
DX Data Register Used to hold data for multiplication and division operations
SP Stack Pointer Used to hold the offset address of top stack memory
BP Base Pointer Used to hold the base value in base addressing using SS register to
access data from stack memory
SI Source Index Used to hold index value of source operand (data) for string
instructions
DI Data Index Used to hold the index value of destination operand (data) for
string operations
Registers and Special Functions
Types of addressing mode in 8086
1. Immediate addressing mode
2. Direct addressing mode
3. Register addressing mode
4. Register Indirect addressing mode
5. Indexed addressing mode
6. Register relative addressing mode
7. Base plus index addressing mode
8. Base relative plus index addressing mode
1: Immediate addressing mode
• In this type of mode, immediate data is part of instruction
and appears in the form of successive byte or bytes
MOV AX,10ABH
AX
10 ABH
2: Direct addressing mode
• In this type of addressing mode a 16-
bit memory address is directly specified
in the instruction as a part of it.
MOV AX,[5000H]
AX
Memory
5000
5001
5002
22
33
22
33
3: Register addressing mode
• In this type of addressing mode, the data is
stored in the register and it can be a 8-bit or
16-bit register. All the registers, except IP, may
be used in this mode.
MOV AL,BLH
MOV AX,BXH
AH AL
AX
FF 33
BX
10 AB
BH BL
10 AB
4: Register Indirect addressing
mode
• The address of the memory location which contains data or
operand is determined in a indirect way, using the offset
register.
MOV AX,[BX]
Memory
5000
5001
5002
22
50 00
AX
BX
33
22
33
Reflection Spot
Q) Which addressing does instruction above belong,
and why?
MOV [7000H],CX
Reflection Spot
Q) Which addressing does instruction above
belonging and why?
MOV [7000H],CX
Memory
7000
7001
7002
22
CX
33
Ans) Direct addressing mode
43 56
43 56
5: Indexed addressing mode
• In this addressing mode, offset of the operand is stored in
one of the index registers. DS is the default segment for
index register SI and DI.
MOV AX,[SI]
Memory
5000
5001
5002
22
50 00
AX
SI
33
22
33
6: Register relative addressing mode
• In this mode, the data is available at an effective address
formed by adding an 8-bit or 16-bit displacement with the
content of any one of the registers BX, BP, SI and DI in the
default (either DS or ES) segment.
MOV AX, 50H[BX]
Memory
5051
5052
5053
44
50 00
AX
BX
33
Offset
+ 50H = 5050H
Final
Index
Address
44
33
7: Base plus index addressing mode
• In this mode the effective address is formed by adding
content of a base register (any one of BX or BP) to the
content of an index register (SI or DI). Default segment
register DS.
MOV AX, [BX] [SI]
3000
3001
3002
10 00
AX
BX
= 3000H
Final
Index
Address
20 00
SI
+
12
34
12
34
8: Base relative plus index addressing mode
• In the effective address is formed by adding an 8 or 16-bit
displacement with sum of contents of any one of the base
registers (BX or BP) and any one of the index registers, in a
default segment.
MOV AX,50H[BX][SI]
3050
3051
3052
10 00
AX
BX
= 3050H
Final
Index
Address
20 00
SI
12
50H +
34
12
34

More Related Content

Similar to 8086 Register organization and Architecture details

physical_address segmentation.pdf
physical_address segmentation.pdfphysical_address segmentation.pdf
physical_address segmentation.pdfSwapnil511014
 
Microprocessor if deptt- 17th september 2021 (2)
Microprocessor if deptt- 17th september 2021 (2)Microprocessor if deptt- 17th september 2021 (2)
Microprocessor if deptt- 17th september 2021 (2)AISSMS
 
SAURABH MITRA-8086 MICROPROCESSOR
SAURABH MITRA-8086 MICROPROCESSORSAURABH MITRA-8086 MICROPROCESSOR
SAURABH MITRA-8086 MICROPROCESSORSAURABH MITRA
 
26677766 8086-microprocessor-architecture
26677766 8086-microprocessor-architecture26677766 8086-microprocessor-architecture
26677766 8086-microprocessor-architectureSaurabh Jain
 
31. 8086 addressing modes
31. 8086 addressing modes31. 8086 addressing modes
31. 8086 addressing modessandip das
 
digital communication,micro processor,pulse and digital circuits
digital communication,micro processor,pulse and digital circuitsdigital communication,micro processor,pulse and digital circuits
digital communication,micro processor,pulse and digital circuitsManasa Mona
 
8086 Microprocessor
8086 Microprocessor 8086 Microprocessor
8086 Microprocessor Vijay Kumar
 
8086 Architecture ppt.pdf
8086 Architecture ppt.pdf8086 Architecture ppt.pdf
8086 Architecture ppt.pdfUmamaheswariV4
 
8086microprocessor 130821100244-phpapp02
8086microprocessor 130821100244-phpapp028086microprocessor 130821100244-phpapp02
8086microprocessor 130821100244-phpapp02raone1989
 
8086microprocessor 130821100244-phpapp02
8086microprocessor 130821100244-phpapp028086microprocessor 130821100244-phpapp02
8086microprocessor 130821100244-phpapp02raone1989
 
8086microprocessor 130821100244-phpapp02
8086microprocessor 130821100244-phpapp028086microprocessor 130821100244-phpapp02
8086microprocessor 130821100244-phpapp02Murad Mondol
 
8086microprocessor 130821100244-phpapp02
8086microprocessor 130821100244-phpapp028086microprocessor 130821100244-phpapp02
8086microprocessor 130821100244-phpapp02raone1989
 
INTEL 8086 MICROPROCESSOR
INTEL 8086 MICROPROCESSORINTEL 8086 MICROPROCESSOR
INTEL 8086 MICROPROCESSORSagar Kuntumal
 

Similar to 8086 Register organization and Architecture details (20)

physical_address segmentation.pdf
physical_address segmentation.pdfphysical_address segmentation.pdf
physical_address segmentation.pdf
 
8086
80868086
8086
 
8086
80868086
8086
 
Microprocessor if deptt- 17th september 2021 (2)
Microprocessor if deptt- 17th september 2021 (2)Microprocessor if deptt- 17th september 2021 (2)
Microprocessor if deptt- 17th september 2021 (2)
 
SAURABH MITRA-8086 MICROPROCESSOR
SAURABH MITRA-8086 MICROPROCESSORSAURABH MITRA-8086 MICROPROCESSOR
SAURABH MITRA-8086 MICROPROCESSOR
 
26677766 8086-microprocessor-architecture
26677766 8086-microprocessor-architecture26677766 8086-microprocessor-architecture
26677766 8086-microprocessor-architecture
 
31. 8086 addressing modes
31. 8086 addressing modes31. 8086 addressing modes
31. 8086 addressing modes
 
8086 microprocessor
8086 microprocessor8086 microprocessor
8086 microprocessor
 
intel 8086 introduction
intel 8086 introductionintel 8086 introduction
intel 8086 introduction
 
8086
8086 8086
8086
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
digital communication,micro processor,pulse and digital circuits
digital communication,micro processor,pulse and digital circuitsdigital communication,micro processor,pulse and digital circuits
digital communication,micro processor,pulse and digital circuits
 
8086 Microprocessor
8086 Microprocessor 8086 Microprocessor
8086 Microprocessor
 
8086 Architecture ppt.pdf
8086 Architecture ppt.pdf8086 Architecture ppt.pdf
8086 Architecture ppt.pdf
 
8086microprocessor 130821100244-phpapp02
8086microprocessor 130821100244-phpapp028086microprocessor 130821100244-phpapp02
8086microprocessor 130821100244-phpapp02
 
8086 micro processor
8086 micro processor8086 micro processor
8086 micro processor
 
8086microprocessor 130821100244-phpapp02
8086microprocessor 130821100244-phpapp028086microprocessor 130821100244-phpapp02
8086microprocessor 130821100244-phpapp02
 
8086microprocessor 130821100244-phpapp02
8086microprocessor 130821100244-phpapp028086microprocessor 130821100244-phpapp02
8086microprocessor 130821100244-phpapp02
 
8086microprocessor 130821100244-phpapp02
8086microprocessor 130821100244-phpapp028086microprocessor 130821100244-phpapp02
8086microprocessor 130821100244-phpapp02
 
INTEL 8086 MICROPROCESSOR
INTEL 8086 MICROPROCESSORINTEL 8086 MICROPROCESSOR
INTEL 8086 MICROPROCESSOR
 

Recently uploaded

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

8086 Register organization and Architecture details

  • 2. 2
  • 4. 4 Bus Interface Unit (BIU) BIU fetches instructions, reads data from memory and I/O ports, writes data to memory and I/ O ports. Execution Unit (EU) EU executes instructions that have already been fetched by the BIU. BIU and EU functions separately.
  • 6. Architecture 8086 Microprocessor 6 EU Registers Accumulator Register (AX) Consists of two 8-bit registers AL and AH, which can be combined together and used as a 16-bit register AX. AL in this case contains the low order byte of the word, and AH contains the high-order byte. The I/O instructions use the AX or AL for inputting / outputting 16 or 8 bit data to or from an I/O port. Multiplication and Division instructions also use the AX or AL. Execution Unit (EU)
  • 7. Architecture 8086 Microprocessor 7 EU Registers Base Register (BX) Consists of two 8-bit registers BL and BH, which can be combined together and used as a 16-bit register BX. BL in this case contains the low-order byte of the word, and BH contains the high-order byte. This is the only general purpose register whose contents can be used for addressing the 8086 memory. All memory references utilizing this register content for addressing use DS as the default segment register. Execution Unit (EU)
  • 8. Architecture 8086 Microprocessor 8 EU Registers Counter Register (CX) Consists of two 8-bit registers CL and CH, which can be combined together and used as a 16-bit register CX. When combined, CL register contains the low order byte of the word, and CH contains the high-order byte. Instructions such as SHIFT, ROTATE and LOOP use the contents of CX as a counter. Execution Unit (EU) Example: The instruction LOOP START automatically decrements CX by 1 without affecting flags and will check if [CX] = 0. If it is zero, 8086 executes the next instruction; otherwise the 8086 branches to the label START.
  • 10. 10
  • 11. 11
  • 12. Architecture 8086 Microprocessor 12 Flag Register 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 OF DF IF TF SF ZF AF PF CF Carry Flag This flag is set, when there is a carry out of MSB in case of addition or a borrow in case of subtraction. Parity Flag This flag is set to 1, if the lower byte of the result contains even number of 1’s ; for odd number of 1’s set to zero. Auxiliary Carry Flag This is set, if there is a carry from the lowest nibble, i.e, bit three during addition, or borrow for the lowest nibble, i.e, bit three, during subtraction. Zero Flag This flag is set, if the result of the computation or comparison performed by an instruction is zero Sign Flag This flag is set, when the result of any computation is negative Tarp Flag If this flag is set, the processor enters the single step execution mode by generating internal interrupts after the execution of each instruction Interrupt Flag Causes the 8086 to recognize external mask interrupts; clearing IF disables these interrupts. Direction Flag This is used by string manipulation instructions. If this flag bit is ‘0’, the string is processed beginning from the lowest address to the highest address, i.e., auto incrementing mode. Otherwise, the string is processed from the highest address towards the lowest address, i.e., auto incrementing mode. Over flow Flag This flag is set, if an overflow occurs, i.e, if the result of a signed operation is large enough to accommodate in a destination register. The result is of more than 7-bits in size in case of 8-bit signed operation and more than 15-bits in size in case of 16-bit sign operations, then the overflow will be set. Execution Unit (EU)
  • 13. 13 Architecture 8086 Microprocessor Sl.No. Type Register width Name of register 1 General purpose register 16 bit AX, BX, CX, DX 8 bit AL, AH, BL, BH, CL, CH, DL, DH 2 Pointer register 16 bit SP, BP 3 Index register 16 bit SI, DI 4 Instruction Pointer 16 bit IP 5 Segment register 16 bit CS, DS, SS, ES 6 Flag (PSW) 16 bit Flag register 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 OF DF IF TF SF ZF AF PF CF
  • 14. 14 Architecture 8086 Microprocessor Register Name of the Register Special Function AX 16-bit Accumulator Stores the 16-bit results of arithmetic and logic operations AL 8-bit Accumulator Stores the 8-bit results of arithmetic and logic operations BX Base register Used to hold base value in base addressing mode to access memory data CX Count Register Used to hold the count value in SHIFT, ROTATE and LOOP instructions DX Data Register Used to hold data for multiplication and division operations SP Stack Pointer Used to hold the offset address of top stack memory BP Base Pointer Used to hold the base value in base addressing using SS register to access data from stack memory SI Source Index Used to hold index value of source operand (data) for string instructions DI Data Index Used to hold the index value of destination operand (data) for string operations Registers and Special Functions
  • 15. Types of addressing mode in 8086 1. Immediate addressing mode 2. Direct addressing mode 3. Register addressing mode 4. Register Indirect addressing mode 5. Indexed addressing mode 6. Register relative addressing mode 7. Base plus index addressing mode 8. Base relative plus index addressing mode
  • 16. 1: Immediate addressing mode • In this type of mode, immediate data is part of instruction and appears in the form of successive byte or bytes MOV AX,10ABH AX 10 ABH
  • 17. 2: Direct addressing mode • In this type of addressing mode a 16- bit memory address is directly specified in the instruction as a part of it. MOV AX,[5000H] AX Memory 5000 5001 5002 22 33 22 33
  • 18. 3: Register addressing mode • In this type of addressing mode, the data is stored in the register and it can be a 8-bit or 16-bit register. All the registers, except IP, may be used in this mode. MOV AL,BLH MOV AX,BXH AH AL AX FF 33 BX 10 AB BH BL 10 AB
  • 19. 4: Register Indirect addressing mode • The address of the memory location which contains data or operand is determined in a indirect way, using the offset register. MOV AX,[BX] Memory 5000 5001 5002 22 50 00 AX BX 33 22 33
  • 20. Reflection Spot Q) Which addressing does instruction above belong, and why? MOV [7000H],CX
  • 21. Reflection Spot Q) Which addressing does instruction above belonging and why? MOV [7000H],CX Memory 7000 7001 7002 22 CX 33 Ans) Direct addressing mode 43 56 43 56
  • 22. 5: Indexed addressing mode • In this addressing mode, offset of the operand is stored in one of the index registers. DS is the default segment for index register SI and DI. MOV AX,[SI] Memory 5000 5001 5002 22 50 00 AX SI 33 22 33
  • 23. 6: Register relative addressing mode • In this mode, the data is available at an effective address formed by adding an 8-bit or 16-bit displacement with the content of any one of the registers BX, BP, SI and DI in the default (either DS or ES) segment. MOV AX, 50H[BX] Memory 5051 5052 5053 44 50 00 AX BX 33 Offset + 50H = 5050H Final Index Address 44 33
  • 24. 7: Base plus index addressing mode • In this mode the effective address is formed by adding content of a base register (any one of BX or BP) to the content of an index register (SI or DI). Default segment register DS. MOV AX, [BX] [SI] 3000 3001 3002 10 00 AX BX = 3000H Final Index Address 20 00 SI + 12 34 12 34
  • 25. 8: Base relative plus index addressing mode • In the effective address is formed by adding an 8 or 16-bit displacement with sum of contents of any one of the base registers (BX or BP) and any one of the index registers, in a default segment. MOV AX,50H[BX][SI] 3050 3051 3052 10 00 AX BX = 3050H Final Index Address 20 00 SI 12 50H + 34 12 34