SlideShare uma empresa Scribd logo
1 de 10
Baixar para ler offline
By Roll No
2467, 2474, 2471
2812, 2493, 2815
2814, 2489, 2818
X86 Architecture
Intro to X86 Architecture
x86 is a family of backward compatible instruction set architectures based
on the Intel 8086 CPU. The 8086 was introduced in 1978 as a fully 16-
bit extension of Intel's 8-bit based 8080 microprocessor
The x86 architecture has 8 General-Purpose
Registers (GPR), 6 Segment Registers, 1 Flags
Register and an Instruction Pointer. 64-bit
x86 has additional registers.
x86 Lineage
The x86 architecture,
which has been
enhanced numerous
times, comes from the
Intel 8088, the CPU in
the first IBM PC in 1981.
The 8088 was a slower
version of the 8086,
which begat the 80186,
286, 386, 486, Pentium
and subsequent CPU
families.
GPRS(General Purpose Registers):
Segment Registers
“Segmentation provides a mechanism for dividing the processor’s addressable
memory space (called the linear address space) into smaller protected address
spaces called segments
The EFLAGS is a 32-bit register used as a collection of bits
representing Boolean values to store the results of
operations and the state of the processor.
Instruction Pointer
The EIP register contains the address of
the next instruction to be executed if no
branching is done.
EIP can only be read through the stack after
a call instruction.
Addressing modes
The addressing mode indicates the manner in which the operand is
presented.
Register Addressing
(operand address R is in the address field)
mov ax, bx ; moves contents of register bx into ax
Immediate
(actual value is in the field)
mov ax, 1 ; moves value of 1 into register ax
or
mov ax, 010Ch ; moves value of 0x010C into register ax
Direct memory addressing
(operand address is in the address field)
.data my_var dw 0abcdh ;
my_var = 0xabcd .code mov ax, my_var ; copy my_var content in ax
(ax=0xabcd) mov ax, [my_var] ; idem as above
CPU Operation Modes
Real Mode
Real Mode is a holdover from the original Intel 8086. You
generally won't need to know anything about it (unless you are
programming for a DOS-based system or, more likely, writing a
boot loader that is directly called by the BIOS).
The Intel 8086 accessed memory using 20-bit addresses. But, as
the processor itself was 16-bit, Intel invented an addressing
scheme that provided a way of mapping a 20-bit addressing
space into 16-bit words. Today's x86 processors start in the so-
called Real Mode, which is an operating mode that mimics the
behavior of the 8086, with some very tiny differences, for
backwards compatibility.
Protected Mode
Flat Memory Model
If programming in a modern operating system (such as Linux,
Windows), you are basically programming in flat 32-bit mode.
Any register can be used in addressing, and it is generally more
efficient to use a full 32-bit register instead of a 16-bit register
part. Additionally, segment registers are generally unused in flat
mode, and it is generally a bad idea to touch them.
Multi-Segmented Memory Model
Using a 32-bit register to address memory the program can
access (almost) all of the memory in a modern computer. For
earlier processors (with only 16-bit registers) the segmented
memory model was used. The 'CS', 'DS', and 'ES' registers are
used to point to the different chunks of memory. For a small
program (small model) the CS=DS=ES. For larger memory
models, these 'segments' can point to different locations.

Mais conteúdo relacionado

Mais procurados

Presentation on 8086 Microprocessor
Presentation  on   8086 MicroprocessorPresentation  on   8086 Microprocessor
Presentation on 8086 MicroprocessorNahian Ahmed
 
Unit 4 memory system
Unit 4   memory systemUnit 4   memory system
Unit 4 memory systemchidabdu
 
Computer architecture control unit
Computer architecture control unitComputer architecture control unit
Computer architecture control unitMazin Alwaaly
 
8086 in minimum mode
8086 in minimum mode8086 in minimum mode
8086 in minimum modeSridari Iyer
 
Pentium (80586) Microprocessor By Er. Swapnil Kaware
Pentium (80586) Microprocessor By Er. Swapnil KawarePentium (80586) Microprocessor By Er. Swapnil Kaware
Pentium (80586) Microprocessor By Er. Swapnil KawareProf. Swapnil V. Kaware
 
Cache memory
Cache memoryCache memory
Cache memoryAnuj Modi
 
8086 pin diagram description
8086 pin diagram description8086 pin diagram description
8086 pin diagram descriptionAkhil Singal
 
8086 assembly language
8086 assembly language8086 assembly language
8086 assembly languageMir Majid
 
Multithreading
MultithreadingMultithreading
MultithreadingA B Shinde
 
Interrupts on 8086 microprocessor by vijay kumar.k
Interrupts on 8086 microprocessor by vijay kumar.kInterrupts on 8086 microprocessor by vijay kumar.k
Interrupts on 8086 microprocessor by vijay kumar.kVijay Kumar
 
Direct memory access (dma)
Direct memory access (dma)Direct memory access (dma)
Direct memory access (dma)Zubair Khalid
 
8259 Programmable Interrupt Controller
8259 Programmable Interrupt Controller8259 Programmable Interrupt Controller
8259 Programmable Interrupt Controllerabhikalmegh
 
Computer Organization and Assembly Language
Computer Organization and Assembly LanguageComputer Organization and Assembly Language
Computer Organization and Assembly Languagefasihuddin90
 

Mais procurados (20)

Presentation on 8086 Microprocessor
Presentation  on   8086 MicroprocessorPresentation  on   8086 Microprocessor
Presentation on 8086 Microprocessor
 
DMA operation
DMA operationDMA operation
DMA operation
 
Interrupts
InterruptsInterrupts
Interrupts
 
Unit 4 memory system
Unit 4   memory systemUnit 4   memory system
Unit 4 memory system
 
Embedded systems basics
Embedded systems basicsEmbedded systems basics
Embedded systems basics
 
Computer architecture control unit
Computer architecture control unitComputer architecture control unit
Computer architecture control unit
 
Microprocessor 8086
Microprocessor 8086Microprocessor 8086
Microprocessor 8086
 
8086 in minimum mode
8086 in minimum mode8086 in minimum mode
8086 in minimum mode
 
Pentium (80586) Microprocessor By Er. Swapnil Kaware
Pentium (80586) Microprocessor By Er. Swapnil KawarePentium (80586) Microprocessor By Er. Swapnil Kaware
Pentium (80586) Microprocessor By Er. Swapnil Kaware
 
8259 updated
8259 updated 8259 updated
8259 updated
 
Cache memory
Cache memoryCache memory
Cache memory
 
8086 pin diagram description
8086 pin diagram description8086 pin diagram description
8086 pin diagram description
 
Memory management
Memory managementMemory management
Memory management
 
8086 assembly language
8086 assembly language8086 assembly language
8086 assembly language
 
Multithreading
MultithreadingMultithreading
Multithreading
 
Registers
RegistersRegisters
Registers
 
Interrupts on 8086 microprocessor by vijay kumar.k
Interrupts on 8086 microprocessor by vijay kumar.kInterrupts on 8086 microprocessor by vijay kumar.k
Interrupts on 8086 microprocessor by vijay kumar.k
 
Direct memory access (dma)
Direct memory access (dma)Direct memory access (dma)
Direct memory access (dma)
 
8259 Programmable Interrupt Controller
8259 Programmable Interrupt Controller8259 Programmable Interrupt Controller
8259 Programmable Interrupt Controller
 
Computer Organization and Assembly Language
Computer Organization and Assembly LanguageComputer Organization and Assembly Language
Computer Organization and Assembly Language
 

Destaque

The x86 Family
The x86 FamilyThe x86 Family
The x86 FamilyMotaz Saad
 
Intel x86 and ARM Data types
Intel x86 and ARM Data typesIntel x86 and ARM Data types
Intel x86 and ARM Data typesRowena Cornejo
 
Intel & ARM: Strategic Comparison
Intel & ARM: Strategic ComparisonIntel & ARM: Strategic Comparison
Intel & ARM: Strategic ComparisonToby Allen
 
Flag registers, addressing modes, instruction set
Flag registers, addressing modes, instruction setFlag registers, addressing modes, instruction set
Flag registers, addressing modes, instruction setaviban
 
The Intel 8086 microprocessor
The Intel 8086 microprocessorThe Intel 8086 microprocessor
The Intel 8086 microprocessorGeorge Thomas
 
8086 class notes-Y.N.M
8086 class notes-Y.N.M8086 class notes-Y.N.M
8086 class notes-Y.N.MDr.YNM
 
AMD and the new “Zen” High Performance x86 Core at Hot Chips 28
AMD and the new “Zen” High Performance x86 Core at Hot Chips 28AMD and the new “Zen” High Performance x86 Core at Hot Chips 28
AMD and the new “Zen” High Performance x86 Core at Hot Chips 28AMD
 

Destaque (11)

The x86 Family
The x86 FamilyThe x86 Family
The x86 Family
 
Ch 1 the x86 µprocessor
Ch 1 the x86 µprocessorCh 1 the x86 µprocessor
Ch 1 the x86 µprocessor
 
It322 intro 1
It322 intro 1It322 intro 1
It322 intro 1
 
Intel x86 and ARM Data types
Intel x86 and ARM Data typesIntel x86 and ARM Data types
Intel x86 and ARM Data types
 
8086
80868086
8086
 
Intel & ARM: Strategic Comparison
Intel & ARM: Strategic ComparisonIntel & ARM: Strategic Comparison
Intel & ARM: Strategic Comparison
 
Flag registers, addressing modes, instruction set
Flag registers, addressing modes, instruction setFlag registers, addressing modes, instruction set
Flag registers, addressing modes, instruction set
 
The Intel 8086 microprocessor
The Intel 8086 microprocessorThe Intel 8086 microprocessor
The Intel 8086 microprocessor
 
8086 class notes-Y.N.M
8086 class notes-Y.N.M8086 class notes-Y.N.M
8086 class notes-Y.N.M
 
AMD and the new “Zen” High Performance x86 Core at Hot Chips 28
AMD and the new “Zen” High Performance x86 Core at Hot Chips 28AMD and the new “Zen” High Performance x86 Core at Hot Chips 28
AMD and the new “Zen” High Performance x86 Core at Hot Chips 28
 
Slideshare ppt
Slideshare pptSlideshare ppt
Slideshare ppt
 

Semelhante a X86 Architecture (20)

Intel 8086 microprocessor
Intel 8086 microprocessorIntel 8086 microprocessor
Intel 8086 microprocessor
 
IBM processors,registers,segmentation
IBM processors,registers,segmentationIBM processors,registers,segmentation
IBM processors,registers,segmentation
 
Processoer 80486
Processoer 80486Processoer 80486
Processoer 80486
 
Microprocessor lecture 2
Microprocessor lecture   2Microprocessor lecture   2
Microprocessor lecture 2
 
Mpi chapter 2
Mpi chapter 2Mpi chapter 2
Mpi chapter 2
 
80286 microprocessors
80286 microprocessors80286 microprocessors
80286 microprocessors
 
Microprocessor evolution
Microprocessor evolutionMicroprocessor evolution
Microprocessor evolution
 
Microprocessor evolution
Microprocessor evolutionMicroprocessor evolution
Microprocessor evolution
 
8086 Microprocessor(Visit Munnuz Co Cc)
8086 Microprocessor(Visit Munnuz Co Cc)8086 Microprocessor(Visit Munnuz Co Cc)
8086 Microprocessor(Visit Munnuz Co Cc)
 
Intel architectuer
Intel architectuerIntel architectuer
Intel architectuer
 
It322 intro 2
It322 intro 2It322 intro 2
It322 intro 2
 
64 bits for developers
64 bits for developers64 bits for developers
64 bits for developers
 
Microprocessor systems 8085
Microprocessor systems 8085Microprocessor systems 8085
Microprocessor systems 8085
 
Lec 03 ia32 architecture
Lec 03  ia32 architectureLec 03  ia32 architecture
Lec 03 ia32 architecture
 
Chp 1- barrybrei -rj.pdf
Chp 1- barrybrei -rj.pdfChp 1- barrybrei -rj.pdf
Chp 1- barrybrei -rj.pdf
 
ppt 1 barrybrei.ppt
ppt 1 barrybrei.pptppt 1 barrybrei.ppt
ppt 1 barrybrei.ppt
 
Micropro
MicroproMicropro
Micropro
 
Register organization
Register organizationRegister organization
Register organization
 
The 80386 80486
The 80386 80486The 80386 80486
The 80386 80486
 
AMD64 (EM64T) architecture
AMD64 (EM64T) architectureAMD64 (EM64T) architecture
AMD64 (EM64T) architecture
 

Mais de IGZ Software house (20)

Window server 2008
Window server 2008Window server 2008
Window server 2008
 
Types of server
Types of serverTypes of server
Types of server
 
Types of network
Types of networkTypes of network
Types of network
 
Ip address and subnetting
Ip address and subnettingIp address and subnetting
Ip address and subnetting
 
Group policy management window server 2008r2
Group policy management window server 2008r2Group policy management window server 2008r2
Group policy management window server 2008r2
 
FSMO
FSMO FSMO
FSMO
 
Active directory domain services
Active directory domain servicesActive directory domain services
Active directory domain services
 
17 roles of window server 2008 r2
17 roles of window server 2008 r217 roles of window server 2008 r2
17 roles of window server 2008 r2
 
Raid and its levels
Raid and its levelsRaid and its levels
Raid and its levels
 
Introduction Network security
Introduction Network securityIntroduction Network security
Introduction Network security
 
Firewalls
FirewallsFirewalls
Firewalls
 
Encryption
EncryptionEncryption
Encryption
 
Cryptography
CryptographyCryptography
Cryptography
 
Authentication techniques
Authentication techniquesAuthentication techniques
Authentication techniques
 
Window architecture
Window architecture Window architecture
Window architecture
 
What is-32-bit-and-64-bit
What is-32-bit-and-64-bitWhat is-32-bit-and-64-bit
What is-32-bit-and-64-bit
 
Virtual machine
Virtual machineVirtual machine
Virtual machine
 
Compiler
Compiler Compiler
Compiler
 
Interpreter
InterpreterInterpreter
Interpreter
 
Competitor analaysis
Competitor analaysisCompetitor analaysis
Competitor analaysis
 

Último

Prescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxPrescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxraviapr7
 
Patient Counselling. Definition of patient counseling; steps involved in pati...
Patient Counselling. Definition of patient counseling; steps involved in pati...Patient Counselling. Definition of patient counseling; steps involved in pati...
Patient Counselling. Definition of patient counseling; steps involved in pati...raviapr7
 
In - Vivo and In - Vitro Correlation.pptx
In - Vivo and In - Vitro Correlation.pptxIn - Vivo and In - Vitro Correlation.pptx
In - Vivo and In - Vitro Correlation.pptxAditiChauhan701637
 
Diploma in Nursing Admission Test Question Solution 2023.pdf
Diploma in Nursing Admission Test Question Solution 2023.pdfDiploma in Nursing Admission Test Question Solution 2023.pdf
Diploma in Nursing Admission Test Question Solution 2023.pdfMohonDas
 
How to Solve Singleton Error in the Odoo 17
How to Solve Singleton Error in the  Odoo 17How to Solve Singleton Error in the  Odoo 17
How to Solve Singleton Error in the Odoo 17Celine George
 
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptxSandy Millin
 
Human-AI Co-Creation of Worked Examples for Programming Classes
Human-AI Co-Creation of Worked Examples for Programming ClassesHuman-AI Co-Creation of Worked Examples for Programming Classes
Human-AI Co-Creation of Worked Examples for Programming ClassesMohammad Hassany
 
The Singapore Teaching Practice document
The Singapore Teaching Practice documentThe Singapore Teaching Practice document
The Singapore Teaching Practice documentXsasf Sfdfasd
 
How to Add a many2many Relational Field in Odoo 17
How to Add a many2many Relational Field in Odoo 17How to Add a many2many Relational Field in Odoo 17
How to Add a many2many Relational Field in Odoo 17Celine George
 
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptxPISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptxEduSkills OECD
 
Education and training program in the hospital APR.pptx
Education and training program in the hospital APR.pptxEducation and training program in the hospital APR.pptx
Education and training program in the hospital APR.pptxraviapr7
 
How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17Celine George
 
M-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptxM-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptxDr. Santhosh Kumar. N
 
Practical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptxPractical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptxKatherine Villaluna
 
General views of Histopathology and step
General views of Histopathology and stepGeneral views of Histopathology and step
General views of Histopathology and stepobaje godwin sunday
 
Ultra structure and life cycle of Plasmodium.pptx
Ultra structure and life cycle of Plasmodium.pptxUltra structure and life cycle of Plasmodium.pptx
Ultra structure and life cycle of Plasmodium.pptxDr. Asif Anas
 
Easter in the USA presentation by Chloe.
Easter in the USA presentation by Chloe.Easter in the USA presentation by Chloe.
Easter in the USA presentation by Chloe.EnglishCEIPdeSigeiro
 
How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17Celine George
 
Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.raviapr7
 
Quality Assurance_GOOD LABORATORY PRACTICE
Quality Assurance_GOOD LABORATORY PRACTICEQuality Assurance_GOOD LABORATORY PRACTICE
Quality Assurance_GOOD LABORATORY PRACTICESayali Powar
 

Último (20)

Prescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxPrescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptx
 
Patient Counselling. Definition of patient counseling; steps involved in pati...
Patient Counselling. Definition of patient counseling; steps involved in pati...Patient Counselling. Definition of patient counseling; steps involved in pati...
Patient Counselling. Definition of patient counseling; steps involved in pati...
 
In - Vivo and In - Vitro Correlation.pptx
In - Vivo and In - Vitro Correlation.pptxIn - Vivo and In - Vitro Correlation.pptx
In - Vivo and In - Vitro Correlation.pptx
 
Diploma in Nursing Admission Test Question Solution 2023.pdf
Diploma in Nursing Admission Test Question Solution 2023.pdfDiploma in Nursing Admission Test Question Solution 2023.pdf
Diploma in Nursing Admission Test Question Solution 2023.pdf
 
How to Solve Singleton Error in the Odoo 17
How to Solve Singleton Error in the  Odoo 17How to Solve Singleton Error in the  Odoo 17
How to Solve Singleton Error in the Odoo 17
 
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
 
Human-AI Co-Creation of Worked Examples for Programming Classes
Human-AI Co-Creation of Worked Examples for Programming ClassesHuman-AI Co-Creation of Worked Examples for Programming Classes
Human-AI Co-Creation of Worked Examples for Programming Classes
 
The Singapore Teaching Practice document
The Singapore Teaching Practice documentThe Singapore Teaching Practice document
The Singapore Teaching Practice document
 
How to Add a many2many Relational Field in Odoo 17
How to Add a many2many Relational Field in Odoo 17How to Add a many2many Relational Field in Odoo 17
How to Add a many2many Relational Field in Odoo 17
 
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptxPISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
 
Education and training program in the hospital APR.pptx
Education and training program in the hospital APR.pptxEducation and training program in the hospital APR.pptx
Education and training program in the hospital APR.pptx
 
How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17
 
M-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptxM-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptx
 
Practical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptxPractical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptx
 
General views of Histopathology and step
General views of Histopathology and stepGeneral views of Histopathology and step
General views of Histopathology and step
 
Ultra structure and life cycle of Plasmodium.pptx
Ultra structure and life cycle of Plasmodium.pptxUltra structure and life cycle of Plasmodium.pptx
Ultra structure and life cycle of Plasmodium.pptx
 
Easter in the USA presentation by Chloe.
Easter in the USA presentation by Chloe.Easter in the USA presentation by Chloe.
Easter in the USA presentation by Chloe.
 
How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17
 
Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.
 
Quality Assurance_GOOD LABORATORY PRACTICE
Quality Assurance_GOOD LABORATORY PRACTICEQuality Assurance_GOOD LABORATORY PRACTICE
Quality Assurance_GOOD LABORATORY PRACTICE
 

X86 Architecture

  • 1. By Roll No 2467, 2474, 2471 2812, 2493, 2815 2814, 2489, 2818 X86 Architecture
  • 2. Intro to X86 Architecture x86 is a family of backward compatible instruction set architectures based on the Intel 8086 CPU. The 8086 was introduced in 1978 as a fully 16- bit extension of Intel's 8-bit based 8080 microprocessor The x86 architecture has 8 General-Purpose Registers (GPR), 6 Segment Registers, 1 Flags Register and an Instruction Pointer. 64-bit x86 has additional registers.
  • 3. x86 Lineage The x86 architecture, which has been enhanced numerous times, comes from the Intel 8088, the CPU in the first IBM PC in 1981. The 8088 was a slower version of the 8086, which begat the 80186, 286, 386, 486, Pentium and subsequent CPU families.
  • 5. Segment Registers “Segmentation provides a mechanism for dividing the processor’s addressable memory space (called the linear address space) into smaller protected address spaces called segments
  • 6. The EFLAGS is a 32-bit register used as a collection of bits representing Boolean values to store the results of operations and the state of the processor.
  • 7. Instruction Pointer The EIP register contains the address of the next instruction to be executed if no branching is done. EIP can only be read through the stack after a call instruction.
  • 8. Addressing modes The addressing mode indicates the manner in which the operand is presented. Register Addressing (operand address R is in the address field) mov ax, bx ; moves contents of register bx into ax Immediate (actual value is in the field) mov ax, 1 ; moves value of 1 into register ax or mov ax, 010Ch ; moves value of 0x010C into register ax Direct memory addressing (operand address is in the address field) .data my_var dw 0abcdh ; my_var = 0xabcd .code mov ax, my_var ; copy my_var content in ax (ax=0xabcd) mov ax, [my_var] ; idem as above
  • 9. CPU Operation Modes Real Mode Real Mode is a holdover from the original Intel 8086. You generally won't need to know anything about it (unless you are programming for a DOS-based system or, more likely, writing a boot loader that is directly called by the BIOS). The Intel 8086 accessed memory using 20-bit addresses. But, as the processor itself was 16-bit, Intel invented an addressing scheme that provided a way of mapping a 20-bit addressing space into 16-bit words. Today's x86 processors start in the so- called Real Mode, which is an operating mode that mimics the behavior of the 8086, with some very tiny differences, for backwards compatibility.
  • 10. Protected Mode Flat Memory Model If programming in a modern operating system (such as Linux, Windows), you are basically programming in flat 32-bit mode. Any register can be used in addressing, and it is generally more efficient to use a full 32-bit register instead of a 16-bit register part. Additionally, segment registers are generally unused in flat mode, and it is generally a bad idea to touch them. Multi-Segmented Memory Model Using a 32-bit register to address memory the program can access (almost) all of the memory in a modern computer. For earlier processors (with only 16-bit registers) the segmented memory model was used. The 'CS', 'DS', and 'ES' registers are used to point to the different chunks of memory. For a small program (small model) the CS=DS=ES. For larger memory models, these 'segments' can point to different locations.