SlideShare a Scribd company logo
Lecture 8
Memory segmentation
Iqra university
Contents
• Review: Registers Organization
• Memory segments
• Physical address, Offset address
• Memory configuration
8086 REGISTER ORGANIZATION
ES
CS
SS
DS
IP
AH AL
BH BL
CH CL
DH DL
SP
BP
SI
DI
FLAGS
AX
BX
CX
DX
Extra Segment
Code Segment
Stack Segment
Data Segment
Instruction Pointer
Accumulator
Base Register
Count Register
Data Register
Stack Pointer
Base Pointer
Source Index
Destination Index
Type Register
size
Name of the
Register
General
purpose
registers
16 bit AX, BX, CX, DX
8 bit AL, AH, BL, BH,
CL, CH, DL, DH
16 bit SP, BPPointer
registers
Indexed
registers
16 bit SI, DI
Instruction
Pointer
16 bit IP
Segment
registers
16 bit CS, DS, SS, ES
Flags 16 bit Flag register
General Purpose Registers
8086 has 8 general purpose registers which:
Can be individually used for storing 8-bit data
Two registers can be combined to store 16-bit data
Valid register pairs are: AX, BX, CX, DX
AX is also called Accumulator having some special features
BX, also called Base Register is the only general purpose
register which can also be used in based-addressing mode
CX is also used as a default Counter Register in some
instructions (SHIFT, ROTATE & LOOP)
Acc. AH AL AX
Base
Counter
Data
BH BL BX
CH CL CX
DH DL DX
DX or Data Register is also
used by default to store upper
16-bit data in division and
multiplication operations
Register Name of the Register Special Function
AX 16-bit Accumulator Stores the 16-bit results of arithmetic and logic operations
AL 8-bit Accumulator Stores the 8-bit results of arithmetic and logic operations
BX Base register Used to hold base value in base addressing mode to access
memory data
CX Count Register Used to hold the count value in SHIFT, ROTATE and LOOP
instructions
DX Data Register Used to hold data for multiplication and division operations
SP Stack Pointer Used to hold the offset address of top stack memory location
BP Base Pointer Used to hold the offset or base value in based addressing
mode to access data from stack memory
SI Source Index Used to hold index value of source operand (data) for string
instructions
DI Data Index Used to hold the index value of destination operand (data) for
string operations
Memory Segmentation
Introduction
• Memory segmentation is nothing but a method where whole
memory is divided into the smaller parts. In 8086 microprocessor
memory are divided into four parts which is known as the segments.
these segments are
• Data Segment DS, Code Segment CS, Stack Segment SS and Extra
Segment ES
Memory Segmentation
• The total memory size is divided into its segments of various sizes.
• A segment is just an area in memory.
• The process of dividing memory is called Segmentation.
In memory, data is stored as bytes thatis 8bits.
Each byte has a specific address.
Intel 8086 has 20 lines address bus.
With 20 address lines it has 20 bit address, the memory that can be addressed is 2 ^20
bytes.
2^20= 1,048,576 bytes (1 MB).
8086 can access memory with address
ranging from 00000 H to FFFFF H.
Memory Segmentation
Each of these segments are addressed by an
address stored in corresponding segment register.
These registers are 16-bit in size.
Each register stores the base address
(starting address) of the corresponding
segment.
Because the segment registers cannot store 20
bits, they only store the upper 16 bits.
Segment
Register
Hence,
8086 has a 20-bit address bus & thus can address
a maximum of 1MB (2^20) of memory
But 8086 has 16-bit registers which can hold only
16-bit addresses
Solution is to divide 1MB memory in 64KB
segments
(2^16)(total sixteen) as they can be accessed by
using 16-bit
addresses. However, only 4 segments are
accessible by
8086 at a time. These 4 segments are:
Code segment: Used for storing the
codes or instructions
Stack segment: Used as a stack
•
•
•
•
Data segment: Used for storing data
Extra segment: Used for storing in-excess data
Advantages of Memory Segmentation:
Allows the memory capacity to be 1MB although actual addresses to be handled
are of 16-bit size
Allows the placing of code, data and stack portions of the same program in
different parts (segments) of the memory, for data and code protection.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Memory
00000H
FFFFFH
1MB
Address
Range
Each Segment is of 64KB
Memory= total 16 segments
Only 4 such segments can be
addressed (active) at a time
4
5
6
7
2^20= 1,048,576 bytes (1 MB).
8086 can access memory with address
ranging from 00000 H to FFFFF H
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Memory
00000H
FFFFFH
1MB
Address
Range
Code Segment
Stack Segment
Data & Extra
Segments
•Segments may or may not be
consecutive
•Segments can also be contiguous
(adjacent), disjointed or overlapping
• Accessing to memory location there are four addresses that you all
have to understand
• Segment address
• Offset/Effective address
• Logical address
• Physical address
Accessing Addresses
Segment address
• Segment address relates to memory segments
• As memory is of 1MB= 2^20 bytes so segment address is of 20 bits as
00000 to FFFFFH
• Where, segment are DATA, Stack, Code, Extra
• Segment register hold only upper 16 bits that is 0000H to FFFFH and
0H is appended is the last while calculating physical address
Offset/Effective Address
• Offset address is displacement address required to move in 64KB
memory segment.
• Offset is of 16 bits 0000H to FFFFH
Logical Address
• Logical address is implemented practically by compiler through
different emulators
• Logical address it self comprises of two parts
• Segment Address : Offset
Physical Address
• Physical Address is calculated by adding segment address (appended
by 0H ) to the offset or effective address
• Thank you for listening
• Queries will be answered on
VLE

More Related Content

What's hot

8086 handout for chapter one and two
8086 handout for chapter one and two8086 handout for chapter one and two
8086 handout for chapter one and two
haymanotyehuala
 
The 80386 80486
The 80386 80486The 80386 80486
The 80386 80486
Ancy Varghese
 
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
Prof. Swapnil V. Kaware
 
Oceangraphic data formats
Oceangraphic data formatsOceangraphic data formats
Oceangraphic data formats
Fiddy Prasetiya
 
File Types in Data Structure
File Types in Data StructureFile Types in Data Structure
File Types in Data Structure
Prof Ansari
 
Ch09 records management
Ch09 records managementCh09 records management
Ch09 records management
xtin101
 
Types of Databases
Types of DatabasesTypes of Databases
Types of Databases
kedar2310
 
Database management systems
Database management systemsDatabase management systems
Database management systems
Ujjwal 'Shanu'
 
Mpi chapter 2
Mpi chapter 2Mpi chapter 2
Mpi chapter 2
birhanugirmay
 
Unit 1
Unit 1Unit 1
Unit 1
riyasekaran
 
MS Access Intro
MS Access IntroMS Access Intro
MS Access Intro
DannyMondragon
 
Buffersdirectx
BuffersdirectxBuffersdirectx
Buffersdirectx
VisCircle
 
Adressing modes of 8086
Adressing modes of 8086Adressing modes of 8086
Adressing modes of 8086
KANNANKR12
 
8086 pin diagram description
8086 pin diagram description8086 pin diagram description
8086 pin diagram description
Akhil Singal
 
Dynamic multi level indexing Using B-Trees And B+ Trees
Dynamic multi level indexing Using B-Trees And B+ TreesDynamic multi level indexing Using B-Trees And B+ Trees
Dynamic multi level indexing Using B-Trees And B+ Trees
Pooja Dixit
 
File Organization
File OrganizationFile Organization
File Organization
Manyi Man
 
80386 processor
80386 processor80386 processor
80386 processor
Rasmi M
 
Lecture03 abap on line
Lecture03 abap on lineLecture03 abap on line
Lecture03 abap on line
Milind Patil
 

What's hot (18)

8086 handout for chapter one and two
8086 handout for chapter one and two8086 handout for chapter one and two
8086 handout for chapter one and two
 
The 80386 80486
The 80386 80486The 80386 80486
The 80386 80486
 
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
 
Oceangraphic data formats
Oceangraphic data formatsOceangraphic data formats
Oceangraphic data formats
 
File Types in Data Structure
File Types in Data StructureFile Types in Data Structure
File Types in Data Structure
 
Ch09 records management
Ch09 records managementCh09 records management
Ch09 records management
 
Types of Databases
Types of DatabasesTypes of Databases
Types of Databases
 
Database management systems
Database management systemsDatabase management systems
Database management systems
 
Mpi chapter 2
Mpi chapter 2Mpi chapter 2
Mpi chapter 2
 
Unit 1
Unit 1Unit 1
Unit 1
 
MS Access Intro
MS Access IntroMS Access Intro
MS Access Intro
 
Buffersdirectx
BuffersdirectxBuffersdirectx
Buffersdirectx
 
Adressing modes of 8086
Adressing modes of 8086Adressing modes of 8086
Adressing modes of 8086
 
8086 pin diagram description
8086 pin diagram description8086 pin diagram description
8086 pin diagram description
 
Dynamic multi level indexing Using B-Trees And B+ Trees
Dynamic multi level indexing Using B-Trees And B+ TreesDynamic multi level indexing Using B-Trees And B+ Trees
Dynamic multi level indexing Using B-Trees And B+ Trees
 
File Organization
File OrganizationFile Organization
File Organization
 
80386 processor
80386 processor80386 processor
80386 processor
 
Lecture03 abap on line
Lecture03 abap on lineLecture03 abap on line
Lecture03 abap on line
 

Similar to Lect 8 updated (1)

8086 class notes-Y.N.M
8086 class notes-Y.N.M8086 class notes-Y.N.M
8086 class notes-Y.N.M
Dr.YNM
 
[ASM] Lab2
[ASM] Lab2[ASM] Lab2
[ASM] Lab2
Nora Youssef
 
Intel 8086 microprocessor
Intel 8086 microprocessorIntel 8086 microprocessor
Intel 8086 microprocessor
Ravi Yasas
 
Microprocessor 80386
Microprocessor 80386Microprocessor 80386
Microprocessor 80386
yash sawarkar
 
80386
8038680386
Mpmc
MpmcMpmc
SAURABH MITRA-8086 MICROPROCESSOR
SAURABH MITRA-8086 MICROPROCESSORSAURABH MITRA-8086 MICROPROCESSOR
SAURABH MITRA-8086 MICROPROCESSOR
SAURABH MITRA
 
80386.pptx
80386.pptx80386.pptx
Architecture_of_80386_Microprocessor - Inroduction
Architecture_of_80386_Microprocessor - InroductionArchitecture_of_80386_Microprocessor - Inroduction
Architecture_of_80386_Microprocessor - Inroduction
rajasekarandpm
 
110 ec0644
110 ec0644110 ec0644
110 ec0644
Subhajit Sahu
 
8086 architecture By Er. Swapnil Kaware
8086 architecture By Er. Swapnil Kaware8086 architecture By Er. Swapnil Kaware
8086 architecture By Er. Swapnil Kaware
Prof. Swapnil V. Kaware
 
Internal Architecture of 8086| msbte sem 4 microprocessor
Internal Architecture of 8086| msbte sem 4 microprocessorInternal Architecture of 8086| msbte sem 4 microprocessor
Internal Architecture of 8086| msbte sem 4 microprocessor
AKSHAYBHABAD5
 
8051 microcontroller
 8051 microcontroller 8051 microcontroller
8051 microcontroller
haymanotyehuala
 
Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor  Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor
Mustapha Fatty
 
Assembly_Language _Programming_UNIT.pptx
Assembly_Language _Programming_UNIT.pptxAssembly_Language _Programming_UNIT.pptx
Assembly_Language _Programming_UNIT.pptx
VickyThakur61
 
Presentation on 8086 microprocessor
Presentation on 8086 microprocessorPresentation on 8086 microprocessor
Presentation on 8086 microprocessor
Diponkor Bala
 
8086 microprocessor-architecture-120207111857-phpapp01
8086 microprocessor-architecture-120207111857-phpapp018086 microprocessor-architecture-120207111857-phpapp01
8086 microprocessor-architecture-120207111857-phpapp01
destaw belay
 
8086 microprocessor-architecture-120207111857-phpapp01
8086 microprocessor-architecture-120207111857-phpapp018086 microprocessor-architecture-120207111857-phpapp01
8086 microprocessor-architecture-120207111857-phpapp01
Siva Raman
 
Architecture_of_80386_Micropro-An Introduction
Architecture_of_80386_Micropro-An IntroductionArchitecture_of_80386_Micropro-An Introduction
Architecture_of_80386_Micropro-An Introduction
rajasekarandpm
 
INTEL 8086 MICROPROCESSOR
INTEL 8086 MICROPROCESSORINTEL 8086 MICROPROCESSOR
INTEL 8086 MICROPROCESSOR
Sagar Kuntumal
 

Similar to Lect 8 updated (1) (20)

8086 class notes-Y.N.M
8086 class notes-Y.N.M8086 class notes-Y.N.M
8086 class notes-Y.N.M
 
[ASM] Lab2
[ASM] Lab2[ASM] Lab2
[ASM] Lab2
 
Intel 8086 microprocessor
Intel 8086 microprocessorIntel 8086 microprocessor
Intel 8086 microprocessor
 
Microprocessor 80386
Microprocessor 80386Microprocessor 80386
Microprocessor 80386
 
80386
8038680386
80386
 
Mpmc
MpmcMpmc
Mpmc
 
SAURABH MITRA-8086 MICROPROCESSOR
SAURABH MITRA-8086 MICROPROCESSORSAURABH MITRA-8086 MICROPROCESSOR
SAURABH MITRA-8086 MICROPROCESSOR
 
80386.pptx
80386.pptx80386.pptx
80386.pptx
 
Architecture_of_80386_Microprocessor - Inroduction
Architecture_of_80386_Microprocessor - InroductionArchitecture_of_80386_Microprocessor - Inroduction
Architecture_of_80386_Microprocessor - Inroduction
 
110 ec0644
110 ec0644110 ec0644
110 ec0644
 
8086 architecture By Er. Swapnil Kaware
8086 architecture By Er. Swapnil Kaware8086 architecture By Er. Swapnil Kaware
8086 architecture By Er. Swapnil Kaware
 
Internal Architecture of 8086| msbte sem 4 microprocessor
Internal Architecture of 8086| msbte sem 4 microprocessorInternal Architecture of 8086| msbte sem 4 microprocessor
Internal Architecture of 8086| msbte sem 4 microprocessor
 
8051 microcontroller
 8051 microcontroller 8051 microcontroller
8051 microcontroller
 
Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor  Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor
 
Assembly_Language _Programming_UNIT.pptx
Assembly_Language _Programming_UNIT.pptxAssembly_Language _Programming_UNIT.pptx
Assembly_Language _Programming_UNIT.pptx
 
Presentation on 8086 microprocessor
Presentation on 8086 microprocessorPresentation on 8086 microprocessor
Presentation on 8086 microprocessor
 
8086 microprocessor-architecture-120207111857-phpapp01
8086 microprocessor-architecture-120207111857-phpapp018086 microprocessor-architecture-120207111857-phpapp01
8086 microprocessor-architecture-120207111857-phpapp01
 
8086 microprocessor-architecture-120207111857-phpapp01
8086 microprocessor-architecture-120207111857-phpapp018086 microprocessor-architecture-120207111857-phpapp01
8086 microprocessor-architecture-120207111857-phpapp01
 
Architecture_of_80386_Micropro-An Introduction
Architecture_of_80386_Micropro-An IntroductionArchitecture_of_80386_Micropro-An Introduction
Architecture_of_80386_Micropro-An Introduction
 
INTEL 8086 MICROPROCESSOR
INTEL 8086 MICROPROCESSORINTEL 8086 MICROPROCESSOR
INTEL 8086 MICROPROCESSOR
 

More from talhashahid40

Talha 11009 call_quiz_addressing_modes
Talha 11009 call_quiz_addressing_modesTalha 11009 call_quiz_addressing_modes
Talha 11009 call_quiz_addressing_modes
talhashahid40
 
Only floating point lecture 7 (1)
Only floating point lecture 7 (1)Only floating point lecture 7 (1)
Only floating point lecture 7 (1)
talhashahid40
 
Lecture 11
Lecture 11Lecture 11
Lecture 11
talhashahid40
 
Lecture 10
Lecture 10Lecture 10
Lecture 10
talhashahid40
 
Lecture 9 examples (1)
Lecture 9 examples (1)Lecture 9 examples (1)
Lecture 9 examples (1)
talhashahid40
 
Coal (1)
Coal (1)Coal (1)
Coal (1)
talhashahid40
 
Chapter 7
Chapter 7Chapter 7
Chapter 7
talhashahid40
 
Chapter 3 caal (1)
Chapter 3 caal (1)Chapter 3 caal (1)
Chapter 3 caal (1)
talhashahid40
 

More from talhashahid40 (8)

Talha 11009 call_quiz_addressing_modes
Talha 11009 call_quiz_addressing_modesTalha 11009 call_quiz_addressing_modes
Talha 11009 call_quiz_addressing_modes
 
Only floating point lecture 7 (1)
Only floating point lecture 7 (1)Only floating point lecture 7 (1)
Only floating point lecture 7 (1)
 
Lecture 11
Lecture 11Lecture 11
Lecture 11
 
Lecture 10
Lecture 10Lecture 10
Lecture 10
 
Lecture 9 examples (1)
Lecture 9 examples (1)Lecture 9 examples (1)
Lecture 9 examples (1)
 
Coal (1)
Coal (1)Coal (1)
Coal (1)
 
Chapter 7
Chapter 7Chapter 7
Chapter 7
 
Chapter 3 caal (1)
Chapter 3 caal (1)Chapter 3 caal (1)
Chapter 3 caal (1)
 

Recently uploaded

Medical Orthopedic PowerPoint Templates.pptx
Medical Orthopedic PowerPoint Templates.pptxMedical Orthopedic PowerPoint Templates.pptx
Medical Orthopedic PowerPoint Templates.pptx
terusbelajar5
 
Randomised Optimisation Algorithms in DAPHNE
Randomised Optimisation Algorithms in DAPHNERandomised Optimisation Algorithms in DAPHNE
Randomised Optimisation Algorithms in DAPHNE
University of Maribor
 
Chapter 12 - climate change and the energy crisis
Chapter 12 - climate change and the energy crisisChapter 12 - climate change and the energy crisis
Chapter 12 - climate change and the energy crisis
tonzsalvador2222
 
Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...
Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...
Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...
University of Maribor
 
What is greenhouse gasses and how many gasses are there to affect the Earth.
What is greenhouse gasses and how many gasses are there to affect the Earth.What is greenhouse gasses and how many gasses are there to affect the Earth.
What is greenhouse gasses and how many gasses are there to affect the Earth.
moosaasad1975
 
Thornton ESPP slides UK WW Network 4_6_24.pdf
Thornton ESPP slides UK WW Network 4_6_24.pdfThornton ESPP slides UK WW Network 4_6_24.pdf
Thornton ESPP slides UK WW Network 4_6_24.pdf
European Sustainable Phosphorus Platform
 
如何办理(uvic毕业证书)维多利亚大学毕业证本科学位证书原版一模一样
如何办理(uvic毕业证书)维多利亚大学毕业证本科学位证书原版一模一样如何办理(uvic毕业证书)维多利亚大学毕业证本科学位证书原版一模一样
如何办理(uvic毕业证书)维多利亚大学毕业证本科学位证书原版一模一样
yqqaatn0
 
Shallowest Oil Discovery of Turkiye.pptx
Shallowest Oil Discovery of Turkiye.pptxShallowest Oil Discovery of Turkiye.pptx
Shallowest Oil Discovery of Turkiye.pptx
Gokturk Mehmet Dilci
 
Phenomics assisted breeding in crop improvement
Phenomics assisted breeding in crop improvementPhenomics assisted breeding in crop improvement
Phenomics assisted breeding in crop improvement
IshaGoswami9
 
mô tả các thí nghiệm về đánh giá tác động dòng khí hóa sau đốt
mô tả các thí nghiệm về đánh giá tác động dòng khí hóa sau đốtmô tả các thí nghiệm về đánh giá tác động dòng khí hóa sau đốt
mô tả các thí nghiệm về đánh giá tác động dòng khí hóa sau đốt
HongcNguyn6
 
aziz sancar nobel prize winner: from mardin to nobel
aziz sancar nobel prize winner: from mardin to nobelaziz sancar nobel prize winner: from mardin to nobel
aziz sancar nobel prize winner: from mardin to nobel
İsa Badur
 
SAR of Medicinal Chemistry 1st by dk.pdf
SAR of Medicinal Chemistry 1st by dk.pdfSAR of Medicinal Chemistry 1st by dk.pdf
SAR of Medicinal Chemistry 1st by dk.pdf
KrushnaDarade1
 
3D Hybrid PIC simulation of the plasma expansion (ISSS-14)
3D Hybrid PIC simulation of the plasma expansion (ISSS-14)3D Hybrid PIC simulation of the plasma expansion (ISSS-14)
3D Hybrid PIC simulation of the plasma expansion (ISSS-14)
David Osipyan
 
molar-distalization in orthodontics-seminar.pptx
molar-distalization in orthodontics-seminar.pptxmolar-distalization in orthodontics-seminar.pptx
molar-distalization in orthodontics-seminar.pptx
Anagha Prasad
 
Topic: SICKLE CELL DISEASE IN CHILDREN-3.pdf
Topic: SICKLE CELL DISEASE IN CHILDREN-3.pdfTopic: SICKLE CELL DISEASE IN CHILDREN-3.pdf
Topic: SICKLE CELL DISEASE IN CHILDREN-3.pdf
TinyAnderson
 
Equivariant neural networks and representation theory
Equivariant neural networks and representation theoryEquivariant neural networks and representation theory
Equivariant neural networks and representation theory
Daniel Tubbenhauer
 
BREEDING METHODS FOR DISEASE RESISTANCE.pptx
BREEDING METHODS FOR DISEASE RESISTANCE.pptxBREEDING METHODS FOR DISEASE RESISTANCE.pptx
BREEDING METHODS FOR DISEASE RESISTANCE.pptx
RASHMI M G
 
Deep Software Variability and Frictionless Reproducibility
Deep Software Variability and Frictionless ReproducibilityDeep Software Variability and Frictionless Reproducibility
Deep Software Variability and Frictionless Reproducibility
University of Rennes, INSA Rennes, Inria/IRISA, CNRS
 
NuGOweek 2024 Ghent programme overview flyer
NuGOweek 2024 Ghent programme overview flyerNuGOweek 2024 Ghent programme overview flyer
NuGOweek 2024 Ghent programme overview flyer
pablovgd
 
Nucleophilic Addition of carbonyl compounds.pptx
Nucleophilic Addition of carbonyl  compounds.pptxNucleophilic Addition of carbonyl  compounds.pptx
Nucleophilic Addition of carbonyl compounds.pptx
SSR02
 

Recently uploaded (20)

Medical Orthopedic PowerPoint Templates.pptx
Medical Orthopedic PowerPoint Templates.pptxMedical Orthopedic PowerPoint Templates.pptx
Medical Orthopedic PowerPoint Templates.pptx
 
Randomised Optimisation Algorithms in DAPHNE
Randomised Optimisation Algorithms in DAPHNERandomised Optimisation Algorithms in DAPHNE
Randomised Optimisation Algorithms in DAPHNE
 
Chapter 12 - climate change and the energy crisis
Chapter 12 - climate change and the energy crisisChapter 12 - climate change and the energy crisis
Chapter 12 - climate change and the energy crisis
 
Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...
Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...
Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...
 
What is greenhouse gasses and how many gasses are there to affect the Earth.
What is greenhouse gasses and how many gasses are there to affect the Earth.What is greenhouse gasses and how many gasses are there to affect the Earth.
What is greenhouse gasses and how many gasses are there to affect the Earth.
 
Thornton ESPP slides UK WW Network 4_6_24.pdf
Thornton ESPP slides UK WW Network 4_6_24.pdfThornton ESPP slides UK WW Network 4_6_24.pdf
Thornton ESPP slides UK WW Network 4_6_24.pdf
 
如何办理(uvic毕业证书)维多利亚大学毕业证本科学位证书原版一模一样
如何办理(uvic毕业证书)维多利亚大学毕业证本科学位证书原版一模一样如何办理(uvic毕业证书)维多利亚大学毕业证本科学位证书原版一模一样
如何办理(uvic毕业证书)维多利亚大学毕业证本科学位证书原版一模一样
 
Shallowest Oil Discovery of Turkiye.pptx
Shallowest Oil Discovery of Turkiye.pptxShallowest Oil Discovery of Turkiye.pptx
Shallowest Oil Discovery of Turkiye.pptx
 
Phenomics assisted breeding in crop improvement
Phenomics assisted breeding in crop improvementPhenomics assisted breeding in crop improvement
Phenomics assisted breeding in crop improvement
 
mô tả các thí nghiệm về đánh giá tác động dòng khí hóa sau đốt
mô tả các thí nghiệm về đánh giá tác động dòng khí hóa sau đốtmô tả các thí nghiệm về đánh giá tác động dòng khí hóa sau đốt
mô tả các thí nghiệm về đánh giá tác động dòng khí hóa sau đốt
 
aziz sancar nobel prize winner: from mardin to nobel
aziz sancar nobel prize winner: from mardin to nobelaziz sancar nobel prize winner: from mardin to nobel
aziz sancar nobel prize winner: from mardin to nobel
 
SAR of Medicinal Chemistry 1st by dk.pdf
SAR of Medicinal Chemistry 1st by dk.pdfSAR of Medicinal Chemistry 1st by dk.pdf
SAR of Medicinal Chemistry 1st by dk.pdf
 
3D Hybrid PIC simulation of the plasma expansion (ISSS-14)
3D Hybrid PIC simulation of the plasma expansion (ISSS-14)3D Hybrid PIC simulation of the plasma expansion (ISSS-14)
3D Hybrid PIC simulation of the plasma expansion (ISSS-14)
 
molar-distalization in orthodontics-seminar.pptx
molar-distalization in orthodontics-seminar.pptxmolar-distalization in orthodontics-seminar.pptx
molar-distalization in orthodontics-seminar.pptx
 
Topic: SICKLE CELL DISEASE IN CHILDREN-3.pdf
Topic: SICKLE CELL DISEASE IN CHILDREN-3.pdfTopic: SICKLE CELL DISEASE IN CHILDREN-3.pdf
Topic: SICKLE CELL DISEASE IN CHILDREN-3.pdf
 
Equivariant neural networks and representation theory
Equivariant neural networks and representation theoryEquivariant neural networks and representation theory
Equivariant neural networks and representation theory
 
BREEDING METHODS FOR DISEASE RESISTANCE.pptx
BREEDING METHODS FOR DISEASE RESISTANCE.pptxBREEDING METHODS FOR DISEASE RESISTANCE.pptx
BREEDING METHODS FOR DISEASE RESISTANCE.pptx
 
Deep Software Variability and Frictionless Reproducibility
Deep Software Variability and Frictionless ReproducibilityDeep Software Variability and Frictionless Reproducibility
Deep Software Variability and Frictionless Reproducibility
 
NuGOweek 2024 Ghent programme overview flyer
NuGOweek 2024 Ghent programme overview flyerNuGOweek 2024 Ghent programme overview flyer
NuGOweek 2024 Ghent programme overview flyer
 
Nucleophilic Addition of carbonyl compounds.pptx
Nucleophilic Addition of carbonyl  compounds.pptxNucleophilic Addition of carbonyl  compounds.pptx
Nucleophilic Addition of carbonyl compounds.pptx
 

Lect 8 updated (1)

  • 2. Contents • Review: Registers Organization • Memory segments • Physical address, Offset address • Memory configuration
  • 3. 8086 REGISTER ORGANIZATION ES CS SS DS IP AH AL BH BL CH CL DH DL SP BP SI DI FLAGS AX BX CX DX Extra Segment Code Segment Stack Segment Data Segment Instruction Pointer Accumulator Base Register Count Register Data Register Stack Pointer Base Pointer Source Index Destination Index Type Register size Name of the Register General purpose registers 16 bit AX, BX, CX, DX 8 bit AL, AH, BL, BH, CL, CH, DL, DH 16 bit SP, BPPointer registers Indexed registers 16 bit SI, DI Instruction Pointer 16 bit IP Segment registers 16 bit CS, DS, SS, ES Flags 16 bit Flag register
  • 4. General Purpose Registers 8086 has 8 general purpose registers which: Can be individually used for storing 8-bit data Two registers can be combined to store 16-bit data Valid register pairs are: AX, BX, CX, DX AX is also called Accumulator having some special features BX, also called Base Register is the only general purpose register which can also be used in based-addressing mode CX is also used as a default Counter Register in some instructions (SHIFT, ROTATE & LOOP) Acc. AH AL AX Base Counter Data BH BL BX CH CL CX DH DL DX DX or Data Register is also used by default to store upper 16-bit data in division and multiplication operations
  • 5. Register Name of the Register Special Function AX 16-bit Accumulator Stores the 16-bit results of arithmetic and logic operations AL 8-bit Accumulator Stores the 8-bit results of arithmetic and logic operations BX Base register Used to hold base value in base addressing mode to access memory data CX Count Register Used to hold the count value in SHIFT, ROTATE and LOOP instructions DX Data Register Used to hold data for multiplication and division operations SP Stack Pointer Used to hold the offset address of top stack memory location BP Base Pointer Used to hold the offset or base value in based addressing mode to access data from stack memory SI Source Index Used to hold index value of source operand (data) for string instructions DI Data Index Used to hold the index value of destination operand (data) for string operations
  • 7. Introduction • Memory segmentation is nothing but a method where whole memory is divided into the smaller parts. In 8086 microprocessor memory are divided into four parts which is known as the segments. these segments are • Data Segment DS, Code Segment CS, Stack Segment SS and Extra Segment ES
  • 8. Memory Segmentation • The total memory size is divided into its segments of various sizes. • A segment is just an area in memory. • The process of dividing memory is called Segmentation.
  • 9. In memory, data is stored as bytes thatis 8bits. Each byte has a specific address. Intel 8086 has 20 lines address bus. With 20 address lines it has 20 bit address, the memory that can be addressed is 2 ^20 bytes. 2^20= 1,048,576 bytes (1 MB). 8086 can access memory with address ranging from 00000 H to FFFFF H. Memory Segmentation
  • 10.
  • 11. Each of these segments are addressed by an address stored in corresponding segment register. These registers are 16-bit in size. Each register stores the base address (starting address) of the corresponding segment. Because the segment registers cannot store 20 bits, they only store the upper 16 bits. Segment Register
  • 12. Hence, 8086 has a 20-bit address bus & thus can address a maximum of 1MB (2^20) of memory But 8086 has 16-bit registers which can hold only 16-bit addresses Solution is to divide 1MB memory in 64KB segments (2^16)(total sixteen) as they can be accessed by using 16-bit addresses. However, only 4 segments are accessible by 8086 at a time. These 4 segments are: Code segment: Used for storing the codes or instructions Stack segment: Used as a stack • • • • Data segment: Used for storing data Extra segment: Used for storing in-excess data
  • 13.
  • 14. Advantages of Memory Segmentation: Allows the memory capacity to be 1MB although actual addresses to be handled are of 16-bit size Allows the placing of code, data and stack portions of the same program in different parts (segments) of the memory, for data and code protection.
  • 15. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Memory 00000H FFFFFH 1MB Address Range Each Segment is of 64KB Memory= total 16 segments Only 4 such segments can be addressed (active) at a time 4 5 6 7 2^20= 1,048,576 bytes (1 MB). 8086 can access memory with address ranging from 00000 H to FFFFF H
  • 16. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Memory 00000H FFFFFH 1MB Address Range Code Segment Stack Segment Data & Extra Segments •Segments may or may not be consecutive •Segments can also be contiguous (adjacent), disjointed or overlapping
  • 17. • Accessing to memory location there are four addresses that you all have to understand • Segment address • Offset/Effective address • Logical address • Physical address Accessing Addresses
  • 18. Segment address • Segment address relates to memory segments • As memory is of 1MB= 2^20 bytes so segment address is of 20 bits as 00000 to FFFFFH • Where, segment are DATA, Stack, Code, Extra • Segment register hold only upper 16 bits that is 0000H to FFFFH and 0H is appended is the last while calculating physical address
  • 19. Offset/Effective Address • Offset address is displacement address required to move in 64KB memory segment. • Offset is of 16 bits 0000H to FFFFH
  • 20. Logical Address • Logical address is implemented practically by compiler through different emulators • Logical address it self comprises of two parts • Segment Address : Offset
  • 21. Physical Address • Physical Address is calculated by adding segment address (appended by 0H ) to the offset or effective address
  • 22.
  • 23. • Thank you for listening • Queries will be answered on VLE