Farewell to Segmented Memory: The Rise and Fall of Intel 8086 Memory Segmentation
Computer enthusiast BillPg, while designing a fictional 1980s home computer, revisited the logic behind Intel 8086 memory segmentation. He argues that segmented memory was actually a sound idea at the time, but fell victim to developer misuse and bad habits, ultimately being superseded by the modern Memory Management Unit (MMU).

Highlights
- Intel introduced 8086 memory segmentation to break the 64KB address limit of 16-bit processors while maintaining backward compatibility with 8080/Z80 software.
- The 8086's segment register design produced overlapping addresses (e.g., 0000:0010 and 0001:0000 point to the same location), an unintended byproduct that developers began to exploit.
- By the time the 80286 correctly implemented segments as memory region descriptors, developers had already adopted flat-segment workarounds and the habit was impossible to reverse.
- "Unreal Mode" — switching from Protected Mode to Real Mode after defining a flat segment — was independently discovered by multiple developers as a way to access flat address space on x86 hardware.
- The functional role of memory segmentation has since been absorbed into the modern Memory Management Unit (MMU), operating transparently to application developers.
Farewell to Segmented Memory: The Rise and Fall of Intel 8086 Memory Segmentation
A computer enthusiast who goes by the handle BillPg has been working on designing a fictional 1980s-era home computer. In doing so, he took a fresh look at the design assumptions that were once taken for granted in the early days of personal computing — assumptions that hindsight does not always judge fairly, often colored by modern thinking. Some decisions that seem absurd today made perfect sense in their original context. Among them, he took a particularly close look at the much-maligned 8086 memory segmentation mechanism.
The 64KB Barrier and the Attempt to Break It
For those unfamiliar with the history: the 8086/8088 processors faced a thorny problem. Intel wanted the chips to maintain conceptual software compatibility with 8080- and Z80-based computers, which used 16-bit addresses — meaning a hard memory ceiling of just 64KB. When Intel set out to design the next generation of chips, it knew the 64KB limit had to go, but demanding that developers rewrite all their code was simply not realistic. The concept of segmentation — dividing memory into multiple 64KB segments — was born from this constraint.
The Gap Between Theory and Reality
In theory, a 16-bit segment register could provide four additional address bits, which when combined with the standard 16-bit offset would form a 32-bit address space — even though the CPU itself only had 20 physical address lines. Programs that ran comfortably within 64KB could carry on without modification, while a high-end system could theoretically host up to 16 such "worlds." Future systems could extend this further.
In practice, however, Intel used the segment register value as the upper 16 bits of a 32-bit address, then added the standard 16-bit offset. This meant that address 0000:0010 (segment=0, offset=0x10) pointed to the same memory location as 0001:0000, and 0010:0010 was equivalent to 0000:0110 or 0001:0100. This overlapping address behavior was not part of the original design intent — it was simply a byproduct of how the chip operated.
A Good Idea Buried by Bad Habits
Over time, segment registers evolved into indices pointing to descriptor tables (as illustrated in the header image), but by then poor programming habits had taken deep root, and a workable idea had been tarnished. The original designers almost certainly never anticipated that developers would deliberately exploit those overlapping addresses — but exploit them they did.
By the time the 80286 and its successors genuinely reimplemented segment registers as "keys" defining discrete memory regions, developers had long since grown accustomed to treating segment-plus-offset as one large pointer. C compilers even offered different memory models that let developers treat segments as simple extra address bits. As a result, even on newer processors, the common approach was to define a single flat segment — one stretching from address 0 to the top of memory — and ignore segmentation entirely.
In fact, many developers independently discovered that by defining a flat segment in Protected Mode and then switching back to Real Mode, they could enjoy a flat address space. This trick came to be known as "Unreal Mode" — a fascinating footnote in computing history.
Segmented Memory: A Good Idea Ahead of Its Time
We agree with BillPg's assessment: segmented memory was a good idea for its era, and had developers used it "correctly," it might have proven far more significant. It was not without potential drawbacks — proper segmentation might have supported virtual memory relatively easily, for instance, but at the cost of swapping large memory segments in and out, rather than the comparatively small pages favored by modern operating systems.
Today, most of what segmented memory was supposed to accomplish has been absorbed into the Memory Management Unit (MMU), where it operates largely transparently to application developers. Even so, revisiting why Intel made that design choice and tracing how we arrived at where we are today remains a genuinely fascinating exercise in computing history.
原文來源: 查看原文
FAQ
Newsletter
Subscribe to our Low-Altitude Industry Newsletter
Daily curated news on low-altitude economy and drone industry, delivered to your inbox.
Reviewed and published by the LAETimes editorial desk ·


