SlideShare a Scribd company logo
1 of 24
“Processor Architecture &
Interfacing”
Unit I – 80386 Real Mode Details
Sinhgad Technical Education Society
Sinhgad Collge of Engineering
Mr. M V Nimbalkar
Department of Information Technology
Unit 1 Syllabus – Lecture wise
Lecture No Topics to be covered
1 Introduction to assembly language programming
2 ALP tools- Assembler, Linker, Loader, Debugger,
Emulator, Assembler directives, Far and near
procedure, Macros
3 DOS Internals, DOS Calls.
4 80386 - Features and Architecture, Register Set, Real
mode segmentation and Address translation
5 80386 - Addressing modes
6 - 8 80386 - Instruction set.
3
80x86 Family of Processors Summarization
Comparison of 8086 with 80386
Sr.
no.
8086 80386
1 8086 is 16 bit processor. 30386 is 32 bit processor
2 16 bit data bus and 20 bit address bus 32bit data and address bus.
3 Instruction set is subset of 80386. Instruction set is superset of 8086.
4 Two operating modes maximum and
minimum.
Three operating modes real,
protected and virtual 8086 mode.
5 Memory Addressing Capacity – 1 MB Memory Addressing Capacity – 4 GB
6 Multitasking is not possible Multitasking is possible.
7 Protection feature is not available in
8086
Protection feature is available in
80386.
8 Paging is not available. Paging is available.
9 Less addressing modes are available. More addressing modes are
available.
4
80386 Features
• Two versions 80386DX & 80386SX
• It has 132-pins Pin Grid Array package.
• True 32 bit processor with Data bus, Address bus & ALU bus size = 32
bits.
• 4GB (Gigabyte) of Physical memory.
• It has 64TB (Terabyte) of Virtual memory.
• Maximum size of each segment is 4 GB (Gigabyte).
• It is operated with a frequency of 16MHz-33MHz.
• It can handle 8/16/32-bit data types.
• It has 16 byte prefetch queue.
• The integrated memory management and protection architecture
• Pipelined Architecture with 6 units operating simultaneously
• Instruction pipelining, Integrated support for Multitasking
• Three operating modes – Real, Protected & Virtual 8086
5
80386 Architecture
6
Fig. 1. Architecture of 80386
Architecture of 80386
The architecture of 80386DX consists of three functional units:
A] Central Processing Unit.
B] Memory Management Unit.
C] Bus Interface Unit.
A] Central Processing Unit:
Central processing unit is responsible for handling all instructions it receives
from hardware. Central processing unit consists of :
1. Instruction Decoder.
2. Execution Unit.
1. Instruction Decoder:
The instruction decoder unit takes instruction bytes from the code prefetch
queue and translates them into microcode. The decoded instructions are
then stored in the instruction queue. They are passed to the control section
for deriving the necessary control signals.
2. Execution Unit:
Execution unit reads instruction from instruction queue and execute it.
80386 Architecture Functional Units
For executing an instruction execution unit has three subunits:
a. Data unit,
b. Control unit
c. Test protection unit
a. Data Unit:
Data unit is responsible for performing different operations on data. It is
divided into three units:
I. Barrel Shifter Adder Unit.
II. Multiply/Divide Unit.
III. Register file.
i. Barrel Shifter Unit:
64-bit barrel shifter used to shift, rotate operations.
ii. Multiply/Divide Unit:
The multiply and divide logic uses a 1-bit per cycle algorithm. The multiply
algorithm stops the iteration when the most significant bits of multiplier
are all zero.
iii. Register File:
Register file contains the eight 32-bit general purpose register which are
used for both address calculation and data operations. It is used to hold
the temporary /intermediate data.
80386 Architecture - Execution Unit
b. Control Unit:
It contains microcode and special hardware. The microcode and special
hardware allows 80386DX to reduce time required for execution of multiply
and divide instructions.
Control unit has two sub units:
I. Control ROM
II. Decode and sequencing
i. Control ROM:
It is an intermediate level to execute computer program instructions. Micro
programs were organized as a sequence of microinstruction and stored in
special control memory. It manages the translation of instruction into
micro- instructions.
ii. Decode and Sequencing:
It manages scheduling of the micro- instruction between the various
execution units and deal with results coming from pipeline.
C, Test Protection Unit:
It checks for segmentation violations under the control of the microcode.
80386 Architecture - Execution Unit
B] Memory Management Unit:
Memory management unit converts logical address used by the programmer
into physical address.
The memory management unit consists of two subunits :
1. Segmentation unit
2. Paging unit
1. Segmentation unit:
– The segmentation unit translates the 48 bit logical address space into a 32-
bit linear address space. If the paging unit is not enabled then the 32-bit
linear address corresponds to the physical address.
– The segmentation unit compares the effective address for the length limit
specified in the segment descriptor.
– The segment unit adds the segment base and the effective address to
generate linear address.
– Before calculation of linear address it also checks for access rights.
– The limit and attribute PLA checks segment limits and attributes at
segment level to avoid invalid accesses to code and data in the memory
segments.
80386 Architecture – Memory Management Unit
2. Paging Unit:
The paging unit translates the 32 bit linear address space into 32 bit physical
address space. Each segment is divided into one or more 4k byte pages.
Paging unit have 3 sub components
a. Adder:
In adder the selector’s linear base address is added to the offset to from
the physical address.
b. Page cache:
A cache is a small amount of memory which operates more quickly than
main memory. Data is moved from main memory to the cache so that it can
be accessed faster.
a. Control and attributes PLA:
Control and attribute PLA checks the privileges at the page level. Each of
the pages maintains the paging information of the task.
80386 Architecture – Memory Management Unit
C] Bus interface unit:
Looks after 80386’s communication with the outside world. It provides 32 bit
data bus and 32 bit address bus. It is responsible for following operations:
– It accepts internal requests for code fetch and data transfers from the
code fetch unit and from the execution unit. It then prioritize the
request with the help of prioritizer and generates signal to perform bus
cycles.
– It sends address and data control signal to communicate with memory
and I/O devices.
– It controls the interface to external bus masters and coprocessors.
Instruction prefetch unit:
• It fetches sequentially the instruction from the memory. It uses bus control
unit to fetch instruction bytes.
• These prefetched instruction bytes are stored in the 16 byte code queue.
The prefetcher always fetches instructions in the order in which they appear
in the memory.
• When the jump or call instructions are executed, the contents of the
prefetched and decode queues are cleared out. And prefetcher again starts
filling up its queue.
80386 Architecture – Bus Interace Unit
80386DX Register Set
The register categories of 80386DX
• General Purpose Registers
[EAX,EBX,ECX,EDX]
• Segment Registers
[CS,DS,SS,ES,GS,FS]
• Pointer and Index Registers
[EIP,ESP,ESI,EDI,EBP]
• Flag Register [EFR]
• Control Registers
[CR0,CR1,CR2,CR3]
• System Address Registers
[GDTR,IDTR,LDTR,TR]
• Debug Registers
[DR0- DR7]
• Test Registers
[TR6 & TR7]
Real-Mode Software Architecture
• Reset -> real
mode; object code
compatible with
8086
• Real-mode
software model
• Reset and Initialization
– Starting address : FFFFFFF0H
– After the first Intersegment Jump or Call,
– A20-A31 will drop low
Flag Word UUUU0002H
MSW(CR0) UUUUUUU0H
IP 0000FFF0H
CS FFF0H
DS,SS,ES,FS,GS 0000H
DX Component and stepping ID
all other registers undefined
Real-Mode Software Architecture
Memory-Address Space and Data Organization
• 80386DX Real-Mode: 1MB of external memory
• 1 MB address space : 8086 address space
Data Types
• Fundamental Data Format : byte, word, double word
• Integer
– unsigned : byte, word, double word; signed : byte, word, double word
• BCD(binary-coded decimal) numbers: packed, unpacked
• ASCII
0
3FFH
400H
FFFFFH
dedicated(interrrupt service vector table)
pointer
segment base
general
Segment Registers and Memory Segmentation
• 64 KB segments : 1 MB of memory
• CS(code segment) SS(stack segment)
DS(data segment) ES(extra segment)
FS, GS (data segment F, G)
• 6 segments : total of 384 KB active
memory;
64 K for a code, 64 K for a stack, 256 K
for data storage
• Segments can be set up to be
contiguous, adjacent, disjoint, or even
overlapping
General Purpose Registers
Pointers and Index Registers
• Two index registers (ESI, EDI) and two pointer registers (EBP, ESP);
• Contains offset addresses (16-bit in real mode: 64 KB)
• ESP(extended stack pointer) and EBP(extended base pointer)
– combined with the contents of the SS register to produce physical memory
address
– TOS (top of stack) : SS:SP
– BP : an offset relative to the SS register
• ESI (extended source index register) and EDI (extended destination index
register)
– automatically combined with the value in the DS register
FLAGS REGISTER
• 32-bit flags; just nine of its bits
are active in the real mode
Flag Register
Carry flag(CF): carry-out, borrow-in
Parity flag (PF): set if even parity
Auxiliary carry flag (AF): carry-out
from the low nibble
Zero flag(ZF): arithmetic or logic 0
Sign bit (SF): sign
Overflow flag (OF): the signed result is
out of range
Trap flag (TF): single step mode
Interrupt flag (IF): Maskable interrupt
requests
Direction flag (DF): string operation;
when set, the string ops automatically
decrements the address.
• Real-mode physical address generation :
Generating A Real-Mode Memory Addresses
• Segment-override prefix
– change the segment from which the variable is
accessed.
– CS and SS: alternate seg : none
– variables, string sources : default DS; alternate seg :
ES, FS, GS, SS, CS
– string destination : ES; alternate seg: none
– BP used as base register: default SS: alternate seg: ES.
FS, GS, DS, CS
– BX used as base register: default DS: alternate seg: ES,
FS, GS, SS, CS
Generating A Real-Mode Memory Addresses
Example
1 2 3 4
0 0 2 2
0 0 2 2
1 2 3 4 0
1 2 3 6 2
Segment
Base
Offset
Logical
Address
Physical Address
Real-Mode Input / Output Address Space
Real-Mode Input / Output
Address Space
• Separate memory and Input /
Output address spaces
• 64KB I/O address space
• page 0 : 0000H through
00FFH --> direct I/O
• indirect addressing: DX
register

More Related Content

What's hot

Addressing modes of 80386
Addressing modes of 80386Addressing modes of 80386
Addressing modes of 80386PDFSHARE
 
Salient featurs of 80386
Salient featurs of 80386Salient featurs of 80386
Salient featurs of 80386aviban
 
80386 processor
80386 processor80386 processor
80386 processorRasmi M
 
80286 microprocessor
80286 microprocessor80286 microprocessor
80286 microprocessorAvin Mathew
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086aviban
 
Logical and shift micro operations
Logical and shift micro operationsLogical and shift micro operations
Logical and shift micro operationsSanjeev Patel
 
PAI Unit 2 Segmentation in 80386 microprocessor
PAI Unit 2 Segmentation in 80386 microprocessorPAI Unit 2 Segmentation in 80386 microprocessor
PAI Unit 2 Segmentation in 80386 microprocessorKanchanPatil34
 
Addressing Modes of 8085 Microprocessor
Addressing Modes of 8085 MicroprocessorAddressing Modes of 8085 Microprocessor
Addressing Modes of 8085 MicroprocessorDnyaneshwar Beedkar
 
Intel Microprocessors 8086 Documentation
Intel Microprocessors 8086 DocumentationIntel Microprocessors 8086 Documentation
Intel Microprocessors 8086 DocumentationAdeel Rasheed
 
8086 assembly language
8086 assembly language8086 assembly language
8086 assembly languageMir Majid
 
8086-instruction-set-ppt
 8086-instruction-set-ppt 8086-instruction-set-ppt
8086-instruction-set-pptjemimajerome
 
8251 communication interface
8251 communication interface8251 communication interface
8251 communication interfaceLingalaSowjanya
 
PAI Unit 3 Multitasking in 80386
PAI Unit 3 Multitasking in 80386PAI Unit 3 Multitasking in 80386
PAI Unit 3 Multitasking in 80386KanchanPatil34
 
8086 memory segmentation
8086 memory segmentation8086 memory segmentation
8086 memory segmentationSridari Iyer
 

What's hot (20)

Mp &mc programs
Mp &mc programsMp &mc programs
Mp &mc programs
 
Addressing modes of 80386
Addressing modes of 80386Addressing modes of 80386
Addressing modes of 80386
 
Salient featurs of 80386
Salient featurs of 80386Salient featurs of 80386
Salient featurs of 80386
 
80386 processor
80386 processor80386 processor
80386 processor
 
80286 microprocessor
80286 microprocessor80286 microprocessor
80286 microprocessor
 
Embedded C - Lecture 2
Embedded C - Lecture 2Embedded C - Lecture 2
Embedded C - Lecture 2
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
Logical and shift micro operations
Logical and shift micro operationsLogical and shift micro operations
Logical and shift micro operations
 
PAI Unit 2 Segmentation in 80386 microprocessor
PAI Unit 2 Segmentation in 80386 microprocessorPAI Unit 2 Segmentation in 80386 microprocessor
PAI Unit 2 Segmentation in 80386 microprocessor
 
Addressing Modes of 8085 Microprocessor
Addressing Modes of 8085 MicroprocessorAddressing Modes of 8085 Microprocessor
Addressing Modes of 8085 Microprocessor
 
80386
8038680386
80386
 
8086 architecture By Er. Swapnil Kaware
8086 architecture By Er. Swapnil Kaware8086 architecture By Er. Swapnil Kaware
8086 architecture By Er. Swapnil Kaware
 
Intel Microprocessors 8086 Documentation
Intel Microprocessors 8086 DocumentationIntel Microprocessors 8086 Documentation
Intel Microprocessors 8086 Documentation
 
8086 assembly language
8086 assembly language8086 assembly language
8086 assembly language
 
8086 microprocessor
8086 microprocessor8086 microprocessor
8086 microprocessor
 
8086-instruction-set-ppt
 8086-instruction-set-ppt 8086-instruction-set-ppt
8086-instruction-set-ppt
 
viva q&a for mp lab
viva q&a for mp labviva q&a for mp lab
viva q&a for mp lab
 
8251 communication interface
8251 communication interface8251 communication interface
8251 communication interface
 
PAI Unit 3 Multitasking in 80386
PAI Unit 3 Multitasking in 80386PAI Unit 3 Multitasking in 80386
PAI Unit 3 Multitasking in 80386
 
8086 memory segmentation
8086 memory segmentation8086 memory segmentation
8086 memory segmentation
 

Similar to U I - 4. 80386 Real mode.pptx

Microprocessor 80386
Microprocessor 80386Microprocessor 80386
Microprocessor 80386yash sawarkar
 
INTEL 80386 MICROPROCESSOR
INTEL  80386  MICROPROCESSORINTEL  80386  MICROPROCESSOR
INTEL 80386 MICROPROCESSORAnnies Minu
 
Microprocessor Unit -1 SE computer-II.pptx
Microprocessor  Unit -1 SE computer-II.pptxMicroprocessor  Unit -1 SE computer-II.pptx
Microprocessor Unit -1 SE computer-II.pptxakshathsingh2003
 
Architecture of 80386(www.munnuz.co.cc)
Architecture of 80386(www.munnuz.co.cc)Architecture of 80386(www.munnuz.co.cc)
Architecture of 80386(www.munnuz.co.cc)muneer.k
 
32- bit Microprocessor-Indtel 80386.pptx
32- bit Microprocessor-Indtel 80386.pptx32- bit Microprocessor-Indtel 80386.pptx
32- bit Microprocessor-Indtel 80386.pptxYuvraj994432
 
Module 4 advanced microprocessors
Module 4 advanced microprocessorsModule 4 advanced microprocessors
Module 4 advanced microprocessorsDeepak John
 
Microprocessors - 80386DX
Microprocessors - 80386DXMicroprocessors - 80386DX
Microprocessors - 80386DXPriyaDYP
 
Pai unit 1_l1-l2-l3-l4_upload
Pai unit 1_l1-l2-l3-l4_uploadPai unit 1_l1-l2-l3-l4_upload
Pai unit 1_l1-l2-l3-l4_uploadYogesh Deshpande
 
Assembly_Language _Programming_UNIT.pptx
Assembly_Language _Programming_UNIT.pptxAssembly_Language _Programming_UNIT.pptx
Assembly_Language _Programming_UNIT.pptxVickyThakur61
 
EC 8691 Microprocessor and Microcontroller.pptx
EC 8691 Microprocessor and Microcontroller.pptxEC 8691 Microprocessor and Microcontroller.pptx
EC 8691 Microprocessor and Microcontroller.pptxGobinathAECEJRF1101
 

Similar to U I - 4. 80386 Real mode.pptx (20)

The 80386 80486
The 80386 80486The 80386 80486
The 80386 80486
 
Microprocessor 80386
Microprocessor 80386Microprocessor 80386
Microprocessor 80386
 
INTEL 80386 MICROPROCESSOR
INTEL  80386  MICROPROCESSORINTEL  80386  MICROPROCESSOR
INTEL 80386 MICROPROCESSOR
 
80386.pptx
80386.pptx80386.pptx
80386.pptx
 
Microprocessor Unit -1 SE computer-II.pptx
Microprocessor  Unit -1 SE computer-II.pptxMicroprocessor  Unit -1 SE computer-II.pptx
Microprocessor Unit -1 SE computer-II.pptx
 
Architecture of 80386(www.munnuz.co.cc)
Architecture of 80386(www.munnuz.co.cc)Architecture of 80386(www.munnuz.co.cc)
Architecture of 80386(www.munnuz.co.cc)
 
80386 & 80486
80386 & 8048680386 & 80486
80386 & 80486
 
Mpippt
MpipptMpippt
Mpippt
 
Microprocessor
MicroprocessorMicroprocessor
Microprocessor
 
80386 Architecture
80386 Architecture80386 Architecture
80386 Architecture
 
32- bit Microprocessor-Indtel 80386.pptx
32- bit Microprocessor-Indtel 80386.pptx32- bit Microprocessor-Indtel 80386.pptx
32- bit Microprocessor-Indtel 80386.pptx
 
80386 microprocessor
80386 microprocessor80386 microprocessor
80386 microprocessor
 
TMS320C6X Architecture
TMS320C6X ArchitectureTMS320C6X Architecture
TMS320C6X Architecture
 
Module 4 advanced microprocessors
Module 4 advanced microprocessorsModule 4 advanced microprocessors
Module 4 advanced microprocessors
 
Microprocessors - 80386DX
Microprocessors - 80386DXMicroprocessors - 80386DX
Microprocessors - 80386DX
 
Register & Memory
Register & MemoryRegister & Memory
Register & Memory
 
Module 1 8086
Module 1 8086Module 1 8086
Module 1 8086
 
Pai unit 1_l1-l2-l3-l4_upload
Pai unit 1_l1-l2-l3-l4_uploadPai unit 1_l1-l2-l3-l4_upload
Pai unit 1_l1-l2-l3-l4_upload
 
Assembly_Language _Programming_UNIT.pptx
Assembly_Language _Programming_UNIT.pptxAssembly_Language _Programming_UNIT.pptx
Assembly_Language _Programming_UNIT.pptx
 
EC 8691 Microprocessor and Microcontroller.pptx
EC 8691 Microprocessor and Microcontroller.pptxEC 8691 Microprocessor and Microcontroller.pptx
EC 8691 Microprocessor and Microcontroller.pptx
 

Recently uploaded

Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
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
 
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
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
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
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
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
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and usesDevarapalliHaritha
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 

Recently uploaded (20)

Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
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
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
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...
 
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
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
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...
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
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
 
🔝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...
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and uses
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 

U I - 4. 80386 Real mode.pptx

  • 1. “Processor Architecture & Interfacing” Unit I – 80386 Real Mode Details Sinhgad Technical Education Society Sinhgad Collge of Engineering Mr. M V Nimbalkar Department of Information Technology
  • 2. Unit 1 Syllabus – Lecture wise Lecture No Topics to be covered 1 Introduction to assembly language programming 2 ALP tools- Assembler, Linker, Loader, Debugger, Emulator, Assembler directives, Far and near procedure, Macros 3 DOS Internals, DOS Calls. 4 80386 - Features and Architecture, Register Set, Real mode segmentation and Address translation 5 80386 - Addressing modes 6 - 8 80386 - Instruction set.
  • 3. 3 80x86 Family of Processors Summarization
  • 4. Comparison of 8086 with 80386 Sr. no. 8086 80386 1 8086 is 16 bit processor. 30386 is 32 bit processor 2 16 bit data bus and 20 bit address bus 32bit data and address bus. 3 Instruction set is subset of 80386. Instruction set is superset of 8086. 4 Two operating modes maximum and minimum. Three operating modes real, protected and virtual 8086 mode. 5 Memory Addressing Capacity – 1 MB Memory Addressing Capacity – 4 GB 6 Multitasking is not possible Multitasking is possible. 7 Protection feature is not available in 8086 Protection feature is available in 80386. 8 Paging is not available. Paging is available. 9 Less addressing modes are available. More addressing modes are available. 4
  • 5. 80386 Features • Two versions 80386DX & 80386SX • It has 132-pins Pin Grid Array package. • True 32 bit processor with Data bus, Address bus & ALU bus size = 32 bits. • 4GB (Gigabyte) of Physical memory. • It has 64TB (Terabyte) of Virtual memory. • Maximum size of each segment is 4 GB (Gigabyte). • It is operated with a frequency of 16MHz-33MHz. • It can handle 8/16/32-bit data types. • It has 16 byte prefetch queue. • The integrated memory management and protection architecture • Pipelined Architecture with 6 units operating simultaneously • Instruction pipelining, Integrated support for Multitasking • Three operating modes – Real, Protected & Virtual 8086 5
  • 6. 80386 Architecture 6 Fig. 1. Architecture of 80386
  • 7. Architecture of 80386 The architecture of 80386DX consists of three functional units: A] Central Processing Unit. B] Memory Management Unit. C] Bus Interface Unit. A] Central Processing Unit: Central processing unit is responsible for handling all instructions it receives from hardware. Central processing unit consists of : 1. Instruction Decoder. 2. Execution Unit. 1. Instruction Decoder: The instruction decoder unit takes instruction bytes from the code prefetch queue and translates them into microcode. The decoded instructions are then stored in the instruction queue. They are passed to the control section for deriving the necessary control signals. 2. Execution Unit: Execution unit reads instruction from instruction queue and execute it. 80386 Architecture Functional Units
  • 8. For executing an instruction execution unit has three subunits: a. Data unit, b. Control unit c. Test protection unit a. Data Unit: Data unit is responsible for performing different operations on data. It is divided into three units: I. Barrel Shifter Adder Unit. II. Multiply/Divide Unit. III. Register file. i. Barrel Shifter Unit: 64-bit barrel shifter used to shift, rotate operations. ii. Multiply/Divide Unit: The multiply and divide logic uses a 1-bit per cycle algorithm. The multiply algorithm stops the iteration when the most significant bits of multiplier are all zero. iii. Register File: Register file contains the eight 32-bit general purpose register which are used for both address calculation and data operations. It is used to hold the temporary /intermediate data. 80386 Architecture - Execution Unit
  • 9. b. Control Unit: It contains microcode and special hardware. The microcode and special hardware allows 80386DX to reduce time required for execution of multiply and divide instructions. Control unit has two sub units: I. Control ROM II. Decode and sequencing i. Control ROM: It is an intermediate level to execute computer program instructions. Micro programs were organized as a sequence of microinstruction and stored in special control memory. It manages the translation of instruction into micro- instructions. ii. Decode and Sequencing: It manages scheduling of the micro- instruction between the various execution units and deal with results coming from pipeline. C, Test Protection Unit: It checks for segmentation violations under the control of the microcode. 80386 Architecture - Execution Unit
  • 10. B] Memory Management Unit: Memory management unit converts logical address used by the programmer into physical address. The memory management unit consists of two subunits : 1. Segmentation unit 2. Paging unit 1. Segmentation unit: – The segmentation unit translates the 48 bit logical address space into a 32- bit linear address space. If the paging unit is not enabled then the 32-bit linear address corresponds to the physical address. – The segmentation unit compares the effective address for the length limit specified in the segment descriptor. – The segment unit adds the segment base and the effective address to generate linear address. – Before calculation of linear address it also checks for access rights. – The limit and attribute PLA checks segment limits and attributes at segment level to avoid invalid accesses to code and data in the memory segments. 80386 Architecture – Memory Management Unit
  • 11. 2. Paging Unit: The paging unit translates the 32 bit linear address space into 32 bit physical address space. Each segment is divided into one or more 4k byte pages. Paging unit have 3 sub components a. Adder: In adder the selector’s linear base address is added to the offset to from the physical address. b. Page cache: A cache is a small amount of memory which operates more quickly than main memory. Data is moved from main memory to the cache so that it can be accessed faster. a. Control and attributes PLA: Control and attribute PLA checks the privileges at the page level. Each of the pages maintains the paging information of the task. 80386 Architecture – Memory Management Unit
  • 12. C] Bus interface unit: Looks after 80386’s communication with the outside world. It provides 32 bit data bus and 32 bit address bus. It is responsible for following operations: – It accepts internal requests for code fetch and data transfers from the code fetch unit and from the execution unit. It then prioritize the request with the help of prioritizer and generates signal to perform bus cycles. – It sends address and data control signal to communicate with memory and I/O devices. – It controls the interface to external bus masters and coprocessors. Instruction prefetch unit: • It fetches sequentially the instruction from the memory. It uses bus control unit to fetch instruction bytes. • These prefetched instruction bytes are stored in the 16 byte code queue. The prefetcher always fetches instructions in the order in which they appear in the memory. • When the jump or call instructions are executed, the contents of the prefetched and decode queues are cleared out. And prefetcher again starts filling up its queue. 80386 Architecture – Bus Interace Unit
  • 13. 80386DX Register Set The register categories of 80386DX • General Purpose Registers [EAX,EBX,ECX,EDX] • Segment Registers [CS,DS,SS,ES,GS,FS] • Pointer and Index Registers [EIP,ESP,ESI,EDI,EBP] • Flag Register [EFR] • Control Registers [CR0,CR1,CR2,CR3] • System Address Registers [GDTR,IDTR,LDTR,TR] • Debug Registers [DR0- DR7] • Test Registers [TR6 & TR7]
  • 14. Real-Mode Software Architecture • Reset -> real mode; object code compatible with 8086 • Real-mode software model
  • 15. • Reset and Initialization – Starting address : FFFFFFF0H – After the first Intersegment Jump or Call, – A20-A31 will drop low Flag Word UUUU0002H MSW(CR0) UUUUUUU0H IP 0000FFF0H CS FFF0H DS,SS,ES,FS,GS 0000H DX Component and stepping ID all other registers undefined Real-Mode Software Architecture
  • 16. Memory-Address Space and Data Organization • 80386DX Real-Mode: 1MB of external memory • 1 MB address space : 8086 address space Data Types • Fundamental Data Format : byte, word, double word • Integer – unsigned : byte, word, double word; signed : byte, word, double word • BCD(binary-coded decimal) numbers: packed, unpacked • ASCII 0 3FFH 400H FFFFFH dedicated(interrrupt service vector table) pointer segment base general
  • 17. Segment Registers and Memory Segmentation • 64 KB segments : 1 MB of memory • CS(code segment) SS(stack segment) DS(data segment) ES(extra segment) FS, GS (data segment F, G) • 6 segments : total of 384 KB active memory; 64 K for a code, 64 K for a stack, 256 K for data storage • Segments can be set up to be contiguous, adjacent, disjoint, or even overlapping
  • 19. Pointers and Index Registers • Two index registers (ESI, EDI) and two pointer registers (EBP, ESP); • Contains offset addresses (16-bit in real mode: 64 KB) • ESP(extended stack pointer) and EBP(extended base pointer) – combined with the contents of the SS register to produce physical memory address – TOS (top of stack) : SS:SP – BP : an offset relative to the SS register • ESI (extended source index register) and EDI (extended destination index register) – automatically combined with the value in the DS register
  • 20. FLAGS REGISTER • 32-bit flags; just nine of its bits are active in the real mode Flag Register Carry flag(CF): carry-out, borrow-in Parity flag (PF): set if even parity Auxiliary carry flag (AF): carry-out from the low nibble Zero flag(ZF): arithmetic or logic 0 Sign bit (SF): sign Overflow flag (OF): the signed result is out of range Trap flag (TF): single step mode Interrupt flag (IF): Maskable interrupt requests Direction flag (DF): string operation; when set, the string ops automatically decrements the address.
  • 21. • Real-mode physical address generation : Generating A Real-Mode Memory Addresses
  • 22. • Segment-override prefix – change the segment from which the variable is accessed. – CS and SS: alternate seg : none – variables, string sources : default DS; alternate seg : ES, FS, GS, SS, CS – string destination : ES; alternate seg: none – BP used as base register: default SS: alternate seg: ES. FS, GS, DS, CS – BX used as base register: default DS: alternate seg: ES, FS, GS, SS, CS Generating A Real-Mode Memory Addresses
  • 23. Example 1 2 3 4 0 0 2 2 0 0 2 2 1 2 3 4 0 1 2 3 6 2 Segment Base Offset Logical Address Physical Address
  • 24. Real-Mode Input / Output Address Space Real-Mode Input / Output Address Space • Separate memory and Input / Output address spaces • 64KB I/O address space • page 0 : 0000H through 00FFH --> direct I/O • indirect addressing: DX register