8086 Memory Organization PDF
8086 Memory Organization PDF
8086 Memory Organization PDF
Segmented Memory
Two types of memory organization are used:
Linear addressing where the entire memory is available to the processor at all the times
( Motorola 68000 family).
Segmented addressing where the memory space is divided into several segments and
the processor is limited to access program instructions and data in specific segments.
8086 Memory Organization
Each memory location 8086 is a byte while the 8086 is a 16-bits microprocessor?
Many of the 8086 s operation codes are single bytes.
I/O devices like printers, terminals and modems are designed to transfer ASCII encoded data.
The 8086 has a 20-bits address bus, allowing to access a memory of 220 = 1 M locations.
1048575
1048574
5
Data Bus
Segment Registers
Within the 1MB of memory space, the 8086 defines four 64 K memory blocks:
The code segment, stack segment, data segment, extra segment.
Each of these blocks of memory is used differently by the processor.
The code segment holds the program instruction codes.
The data segment holds the data of the program.
The extra segment is an extra data segment (often used for shared data).
The stack segment is used to store interrupt and subroutine return addresses.
There are four segment registers CS, DS, ES and SS and each of them defines the starting address
of the corresponding segment.
Each segment register is 16 bits wide while the address bus is 20 bits wide. The BIU takes care of
this by appending four 0s to the low order bits of the segment register.
Segment register
0 0 0 0
Address Bus
Code
Segment
E0000h
egment
CS
E000h
Data
Segment
DS
C2E0h
C2E00
hegme
nt
SS
Stack
Segment
4F98h
4F980h
egment
ES
4A000h
Extra
Segment
4A00h
Example
Assuming the four segment register contain the values shown in the above figure, calculate the
beginning and ending addresses of the four segments.
Segment register
0 0 0 0
Adder
Physical
Address
Types of memory
Reference
Instruction fetch
Stack operation
General data
String source
String destination
BX used as pointer
BP used as pointer
Default Segment
Alternate Segment
CS
SS
DS
DS
ES
DS
SS
None
None
CS, ES, SS
CS, ES, SS
None
CS, ES, SS
CS, ES, SS
Offset (Logical
Address)
IP
SP
Effective address
SI
DI
Effective address
Effective address