Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Memory Segmentation

Memory segmentation - Is the process of dividing the computer memory into different overlapping segments. Memory segmentation in the 8086/8088 is used to allow the processor to access more than 64kb of memory, even though it is only a 16-bit processor. Each segment register allows access to one of 64k segments, each overlapping by 16 bytes, with the total addressability being 1mb. The memory used by 8086/88 processor is organized as segment memory. The 8086 CPU is able to address 1Mbyte of memory. 4 logical segments & functions: 1. 2. 3. 4. Code Segment (CS) - Used for storing instructions. Stack Segment (SS) - Used for stacking and storing the return address. Data Segment (DS) - Used for storing data bytes. Extra Segment (ES) - Used for storing extra data bytes.

Each segment size is equal to 64Kbytes. A segment can be located at any part of the memory. Advantages of segmented memory: Allows memory capacity to become 1Mbyte although the actual address to be handled are of 16bit 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. The segment registers are used to allow the instruction, data and stack portion of a program to be more than 64Kbytes long. The above can be achieved by using more than one code, data or stack segments.

Segment Registers: In8086/88 processors, there are four segment registers. The CD, SS, DS, ES registers. All segment registers are 16 bit in size. Each of the segment register stores the upper 16 bit address of the starting address of the corresponding segments. Overview: Segment registers hold the starting address of the corresponding registers. By segmentation we can effectively utilize the memory. By segmentation we can make 8086 as multitasking environment.

You might also like