SlideShare a Scribd company logo
1 of 26
Download to read offline
II. 80x86 Family of Microprocessors

Programming Model
Objectives

 At the end of the lecture, the students
   should be able to:

  discuss the 80x86 Family of
   Microprocessors
  differentiate: Real Mode vs. Protected
   Mode
  discuss different addressing modes used in
   assembly programming
The 80x86 Family


                                       Maximum Addressable
    Processor   Data Bus Address Bus
                                            Memory
  8088             8         20               1MB
  8086             16        20               1MB
  80286            16        24               16MB
  80386            32        32                4GB
  80486            32        32                4GB
  Pentium          64        32                4GB
Intel and Intel-compatible Processors


           Processor           Data Bus   Register Size
  8088                           8-bit       16-bit
  8086                          16-bit       16-bit
  286                           16-bit       16-bit
  386                           32-bit       32-bit
  486/AMD-5x86                  32-bit       32-bit
  Pentium/AMD-K6                64-bit       32-bit
  Pentium Pro/Celeron/II/III    64-bit       32-bit
  AMD Duron/Athlon/Athlon XP    64-bit       32-bit
  Pentium 4                     64-bit       32-bit
  Itanium                       64-bit       64-bit
  AMD Athlon 64                 64-bit       64-bit
Intel Family Register Organization

 Note: 32 bit registers are not available on 8086, 8088, or 80286
Memory Organization
 (Ref: Aurora Simionescu, Memory organization and access of 80x86 processors)
Real Mode and Protected Mode

  Are operational modes of x86-
   compatible CPUs
  Real mode was invented first, original
   segment:offset addressing
  Protected mode is a modification of real
   mode addressing
Real Mode Memory Addressing

              Address       MEMORY


               0000h    Instruction # 1

               0001h    Instruction # 2

               0002h    Instruction # 3
   16-bit
   Register    0003h    Instruction # 4
                        .                 .
                        .                 .
                        .                 .
                            Data # 1
                            Data # 2

               FFFFh
Real Mode Memory Addressing

  Characterized by a 20 bit segmented
   memory address space
Real Mode Memory Addressing

               Address       MEMORY

     16-bit              Instruction # 1
   Segment
               00000h
    Register   00001h    Instruction # 2

               ...       Instruction # 3

               0FFFFh    Instruction # 4
                         .                 .
    16-bit               .                 .
    Offset
   Register    40000h
                         .                 .
               40001h        Data # 1

                ...          Data # 2

               4FFFFh
Real Mode Memory Addressing

  instruction can address any space
   within the 1 MB of RAM
  programs in real mode are typically
   part of OS or a special application
  Ex. 1000:1F00
Real Mode Memory Addressing

  instruction can address any space
   within the 1 MB of RAM
  programs in real mode are typically
   part of OS or a special application
  Ex. 1000:1F00



                 First, multiply the segment value by 10h.
                 Then add in the offset portion.
                 Their sum produces the physical address.
Real Mode Memory Addressing

  instruction can address any space
   within the 1 MB of RAM
  programs in real mode are typically
   part of OS or a special application
  Ex. 1000:1F00

        10000
    +    1F00    First, multiply the segment value by 10h.
                 Then add in the offset portion.
        11F00    Their sum produces the physical address.
Real Mode Memory Addressing
Real Mode Memory Addressing

 Disadvantage:
  Many segment:offset pairs refer to the same
   exact memory locations.
  For example, the segment:offset address
   047C:0048, 047D:0038 or 047E:0028 all refer to the
   physical address: 04808
  This can complicate the comparison of
   segmented addresses.
Protected Mode Memory Addressing


                     Has features
                      designed to
                      enhance
                      multitasking and
                      system stability,
                      memory protection
                      and support for
                      virtual memory.
Protected Mode Memory Addressing

  the mode that computer runs in when it has
   to support multiple users
  Linux, UNIX, Windows 9x, Windows NT uses
   protected mode



                       Use the segment as an index into
                       the segment descriptor array.
                       Fetch the value at this location
                       and add it to the offset to obtain
                       the physical address.
II. 80x86 Family of Microprocessors

Addressing Modes
Addressing Modes

  the way we address/specify operands in
   instructions.

 Three general types:
  Immediate
  Register
  Memory/Direct
Addressing Modes

  Immediate - transfers an immediate
   byte or word of data into the
   destination register or memory location
      ex. mov cx, 10

  Register - transfers a byte or word from
   the source register to the destination
   register
       ex. mov ax, bx
Addressing Modes

  Memory/Direct - moves a byte or
   word between a memory location
   and a register
      ex. mov ax, [num1]
            mov cx, [B800h]
Other Addressing Modes

  Register Indirect - transfers a byte or
   word of data between a register
   and the memory location addressed
   by an index register(DI or SI) or base
   register (BP or BX)
      ex. mov ax, [bx]
Other Addressing Modes

  Base Indexed - transfers a byte or
   word of data between a register
   and the memory location
   addressed by a base register (BP or
   BX) plus index (DI or SI) register
     ex. mov dx, [bx + di]
Other Addressing Modes

  Register Relative - transfers a byte or
   word of data between a register
   and the memory location addressed
   by an index register (DI or SI) or base
   register (BP or BX) plus displacement
      ex. mov dx, [bx + 1000h]
Other Addressing Modes

  Base Relative Plus Index - transfers a
   byte or word of data between a
   register and the memory location
   addressed by a base register (BP or
   BX) plus index register (DI or SI) plus
   displacement
      ex. mov ax, [bx + si + 100h]
Quiz
 1. In real mode addressing, if the
    segment:offset address is 1234:1001,
    what is its equivalent physical address?

 2. Given the following registers and memory
    segments,
                                11
                     1234h
   DI   1234h        1235h       6
   SI   1236h        1236h      24
                     1237h      19

  what would be the value of AL after the
  assembly code mov AL, [SI] is executed?

More Related Content

What's hot (7)

Storage unit
Storage unitStorage unit
Storage unit
 
Bits and bytes
Bits and bytesBits and bytes
Bits and bytes
 
Hardware basics: inside the box
Hardware basics: inside the boxHardware basics: inside the box
Hardware basics: inside the box
 
64bitsprocessor
64bitsprocessor64bitsprocessor
64bitsprocessor
 
C++
C++C++
C++
 
Ch07
Ch07Ch07
Ch07
 
Core 2 processors
Core 2 processorsCore 2 processors
Core 2 processors
 

Similar to Chapter2d

Microprocessor Part 1
Microprocessor    Part 1Microprocessor    Part 1
Microprocessor Part 1Sajan Agrawal
 
Micro[processor
Micro[processorMicro[processor
Micro[processorcollege
 
Advanced Microprocessors By Er. Swapnil Kaware
Advanced Microprocessors By Er. Swapnil KawareAdvanced Microprocessors By Er. Swapnil Kaware
Advanced Microprocessors By Er. Swapnil KawareProf. Swapnil V. Kaware
 
Advanced Microprocessors By Er. Swapnil Kaware
Advanced Microprocessors By Er. Swapnil Kaware Advanced Microprocessors By Er. Swapnil Kaware
Advanced Microprocessors By Er. Swapnil Kaware Prof. Swapnil V. Kaware
 
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
 
Intel 8086 microprocessor
Intel 8086 microprocessorIntel 8086 microprocessor
Intel 8086 microprocessorRavi Yasas
 
Session01_Intro.pdf
Session01_Intro.pdfSession01_Intro.pdf
Session01_Intro.pdfRahnerJames
 
Assembly_Language _Programming_UNIT.pptx
Assembly_Language _Programming_UNIT.pptxAssembly_Language _Programming_UNIT.pptx
Assembly_Language _Programming_UNIT.pptxVickyThakur61
 
COA Lecture 01(Introduction).pptx
COA Lecture 01(Introduction).pptxCOA Lecture 01(Introduction).pptx
COA Lecture 01(Introduction).pptxsyed rafi
 
The microprocessor and it's architecture
The microprocessor and it's architectureThe microprocessor and it's architecture
The microprocessor and it's architecturesamaa ali
 
8086 architecture and pin description
8086 architecture and pin description 8086 architecture and pin description
8086 architecture and pin description Aswini Dharmaraj
 
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
 
Students corner131
Students corner131Students corner131
Students corner131Satti286
 

Similar to Chapter2d (20)

[ASM] Lab2
[ASM] Lab2[ASM] Lab2
[ASM] Lab2
 
Al2ed chapter3
Al2ed chapter3Al2ed chapter3
Al2ed chapter3
 
Internal microprocessor architecture
Internal microprocessor architectureInternal microprocessor architecture
Internal microprocessor architecture
 
Microprocessor Part 1
Microprocessor    Part 1Microprocessor    Part 1
Microprocessor Part 1
 
Micro[processor
Micro[processorMicro[processor
Micro[processor
 
Advanced Microprocessors By Er. Swapnil Kaware
Advanced Microprocessors By Er. Swapnil KawareAdvanced Microprocessors By Er. Swapnil Kaware
Advanced Microprocessors By Er. Swapnil Kaware
 
Advanced Microprocessors By Er. Swapnil Kaware
Advanced Microprocessors By Er. Swapnil Kaware Advanced Microprocessors By Er. Swapnil Kaware
Advanced Microprocessors By Er. Swapnil Kaware
 
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
 
Intel 8086 microprocessor
Intel 8086 microprocessorIntel 8086 microprocessor
Intel 8086 microprocessor
 
Session01_Intro.pdf
Session01_Intro.pdfSession01_Intro.pdf
Session01_Intro.pdf
 
Assembly_Language _Programming_UNIT.pptx
Assembly_Language _Programming_UNIT.pptxAssembly_Language _Programming_UNIT.pptx
Assembly_Language _Programming_UNIT.pptx
 
COA Lecture 01(Introduction).pptx
COA Lecture 01(Introduction).pptxCOA Lecture 01(Introduction).pptx
COA Lecture 01(Introduction).pptx
 
The microprocessor and it's architecture
The microprocessor and it's architectureThe microprocessor and it's architecture
The microprocessor and it's architecture
 
8086 architecture and pin description
8086 architecture and pin description 8086 architecture and pin description
8086 architecture and pin description
 
Unit 1
Unit 1Unit 1
Unit 1
 
64 bits for developers
64 bits for developers64 bits for developers
64 bits for developers
 
x86_1.ppt
x86_1.pptx86_1.ppt
x86_1.ppt
 
Microprocessor lecture 2
Microprocessor lecture   2Microprocessor lecture   2
Microprocessor lecture 2
 
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)
 
Students corner131
Students corner131Students corner131
Students corner131
 

More from MaeEstherMaguadMaralit (15)

Chapter2c
Chapter2cChapter2c
Chapter2c
 
Chapter2b
Chapter2bChapter2b
Chapter2b
 
Chapter2a
Chapter2aChapter2a
Chapter2a
 
Chapter1c
Chapter1cChapter1c
Chapter1c
 
Chapter1b
Chapter1bChapter1b
Chapter1b
 
Chapter1a
Chapter1aChapter1a
Chapter1a
 
linked list (CMSC 123)
linked list (CMSC 123)linked list (CMSC 123)
linked list (CMSC 123)
 
HTTP
HTTPHTTP
HTTP
 
The lovedare
The lovedareThe lovedare
The lovedare
 
Cmsc 100 (web content)
Cmsc 100  (web content)Cmsc 100  (web content)
Cmsc 100 (web content)
 
Cmsc 100 (web forms)
Cmsc 100 (web forms)Cmsc 100 (web forms)
Cmsc 100 (web forms)
 
Cmsc 100 xhtml and css
Cmsc 100 xhtml and cssCmsc 100 xhtml and css
Cmsc 100 xhtml and css
 
Cmsc 100 (web programming in a nutshell)
Cmsc 100 (web programming in a nutshell)Cmsc 100 (web programming in a nutshell)
Cmsc 100 (web programming in a nutshell)
 
Chapter2a
Chapter2aChapter2a
Chapter2a
 
Chapter1b
Chapter1bChapter1b
Chapter1b
 

Recently uploaded

Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinojohnmickonozaleda
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 

Recently uploaded (20)

Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipino
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 

Chapter2d

  • 1. II. 80x86 Family of Microprocessors Programming Model
  • 2. Objectives At the end of the lecture, the students should be able to:  discuss the 80x86 Family of Microprocessors  differentiate: Real Mode vs. Protected Mode  discuss different addressing modes used in assembly programming
  • 3. The 80x86 Family Maximum Addressable Processor Data Bus Address Bus Memory 8088 8 20 1MB 8086 16 20 1MB 80286 16 24 16MB 80386 32 32 4GB 80486 32 32 4GB Pentium 64 32 4GB
  • 4. Intel and Intel-compatible Processors Processor Data Bus Register Size 8088 8-bit 16-bit 8086 16-bit 16-bit 286 16-bit 16-bit 386 32-bit 32-bit 486/AMD-5x86 32-bit 32-bit Pentium/AMD-K6 64-bit 32-bit Pentium Pro/Celeron/II/III 64-bit 32-bit AMD Duron/Athlon/Athlon XP 64-bit 32-bit Pentium 4 64-bit 32-bit Itanium 64-bit 64-bit AMD Athlon 64 64-bit 64-bit
  • 5. Intel Family Register Organization Note: 32 bit registers are not available on 8086, 8088, or 80286
  • 6. Memory Organization (Ref: Aurora Simionescu, Memory organization and access of 80x86 processors)
  • 7. Real Mode and Protected Mode  Are operational modes of x86- compatible CPUs  Real mode was invented first, original segment:offset addressing  Protected mode is a modification of real mode addressing
  • 8. Real Mode Memory Addressing Address MEMORY 0000h Instruction # 1 0001h Instruction # 2 0002h Instruction # 3 16-bit Register 0003h Instruction # 4 . . . . . . Data # 1 Data # 2 FFFFh
  • 9. Real Mode Memory Addressing  Characterized by a 20 bit segmented memory address space
  • 10. Real Mode Memory Addressing Address MEMORY 16-bit Instruction # 1 Segment 00000h Register 00001h Instruction # 2 ... Instruction # 3 0FFFFh Instruction # 4 . . 16-bit . . Offset Register 40000h . . 40001h Data # 1 ... Data # 2 4FFFFh
  • 11. Real Mode Memory Addressing  instruction can address any space within the 1 MB of RAM  programs in real mode are typically part of OS or a special application  Ex. 1000:1F00
  • 12. Real Mode Memory Addressing  instruction can address any space within the 1 MB of RAM  programs in real mode are typically part of OS or a special application  Ex. 1000:1F00 First, multiply the segment value by 10h. Then add in the offset portion. Their sum produces the physical address.
  • 13. Real Mode Memory Addressing  instruction can address any space within the 1 MB of RAM  programs in real mode are typically part of OS or a special application  Ex. 1000:1F00 10000 + 1F00 First, multiply the segment value by 10h. Then add in the offset portion. 11F00 Their sum produces the physical address.
  • 14. Real Mode Memory Addressing
  • 15. Real Mode Memory Addressing Disadvantage:  Many segment:offset pairs refer to the same exact memory locations.  For example, the segment:offset address 047C:0048, 047D:0038 or 047E:0028 all refer to the physical address: 04808  This can complicate the comparison of segmented addresses.
  • 16. Protected Mode Memory Addressing  Has features designed to enhance multitasking and system stability, memory protection and support for virtual memory.
  • 17. Protected Mode Memory Addressing  the mode that computer runs in when it has to support multiple users  Linux, UNIX, Windows 9x, Windows NT uses protected mode Use the segment as an index into the segment descriptor array. Fetch the value at this location and add it to the offset to obtain the physical address.
  • 18. II. 80x86 Family of Microprocessors Addressing Modes
  • 19. Addressing Modes  the way we address/specify operands in instructions. Three general types:  Immediate  Register  Memory/Direct
  • 20. Addressing Modes  Immediate - transfers an immediate byte or word of data into the destination register or memory location ex. mov cx, 10  Register - transfers a byte or word from the source register to the destination register ex. mov ax, bx
  • 21. Addressing Modes  Memory/Direct - moves a byte or word between a memory location and a register ex. mov ax, [num1] mov cx, [B800h]
  • 22. Other Addressing Modes  Register Indirect - transfers a byte or word of data between a register and the memory location addressed by an index register(DI or SI) or base register (BP or BX) ex. mov ax, [bx]
  • 23. Other Addressing Modes  Base Indexed - transfers a byte or word of data between a register and the memory location addressed by a base register (BP or BX) plus index (DI or SI) register ex. mov dx, [bx + di]
  • 24. Other Addressing Modes  Register Relative - transfers a byte or word of data between a register and the memory location addressed by an index register (DI or SI) or base register (BP or BX) plus displacement ex. mov dx, [bx + 1000h]
  • 25. Other Addressing Modes  Base Relative Plus Index - transfers a byte or word of data between a register and the memory location addressed by a base register (BP or BX) plus index register (DI or SI) plus displacement ex. mov ax, [bx + si + 100h]
  • 26. Quiz 1. In real mode addressing, if the segment:offset address is 1234:1001, what is its equivalent physical address? 2. Given the following registers and memory segments, 11 1234h DI 1234h 1235h 6 SI 1236h 1236h 24 1237h 19 what would be the value of AL after the assembly code mov AL, [SI] is executed?