[go: up one dir, main page]

0% found this document useful (0 votes)
320 views11 pages

8086 Memory Segmentation

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 11

8086 Microprocessor

MEMORY SEGMENTATION

By
G. Mahalakshmi Malini
Assistant Professor/ECE
Avinashilingam Institute for Home Science and Higher Education for Women
Introduction of memory Segmentation
 Segmentation is the process in which the main memory of the
computer is logically divided into different segments and each
segment has its own base address.

 Memory segmentation is the methods where whole memory is


divided into the smaller parts called segments of various sizes.

 A segment is just an area in memory.

 The process of dividing memory this way is called segmentation.


 These segments are data segment, code segment, stack

segment and extra segment.

 It is basically used to enhance the speed of execution of the

computer system, so that the processor is able to fetch and

execute the data from the memory easily and fast.


Memory Segmentation
 In memory, data is stored as bytes.

 Each byte has a specific address.

 Intel 8086 has 20 lines address bus.

 With 20 address lines, the memory that can be addressed is 2^20


bytes.

 2^20 = 1,048,576 bytes (1 MB).

 This 1MB memory is divided into 16 logical segments, each with a


memory of 64KB.
 8086 can access memory with address.

 Ranging from 0000H to FFFFH


Segments
 In 8086, memory has four different types of segments these are:

 Code segment

 Data segment

 Stack segment

 Extra segment
Segment Register
 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.
 Code segment register (CS): is used for addressing memory
location in the code segment of the memory, where the
executable program is stored

 Data segment register (DS): points to the data segment of the


memory where the data is stored.

 Extra segment register (ES): also refers to a segment in the


memory which s another data segment in the memory.

 Stack Segment Register (SS): is used for addressing Stack


segment of the memory. The stack segment is that of memory
which is used to store stack data.
Advantages and Disadvantages of
Segmentation
Advantages of Segmentation

 it permits the programmer to access 1MB memory using only


16 bit address.

 It divides the memory logically to store code, data and stack


portion separately. For data and code protection.

 Memory segmentation is very useful for multiuser environment.


Disadvantage of segmentation

 Although the total memory is 16*64kb, at a time only 4*

64kb memory can be accessed

You might also like