Short notes

8086 Memory Segmentation Short Notes

On an 8086 evaluation board with 1 MB of EPROM and RAM mapped across the full address space, the CPU divides memory into logical segments rather than treating it as a flat array. Each segment starts at any address that is a multiple of 16 (a paragraph boundary), and a 16-bit offset then selects a byte within that 64 KB window. This arrangement lets programs running on early IBM PC hardware address far more memory than a plain 16-bit address bus would allow.

EEE, ECE, EI

How it works

Memory segmentation in the 8086 splits the 1 MB space into overlapping 64 KB segments, each anchored by a segment register value. The starting physical address of any segment is the segment register value multiplied by 16 — equivalently, append a hex zero. For example, DS = 3000H gives a data segment starting at 30000H, and offset 0050H within it reaches physical address 30050H. Segments can overlap freely in real mode; two different segment:offset pairs can point to the same physical byte. The assembler directive SEGMENT…ENDS defines logical segments in 8086 assembly programs.

Key points to remember

The 8086 physical address is always 20 bits, spanning 00000H to FFFFFH — that is exactly 1,048,576 bytes or 1 MB. A segment can be up to 65,536 bytes (64 KB) long. Because segments start on paragraph boundaries (every 16 bytes), there are 65,536 possible segment starting points. Real-mode segmentation offers no memory protection, which is why protected mode was introduced in the 80286. The Interrupt Vector Table occupies segment 0000H, offsets 0000H to 03FFH — always 256 vectors of 4 bytes each.

Exam tip

Every Anna University microprocessors paper asks you to convert a logical address like 1A2BH:034CH to its physical address — practise at least five such conversions until you stop making carry errors in hex addition.

More Microprocessors notes