SlideShare a Scribd company logo
1 of 28
CHAPTER 1
The
Architecture
of
8086
INTRODUCTION
 Need to know the learning of x86 family of
microprocessors
 Understand the architecture of the 8086
 8086 is a processor catering to 16-bit data (D0 to D15) and
having a 20-bit address (A0 to A19)
 8086 is a 16-bit processor internally & externally
 means its data bus width as well as the bit size of its
internal data registers is 16
 it can even access external source 16 bits
 it also has the capacity to access and work on 8-bit data.
BLOCK DIAGRAM
1.3 BUS INTERFACE UNIT
This unit is responsible for
 Address Calculations
 pre-fetching instructions for the queue and sequencing
instructions one by one.
1.3.1 INSTRUCTION QUEUE
 Instructions are found in memory
 From there it has to be fetched & decoded
whenever needed for execution.
 in 8086, the queue that fetches instructions ahead
of execution time & places them in a 6-byte FIFO
queue
 This pre-fetching is done when buses are free
 Advantage of this is when a particular instruction
needs to be executed, it’s a good chance of
finding in a queue rather than from memory
1.3.2 MEMORY SEGMENTATION
 8086 has a 20-Bit address bus ( As we have not seen any
20- Bit regsters so far)
 general-purpose registers are used as 16 or 8 bit registers
 all address registers also are16-bit
 Segmentation will be used to take care of this situation
 A segment is just an area in memory
 so total memory size can be considered to be divided into
segments of various sizes.
 Idea of dividing memory is called Segmentation
 In memory data is stored as bytes
 Each byte has a specific address
 with 20 address lines, the memory that can be addressed is
220 bytes (1,048,576 Bytes or 1 MB)
 8086 can access a physical memory with address ranging
from 00000 to FFFFFH.
 20-bit physical address is to be placed on the address
bus to access any location in memory.
 Memory as a whole is considered to have four different
types of segments:
1. data segment
2. code segment
3. stack segment
4. extra segment
 Idea of segmentation is to keep data & code separately
 code segment contains code only
 data is stored in the data segment
 extra segment is just another type of data segment
used in special way
 stack segment is an area in memory which functions
and is accessed from the other three segments
1.3.2.1 SEGMENT REGISTERS
 Each segments is addressed by an address stored in
corresponding segment registers
 registers are all 16-bit size
 each register stores base address of the corresponding
segment
 Base address is the starting address of a segment
 since segment registers cannot store 20 bits, they store
only the upper 16 bits
 least significant nibble is implied to zero
 How 20 bit physical address obtained if there are only 16
bit registers?
 20 bit address of a byte is called Physical address
 it is specified as Logical address in the form of two16-bit
numbers in the format base address : offset
 Example: Calculation of a physical address from
the logical address for a data segment
 Consider that a data byte is stored in a data segment, whose
base address is 22220H
 Then data segment register will contain the number 2222H.
 The data at any location within this segment is referred to an
offset with respect to the base address.
 If a data at a location has a logical address specified as
2222H:0016H
 Then the number 0016H is the offset or displacement w.r.t the
base address
 For physical address calculation, the BIU appends the
segment register content with four binary zeros on the right.
 Thus physical address is calculated as:
22220H
+ 0016H
22236H
 Similar in case for the other segments
 offsets are limited to 16Bits
 means that the maximum size possible for a segment is
only 216 or 64KB
 Hence every memory reference by the 8086 will use one of
the segment registers (i.e DS, ES, SS, or CS)
 combined to form an offset to determine the physical
address being accessed.
 Fig that highlights a data byte that has the logical address
of the form DS: Offset.
 Code segment is the area of memory where code alone is
stored.
 offsets in the code segment are referenced by Instruction
Pointer. ( a 16-Bit register)
 IP sequences the instructions and points to the next
instruction to be executed.
 If an instruction byte has to be fetched from memory, the
bus interface unit performs the address calculation using
the contents of CS registers & the IP
 This 20-bit address is then placed on the address bus and
the instruction byte is fetched.
 Hence the logical address for an instruction is of the form
CS:IP
1.3.2.2 CODE SEGMENT & INSTRUCTION POINTER
 Stack is an area in memory and data is generally pushed &
popped out of the stack
 8086 also uses LIFO stack
 There is a 16-Bit register called Stack Pointer, which points
to the top of the stack
 Stack segment is like other segment
 upper 16 bits of its base address is available in the SS
register
 A stack address of the form 4466H: 0122H means that the
SS register contains 4466H
 stack pointer contains the number 0122H
 So the physical address of the top of the stack is
44660H + 0122H = 44782H
1.3.2.3 STACK SEGMENT AND STACK POINTER
 Both segments store data
 Extra segment register to store the upper 16 bits of
the base address of the extra segment.
 offset within the data segment is also termed as ‘
effective address’
 effective address calculations depends on effect of
mode of answering.
 Table shows the segment registers and the
corresponding registers that can be used for offsets
1.3.2.4 DATA SEGMENT AND EXTRA SEGMENT
ADVANTAGES OF SEGMENTATION
 All address registers are only 16 bit long, though the
physical address is 20 bits
 All address are re-locatable
 Memory organization in little-endian format
 In order for computations in assembly language, we need
an Opcode & Operands
 Opcode stands for Operation Code
 Opcode specifies the operation to be performed
 Opcodes operate on data, which are called the Operands
 The way in which operands are specified in an assembly
language is called its “Addressing Mode”.
 Operands can be in registers, in memory or may be in the
instruction itself.
 in case of two operands, one of them can be in memory,
but the other will have to be placed in a register
 data types should match, that is, source, and destination
should both be either bytes or words
1.4 ADDRESSING MODES
 Here both source and destination are registers. No memory
access are involved.
MOV AL, AH ; copy the content of AH to AL
MOV CH, BL ; copy the content of BL to CH
MOV SI, BX ; copy the content of BX to SI
MOV ES,AX ; copy the content of AX to ES
Note that the first two are byte operations, while the other
two are word operations.
MOV AX, BL ; gives error as AX is 16 bit & BL is 8 bit
MOV BL, AX ; gives an error for the same reasons
1.4.1 REGISTER ADDRESSING
 Here source will be a constant data
MOV AL, 45H ; copy 45H to AL
MOV BX, 34E3H ; move the hex number 34E3H to BX
MOV CL.’Q’ ; move the ASCII value of Q to CL
MOV PRICE,40 ; move the hex num 40 to the memory
location with the label PRICE
MOV NUMS, 0FC6H ; move the hex number 0FC6H to
the memory location NUMS
 Segment registers are not allowed to use this mode of
addressing
MOV DS,2300H ; gives an error as DS is a segment
register
1.4.2 IMMEDIATE ADDRESSING
 Here, either the source or the destination will be a memory address
MOV AX, [2345H] ; move word location 2345H to AX
MOV [1089H], AL ; the byte in AL is moved to location 1086H
 MOV AX , PRICE
 MOV COST,AL
PRICE and COST are labels for memory addresses
1.4.3 DIRECT ADDRESSING
1.4.4REGISTER INDIRECT ADDRESSING
 In this mode , the address of the data is held in a register
 Effective address
 EA=EA= { [BX] / [DI] /[SI]}
 MOV AL,[BX] ; move into AL the content of the location
whose address is in BX
 MOV [SI], CL ;move the content of CL to the address
pointed by SI
 MOV [DI],AX ; move the content of AX to the address
pointed by DI
 In third instruction, AX contains two bytes, so the content
of AL will be moved to the address pointed by DI.
 The content of AH will be moved to the address [D+1]
 Show the location of data in memory, after the
execution of each of these instructions , if the
content of registers are as given
DS= 1112H , AX= EE78H and BX=3400H
MOV [0422H], AL
MOV [0424H],AX
MOV [BX] ,AX
EXAMPLE
1.4.5 REGISTER RELATIVE ADDRESSING
 In relative addressing mode , a number or
displacement is part of the effective address
 EA ={[BX] /[DI] /[SI] /[BP]} + 8 bit or 16 bit displacement
 The displacement can be a 16 bit signed/unsigned
number or an 8 bit sign extended number.
 MOV CL ,10[BX] ; move the content of the address
specified by adding the content of BX and 10
 Like
 MOV CL, [BX+10]
 MOV CL, [BX]+10
1.4.6 BASED INDEXED MODE
 In this mode ,an index register and a base register
together carry the effective address .
 The content of these two registers are added and called
the effective address.
 MOV AL,[BX][SI] ; move the content of the effective
address pointed by [BX] and [SI] into AL
 MOV [BX][DI],CX ;move the content of CX to the effective
address pointed by [BX] and [SI]
1.4.7 RELATIVE BASED INDEXED MODE
 The ‘effective address is the sum of the two registers
and a displacement .
 MOV DL ,5[BX][DI]
 MOV 5[BP][SI], AX
 MOV CL ,COST[BX[[SI]
EXAMPLE
 Find the address of physical memory for the
following instructions if the content of the
required registers are as given below
SS =2344 H, DS =4022H ,
BX =0200H,BP=1402H ,SI=4442H
i)MOV CL,1234H[SI]
i)MOV AL,5[SI[[BP]
EFFECTIVE ADDRESS AND REFERRED SEGMENTS
FOR VARIOUS MEMORY BASED ADDRESSING MODES

More Related Content

What's hot

Computer architecture input output organization
Computer architecture input output organizationComputer architecture input output organization
Computer architecture input output organizationMazin Alwaaly
 
8086 pin diagram description
8086 pin diagram description8086 pin diagram description
8086 pin diagram descriptionAkhil Singal
 
Microprocessor 8086 instruction description
Microprocessor 8086 instruction descriptionMicroprocessor 8086 instruction description
Microprocessor 8086 instruction descriptionDheeraj Suri
 
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMINGChapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMINGFrankie Jones
 
Memory Segmentation of 8086
Memory Segmentation of 8086Memory Segmentation of 8086
Memory Segmentation of 8086Nikhil Kumar
 
Looping statements in C
Looping statements in CLooping statements in C
Looping statements in CJeya Lakshmi
 
Functions and tasks in verilog
Functions and tasks in verilogFunctions and tasks in verilog
Functions and tasks in verilogNallapati Anindra
 
Managing input and output operation in c
Managing input and output operation in cManaging input and output operation in c
Managing input and output operation in cyazad dumasia
 
2. 8085-Microprocessor.pptx
2. 8085-Microprocessor.pptx2. 8085-Microprocessor.pptx
2. 8085-Microprocessor.pptxISMT College
 
8086 modes
8086 modes8086 modes
8086 modesPDFSHARE
 
Instruction set-of-8085
Instruction set-of-8085Instruction set-of-8085
Instruction set-of-8085saleForce
 
8086 microprocessor-architecture
8086 microprocessor-architecture8086 microprocessor-architecture
8086 microprocessor-architectureprasadpawaskar
 
Direct memory access (dma) with 8257 DMA Controller
Direct memory access (dma) with 8257 DMA ControllerDirect memory access (dma) with 8257 DMA Controller
Direct memory access (dma) with 8257 DMA ControllerMuhammed Afsal Villan
 
Memory reference instruction
Memory reference instructionMemory reference instruction
Memory reference instructionSanjeev Patel
 

What's hot (20)

Computer architecture input output organization
Computer architecture input output organizationComputer architecture input output organization
Computer architecture input output organization
 
8086 pin diagram description
8086 pin diagram description8086 pin diagram description
8086 pin diagram description
 
Microprocessor 8086 instruction description
Microprocessor 8086 instruction descriptionMicroprocessor 8086 instruction description
Microprocessor 8086 instruction description
 
Memory System
Memory SystemMemory System
Memory System
 
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMINGChapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
 
8086 new
8086 new8086 new
8086 new
 
Memory Segmentation of 8086
Memory Segmentation of 8086Memory Segmentation of 8086
Memory Segmentation of 8086
 
8085
80858085
8085
 
Looping statements in C
Looping statements in CLooping statements in C
Looping statements in C
 
Functions and tasks in verilog
Functions and tasks in verilogFunctions and tasks in verilog
Functions and tasks in verilog
 
Managing input and output operation in c
Managing input and output operation in cManaging input and output operation in c
Managing input and output operation in c
 
2. 8085-Microprocessor.pptx
2. 8085-Microprocessor.pptx2. 8085-Microprocessor.pptx
2. 8085-Microprocessor.pptx
 
8086 modes
8086 modes8086 modes
8086 modes
 
Instruction set-of-8085
Instruction set-of-8085Instruction set-of-8085
Instruction set-of-8085
 
8086 microprocessor-architecture
8086 microprocessor-architecture8086 microprocessor-architecture
8086 microprocessor-architecture
 
Direct memory access (dma) with 8257 DMA Controller
Direct memory access (dma) with 8257 DMA ControllerDirect memory access (dma) with 8257 DMA Controller
Direct memory access (dma) with 8257 DMA Controller
 
Microprocessor 8086
Microprocessor 8086Microprocessor 8086
Microprocessor 8086
 
8086 architecture By Er. Swapnil Kaware
8086 architecture By Er. Swapnil Kaware8086 architecture By Er. Swapnil Kaware
8086 architecture By Er. Swapnil Kaware
 
Memory reference instruction
Memory reference instructionMemory reference instruction
Memory reference instruction
 
Dynamic Memory Allocation in C
Dynamic Memory Allocation in CDynamic Memory Allocation in C
Dynamic Memory Allocation in C
 

Similar to Architecture of the 8086 Microprocessor

address5ng modes.pptx IS A GOOD MATERIAL
address5ng  modes.pptx IS A GOOD MATERIALaddress5ng  modes.pptx IS A GOOD MATERIAL
address5ng modes.pptx IS A GOOD MATERIALDrkoteswararaoseelam
 
Lecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptx
Lecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptxLecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptx
Lecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptxVikasMahor3
 
8086 instruction set (with simulator)
8086 instruction set (with simulator)8086 instruction set (with simulator)
8086 instruction set (with simulator)Aswini Dharmaraj
 
Mastering Assembly Language: Programming with 8086
Mastering Assembly Language: Programming with 8086Mastering Assembly Language: Programming with 8086
Mastering Assembly Language: Programming with 8086sravanithonta79
 
Lecture 9 examples (1)
Lecture 9 examples (1)Lecture 9 examples (1)
Lecture 9 examples (1)talhashahid40
 
introduction to Architecture of 8086 and it's application
introduction to Architecture of 8086 and it's applicationintroduction to Architecture of 8086 and it's application
introduction to Architecture of 8086 and it's applicationDrVikasMahor
 
8086 microprocessor pptx JNTUH ece 3rd year
8086 microprocessor pptx JNTUH ece 3rd year8086 microprocessor pptx JNTUH ece 3rd year
8086 microprocessor pptx JNTUH ece 3rd yearBharghavteja1
 
Notes 8086 instruction format
Notes 8086 instruction formatNotes 8086 instruction format
Notes 8086 instruction formatHarshitParkar6677
 
SAURABH MITRA-8086 MICROPROCESSOR
SAURABH MITRA-8086 MICROPROCESSORSAURABH MITRA-8086 MICROPROCESSOR
SAURABH MITRA-8086 MICROPROCESSORSAURABH MITRA
 
Microprocessor.pdf
Microprocessor.pdfMicroprocessor.pdf
Microprocessor.pdfpradipsaha77
 
8086addressingmodes-200319141110.pdf
8086addressingmodes-200319141110.pdf8086addressingmodes-200319141110.pdf
8086addressingmodes-200319141110.pdfTanmoyMondal89
 
31. 8086 addressing modes
31. 8086 addressing modes31. 8086 addressing modes
31. 8086 addressing modessandip das
 
02 Addressing Modes.pptx
02 Addressing Modes.pptx02 Addressing Modes.pptx
02 Addressing Modes.pptxssuser586772
 
8086 Register organization and Architecture details
8086 Register organization and Architecture details8086 Register organization and Architecture details
8086 Register organization and Architecture detailsMahendraMunirathnam1
 
Introduction of 8086 micro processor .
Introduction of 8086 micro processor .Introduction of 8086 micro processor .
Introduction of 8086 micro processor .Siraj Ahmed
 
physical_address segmentation.pdf
physical_address segmentation.pdfphysical_address segmentation.pdf
physical_address segmentation.pdfSwapnil511014
 

Similar to Architecture of the 8086 Microprocessor (20)

address5ng modes.pptx IS A GOOD MATERIAL
address5ng  modes.pptx IS A GOOD MATERIALaddress5ng  modes.pptx IS A GOOD MATERIAL
address5ng modes.pptx IS A GOOD MATERIAL
 
Lecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptx
Lecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptxLecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptx
Lecture 28 , 29 & 30(instruction set & addressing mode of 8086.pptx
 
8086 instruction set (with simulator)
8086 instruction set (with simulator)8086 instruction set (with simulator)
8086 instruction set (with simulator)
 
Mastering Assembly Language: Programming with 8086
Mastering Assembly Language: Programming with 8086Mastering Assembly Language: Programming with 8086
Mastering Assembly Language: Programming with 8086
 
Lecture 9 examples (1)
Lecture 9 examples (1)Lecture 9 examples (1)
Lecture 9 examples (1)
 
introduction to Architecture of 8086 and it's application
introduction to Architecture of 8086 and it's applicationintroduction to Architecture of 8086 and it's application
introduction to Architecture of 8086 and it's application
 
8086 microprocessor pptx JNTUH ece 3rd year
8086 microprocessor pptx JNTUH ece 3rd year8086 microprocessor pptx JNTUH ece 3rd year
8086 microprocessor pptx JNTUH ece 3rd year
 
Notes 8086 instruction format
Notes 8086 instruction formatNotes 8086 instruction format
Notes 8086 instruction format
 
SAURABH MITRA-8086 MICROPROCESSOR
SAURABH MITRA-8086 MICROPROCESSORSAURABH MITRA-8086 MICROPROCESSOR
SAURABH MITRA-8086 MICROPROCESSOR
 
Microprocessor.pdf
Microprocessor.pdfMicroprocessor.pdf
Microprocessor.pdf
 
8086addressingmodes-200319141110.pdf
8086addressingmodes-200319141110.pdf8086addressingmodes-200319141110.pdf
8086addressingmodes-200319141110.pdf
 
8086 addressing modes
8086 addressing modes8086 addressing modes
8086 addressing modes
 
31. 8086 addressing modes
31. 8086 addressing modes31. 8086 addressing modes
31. 8086 addressing modes
 
02 Addressing Modes.pptx
02 Addressing Modes.pptx02 Addressing Modes.pptx
02 Addressing Modes.pptx
 
8086 Register organization and Architecture details
8086 Register organization and Architecture details8086 Register organization and Architecture details
8086 Register organization and Architecture details
 
Introduction of 8086 micro processor .
Introduction of 8086 micro processor .Introduction of 8086 micro processor .
Introduction of 8086 micro processor .
 
physical_address segmentation.pdf
physical_address segmentation.pdfphysical_address segmentation.pdf
physical_address segmentation.pdf
 
8086
80868086
8086
 
8086
80868086
8086
 
The 8086 microprocessor
The  8086 microprocessorThe  8086 microprocessor
The 8086 microprocessor
 

More from SHREEHARI WADAWADAGI

More from SHREEHARI WADAWADAGI (17)

Chapter 15 software product metrics
Chapter 15 software product metricsChapter 15 software product metrics
Chapter 15 software product metrics
 
Chapter 14 software testing techniques
Chapter 14 software testing techniquesChapter 14 software testing techniques
Chapter 14 software testing techniques
 
Chapter 13 software testing strategies
Chapter 13 software testing strategiesChapter 13 software testing strategies
Chapter 13 software testing strategies
 
Chapter 12 user interface design
Chapter 12 user interface designChapter 12 user interface design
Chapter 12 user interface design
 
Chapter 21 project management concepts
Chapter 21 project management conceptsChapter 21 project management concepts
Chapter 21 project management concepts
 
Ch 11-component-level-design
Ch 11-component-level-designCh 11-component-level-design
Ch 11-component-level-design
 
Ch 9-design-engineering
Ch 9-design-engineeringCh 9-design-engineering
Ch 9-design-engineering
 
An introduction to software engineering
An introduction to software engineeringAn introduction to software engineering
An introduction to software engineering
 
Architectural design
Architectural designArchitectural design
Architectural design
 
Chapter 5 programming concepts iv
Chapter 5  programming concepts ivChapter 5  programming concepts iv
Chapter 5 programming concepts iv
 
Chapter 4 programming concepts III
Chapter 4  programming concepts IIIChapter 4  programming concepts III
Chapter 4 programming concepts III
 
Brief description of all the interupts
Brief description of all the interuptsBrief description of all the interupts
Brief description of all the interupts
 
Chapter 7 memory & i/o
Chapter 7  memory & i/oChapter 7  memory & i/o
Chapter 7 memory & i/o
 
Chapter 6 hardware structure of 8086
Chapter 6  hardware structure of 8086Chapter 6  hardware structure of 8086
Chapter 6 hardware structure of 8086
 
Chapter 3 programming concepts-ii
Chapter 3  programming concepts-iiChapter 3  programming concepts-ii
Chapter 3 programming concepts-ii
 
Arm processor
Arm processorArm processor
Arm processor
 
8086 complete guide
8086 complete guide 8086 complete guide
8086 complete guide
 

Recently uploaded

Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncssuser2ae721
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleAlluxio, Inc.
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 

Recently uploaded (20)

Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at Scale
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 

Architecture of the 8086 Microprocessor

  • 2. INTRODUCTION  Need to know the learning of x86 family of microprocessors  Understand the architecture of the 8086  8086 is a processor catering to 16-bit data (D0 to D15) and having a 20-bit address (A0 to A19)  8086 is a 16-bit processor internally & externally  means its data bus width as well as the bit size of its internal data registers is 16  it can even access external source 16 bits  it also has the capacity to access and work on 8-bit data.
  • 4.
  • 5. 1.3 BUS INTERFACE UNIT This unit is responsible for  Address Calculations  pre-fetching instructions for the queue and sequencing instructions one by one.
  • 6. 1.3.1 INSTRUCTION QUEUE  Instructions are found in memory  From there it has to be fetched & decoded whenever needed for execution.  in 8086, the queue that fetches instructions ahead of execution time & places them in a 6-byte FIFO queue  This pre-fetching is done when buses are free  Advantage of this is when a particular instruction needs to be executed, it’s a good chance of finding in a queue rather than from memory
  • 7. 1.3.2 MEMORY SEGMENTATION  8086 has a 20-Bit address bus ( As we have not seen any 20- Bit regsters so far)  general-purpose registers are used as 16 or 8 bit registers  all address registers also are16-bit  Segmentation will be used to take care of this situation  A segment is just an area in memory  so total memory size can be considered to be divided into segments of various sizes.  Idea of dividing memory is called Segmentation  In memory data is stored as bytes  Each byte has a specific address  with 20 address lines, the memory that can be addressed is 220 bytes (1,048,576 Bytes or 1 MB)  8086 can access a physical memory with address ranging from 00000 to FFFFFH.
  • 8.  20-bit physical address is to be placed on the address bus to access any location in memory.  Memory as a whole is considered to have four different types of segments: 1. data segment 2. code segment 3. stack segment 4. extra segment  Idea of segmentation is to keep data & code separately  code segment contains code only  data is stored in the data segment  extra segment is just another type of data segment used in special way  stack segment is an area in memory which functions and is accessed from the other three segments
  • 9. 1.3.2.1 SEGMENT REGISTERS  Each segments is addressed by an address stored in corresponding segment registers  registers are all 16-bit size  each register stores base address of the corresponding segment  Base address is the starting address of a segment  since segment registers cannot store 20 bits, they store only the upper 16 bits  least significant nibble is implied to zero  How 20 bit physical address obtained if there are only 16 bit registers?  20 bit address of a byte is called Physical address  it is specified as Logical address in the form of two16-bit numbers in the format base address : offset
  • 10.  Example: Calculation of a physical address from the logical address for a data segment
  • 11.  Consider that a data byte is stored in a data segment, whose base address is 22220H  Then data segment register will contain the number 2222H.  The data at any location within this segment is referred to an offset with respect to the base address.  If a data at a location has a logical address specified as 2222H:0016H  Then the number 0016H is the offset or displacement w.r.t the base address  For physical address calculation, the BIU appends the segment register content with four binary zeros on the right.  Thus physical address is calculated as: 22220H + 0016H 22236H
  • 12.  Similar in case for the other segments  offsets are limited to 16Bits  means that the maximum size possible for a segment is only 216 or 64KB  Hence every memory reference by the 8086 will use one of the segment registers (i.e DS, ES, SS, or CS)  combined to form an offset to determine the physical address being accessed.  Fig that highlights a data byte that has the logical address of the form DS: Offset.
  • 13.  Code segment is the area of memory where code alone is stored.  offsets in the code segment are referenced by Instruction Pointer. ( a 16-Bit register)  IP sequences the instructions and points to the next instruction to be executed.  If an instruction byte has to be fetched from memory, the bus interface unit performs the address calculation using the contents of CS registers & the IP  This 20-bit address is then placed on the address bus and the instruction byte is fetched.  Hence the logical address for an instruction is of the form CS:IP 1.3.2.2 CODE SEGMENT & INSTRUCTION POINTER
  • 14.  Stack is an area in memory and data is generally pushed & popped out of the stack  8086 also uses LIFO stack  There is a 16-Bit register called Stack Pointer, which points to the top of the stack  Stack segment is like other segment  upper 16 bits of its base address is available in the SS register  A stack address of the form 4466H: 0122H means that the SS register contains 4466H  stack pointer contains the number 0122H  So the physical address of the top of the stack is 44660H + 0122H = 44782H 1.3.2.3 STACK SEGMENT AND STACK POINTER
  • 15.
  • 16.  Both segments store data  Extra segment register to store the upper 16 bits of the base address of the extra segment.  offset within the data segment is also termed as ‘ effective address’  effective address calculations depends on effect of mode of answering.  Table shows the segment registers and the corresponding registers that can be used for offsets 1.3.2.4 DATA SEGMENT AND EXTRA SEGMENT
  • 17. ADVANTAGES OF SEGMENTATION  All address registers are only 16 bit long, though the physical address is 20 bits  All address are re-locatable  Memory organization in little-endian format
  • 18.  In order for computations in assembly language, we need an Opcode & Operands  Opcode stands for Operation Code  Opcode specifies the operation to be performed  Opcodes operate on data, which are called the Operands  The way in which operands are specified in an assembly language is called its “Addressing Mode”.  Operands can be in registers, in memory or may be in the instruction itself.  in case of two operands, one of them can be in memory, but the other will have to be placed in a register  data types should match, that is, source, and destination should both be either bytes or words 1.4 ADDRESSING MODES
  • 19.  Here both source and destination are registers. No memory access are involved. MOV AL, AH ; copy the content of AH to AL MOV CH, BL ; copy the content of BL to CH MOV SI, BX ; copy the content of BX to SI MOV ES,AX ; copy the content of AX to ES Note that the first two are byte operations, while the other two are word operations. MOV AX, BL ; gives error as AX is 16 bit & BL is 8 bit MOV BL, AX ; gives an error for the same reasons 1.4.1 REGISTER ADDRESSING
  • 20.  Here source will be a constant data MOV AL, 45H ; copy 45H to AL MOV BX, 34E3H ; move the hex number 34E3H to BX MOV CL.’Q’ ; move the ASCII value of Q to CL MOV PRICE,40 ; move the hex num 40 to the memory location with the label PRICE MOV NUMS, 0FC6H ; move the hex number 0FC6H to the memory location NUMS  Segment registers are not allowed to use this mode of addressing MOV DS,2300H ; gives an error as DS is a segment register 1.4.2 IMMEDIATE ADDRESSING
  • 21.  Here, either the source or the destination will be a memory address MOV AX, [2345H] ; move word location 2345H to AX MOV [1089H], AL ; the byte in AL is moved to location 1086H  MOV AX , PRICE  MOV COST,AL PRICE and COST are labels for memory addresses 1.4.3 DIRECT ADDRESSING
  • 22. 1.4.4REGISTER INDIRECT ADDRESSING  In this mode , the address of the data is held in a register  Effective address  EA=EA= { [BX] / [DI] /[SI]}  MOV AL,[BX] ; move into AL the content of the location whose address is in BX  MOV [SI], CL ;move the content of CL to the address pointed by SI  MOV [DI],AX ; move the content of AX to the address pointed by DI  In third instruction, AX contains two bytes, so the content of AL will be moved to the address pointed by DI.  The content of AH will be moved to the address [D+1]
  • 23.  Show the location of data in memory, after the execution of each of these instructions , if the content of registers are as given DS= 1112H , AX= EE78H and BX=3400H MOV [0422H], AL MOV [0424H],AX MOV [BX] ,AX EXAMPLE
  • 24. 1.4.5 REGISTER RELATIVE ADDRESSING  In relative addressing mode , a number or displacement is part of the effective address  EA ={[BX] /[DI] /[SI] /[BP]} + 8 bit or 16 bit displacement  The displacement can be a 16 bit signed/unsigned number or an 8 bit sign extended number.  MOV CL ,10[BX] ; move the content of the address specified by adding the content of BX and 10  Like  MOV CL, [BX+10]  MOV CL, [BX]+10
  • 25. 1.4.6 BASED INDEXED MODE  In this mode ,an index register and a base register together carry the effective address .  The content of these two registers are added and called the effective address.  MOV AL,[BX][SI] ; move the content of the effective address pointed by [BX] and [SI] into AL  MOV [BX][DI],CX ;move the content of CX to the effective address pointed by [BX] and [SI]
  • 26. 1.4.7 RELATIVE BASED INDEXED MODE  The ‘effective address is the sum of the two registers and a displacement .  MOV DL ,5[BX][DI]  MOV 5[BP][SI], AX  MOV CL ,COST[BX[[SI]
  • 27. EXAMPLE  Find the address of physical memory for the following instructions if the content of the required registers are as given below SS =2344 H, DS =4022H , BX =0200H,BP=1402H ,SI=4442H i)MOV CL,1234H[SI] i)MOV AL,5[SI[[BP]
  • 28. EFFECTIVE ADDRESS AND REFERRED SEGMENTS FOR VARIOUS MEMORY BASED ADDRESSING MODES