
Taming Intel's "Brain Damaged" Chip
The first generation of Intel’s 16-bit microprocessors turned out to be a surprising success after IBM chose their 8088 model for the IBM PC computer.
以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。
Nemanja Trifunovic
Oct 24, 2026
3
Share
The first generation of Intel’s 16-bit microprocessors turned out to be a surprising success after IBM chose their 8088 model for the IBM PC computer.
Many software industry leaders expected the transition from 8-bit to 16-bit computing to bring more capable operating systems, including multitasking and networking support. That did not happen: the IBM PC shipped with a clone of the old, single-tasking CP/M operating system, called PC DOS and most of the industry followed.
In early 1982, Intel announced the next generation of its x86 processors, the 80286, and there was hope the operating systems would finally catch up. That did not happen either.
The 80286 could be run in one of the two modes: Real Address Mode or Protected Virtual Address Mode1 .
Real Address Mode, usually called “Real Mode” was a compatibility feature. The CPU would start in Real Mode and would be able to run software written for the 8086 architecture without any modifications. Strictly speaking, there were a few instructions available in the 286 Real Mode that did not exist in the original 8086 set, but they would not interfere with the compatibility.
To have access to the full set of advanced CPU’s features, an application could switch to Protected Virtual Address Mode (often called “Protected Mode”). Once in Protected Mode, the CPU offered much larger address space (16 MB vs 1 MB in Real Mode), built-in support for virtual memory, efficient context switching to better support multitasking, and four protection rings which enabled different levels of trust for kernel and user modes.
The new features were very attractive to the implementors of multitasking operating systems such as various UNIX derivatives. Even the Real Mode provided significant performance improvements to the older generation of the Intel’s 16-bit chips, and already in June of 1982 IBM decided to base its next generation model of the IBM PC on the 80286. The new computer, named IBM PC AT was announced in August 1984, and was soon followed by numerous clones from companies such as Compaq, Tandy, HP and even Commodore. It was positioned as a high-end model and did not replace the existing IBM PC and XT ones that continued to be produced until the PS/2 line was released in 1987.
It was clear that a simple single-user operating system such as MS-DOS/PC-DOS could not take the full advantage of the Intel’s new “superchip”2 . The IBM PC AT shipped with PC-DOS 3.0 which was specifically written to preserve backwards compatibility to the highest degree possible. For all its new features, PC-DOS ran in Real Mode, could see only 1 MB of memory (with only 640 KB being available to software and data) and offered no real multitasking or protection from an application crashing the entire system. The challenge was not designing a modern operating system but designing one that could still run Lotus 1-2-3.
There was a detail that made the task of creating such an operating system much more difficult than anybody expected: once an 80286 CPU started, it was in the Real Mode. Switching to the Protected Mode was well supported and trivially easy. Going back from the Protected Mode to Real Mode was not supported - it required a restart. This feature frustrated the operating system designers to the point that Bill Gates famously called the 80286 a “brain damaged chip”3.
Why was that such a problem? A modern, multitasking, operating system needed to run in the Protected Mode to use the advanced 80286 features. From there, running applications written for the new environment would be easy - such programs would not assume they could access the hardware directly, or mess up with arbitrary memory locations. However, by 1984 it became critically important to run existing software, like Lotus 1-2-3 which was written with no such limitations in mind - it assumed complete control over the machine it ran on, which is what the old 8086 and PC-DOS enabled.
To run a legacy DOS application from Protected Mode, there were two possible approaches:
The first technique was to run even the DOS applications in Protected Mode. Strictly speaking, software written with the 8086 instruction set could run in Protected Mode just fine as long as it never accessed hardware directly, or used Protected Mode only instructions, or trying to make tricks with segments arithmetic… Of course, pretty much no real-life programs adhered to these limits and sooner or later they would cause protection faults. The goal was to handle all the faults caused by the 8086 programs and restart them at the point where they were interrupted. If implemented correctly, this mechanism could run multiple legacy applications simultaneously and safely while keeping the operating system in control. Of course, the implementation was extremely tricky, and the performance was going to suffer when there were many faults. This technique was sometimes referred as an “emulation” of Real Mode, although the term was somewhat misleading; the 8086 instructions ran natively in Protected Mode without any emulation.
The second mechanism was to run the operating system in Protected Mode and switch to Real Mode to run a DOS program. As mentioned, the only way to do it was to involve the reset and a few techniques to do that were used in different situations. This technique was simpler (once the switch actually happened), the legacy applications could access hardware without supervision from the OS and generally performed better. One major downside was that once the CPU was in Real Mode, there was no more multitasking - it was not possible to run multiple 8086 applications simultaneously.
The two major system software providers: Digital Research Inc (DRI) and Microsoft took two different approaches: DRI with support from Intel went with pure Protected Mode, and Microsoft along with IBM opted for restarting the CPU into Real Mode. Let’s see how that went.
Soon after announcing the 80286, Intel presented it to the legendary Homebrew Computer Club. A Michael Swaine’s report from the meeting published in the April 5th, 1982, edition of InfoWorld mentions the announcement of Digital Research already working on an operating system for the new CPU, named MP/M-286.
At that time, DRI was already heavily betting on multitasking operating systems - even on the much less capable 8086 platform4. MP/M-86 2.1 was released in September 1981, and in early 1982 its single-user multitasking descendant called Concurrent CP/M was announced. By 1984, DRI’s Operating Systems Division was busy developing not only the next generation of the 8086-based multitasking systems, but also porting UNIX to the 80286 in cooperation with Intel and AT&T. That project went on a back burner after AT&T pulled off and DRI and Intel then focused on completing MP/M-286, which was in the meantime renamed to Concurrent DOS 286 and pre-released to select customers in January 1985.
Concurrent DOS 286 was not merely a port of the previous generation of “Concurrent” systems to the 80286. It was designed from scratch by DRI’s chief operating systems architect Frank Holsworth5 and implemented in the C programming language. Legacy 8086 applications could be run via the optional PC DOS front end, which ran in Protected Mode, just like the rest of the operating system.
Unfortunately, the source code of Concurrent DOS 286 and its descendants has not been released to public6. As a result, the details of its compatibility layer must be reconstructed from Intel documentation, magazine articles, and contemporary accounts7.
It seems that the original PC front end would set the privilege level of all local and global descriptor table entries lower than that of the current program, so that a protection violation occurs whenever the program attempts to load a segment register. The kernel could catch exceptions caused by Real Mode style instructions, handle them by mapping invalid addresses to valid descriptors and restart the execution8. Obviously, a DOS application could generate arbitrary segment values, and the operating system could never know in advance which descriptors would be required, which put even more pressure on the performance.
At the time of the initial announcement DRI went to great lengths to emphasize that the PC DOS front end was able to run a wide range of legacy applications, including the notorious Lotus 1-2-3.
Then a disaster struck: DRI’s new operating system was developed on an early version of the 80826 called stepping B1. In the first half of 1985, Intel started shipping stepping C1 which fixed some problems (or “errata” in Intel’s terminology) but also stopped preserving the state of the CX register when a general protection fault occurred, which made restarting the execution from the handler impossible.
The release of Concurrent DOS 286 was delayed while Intel went to work to produce a new stepping: E1. In that version, Intel restored preserving the state of the CX register during general protection faults. DRI adapted the compatibility layer to the E1 chips, but there were still some performance issues left, and it was only when Intel released the E2 stepping that the operating system could finally be released.
By that point, DRI abandoned the goal of making Concurrent DOS 286 a general- purpose operating system. A few big customers such as Siemens and IBM were more interested in the system’s real time capabilities and modularity than in its ability to run legacy DOS applications, and they licensed it to use it on their specialized hardware. DRI renamed Concurrent DOS 286 to FlexOS and marketed it as a real-time system for industrial control applications.
The PC front end remained an optional feature of FlexOS 286. It required the E2 stepping of the 80286 and allowed “certified PC DOS version 1.0 and 2.x applications to run in the protected environment of a multitasking operating system”9.
The IBM PC AT shipped with PC-DOS 3.0 which did not even try to take advantage of the Protected Mode goodies the new chip offered. The name of the game was backward compatibility: existing PC applications had to continue running on the new model - just faster. At the time of the launch, IBM showed XENIX 286 as an example of the system that was able to use Protected Mode, even though XENIX was not a product IBM supported10.
However, even before the AT was released, Microsoft started working on a multitasking version of MS-DOS11 . Like DRI, Microsoft hoped to develop an operating system that would run both legacy 8086 applications and exploit the new 286 Protected Mode. Unlike Concurrent DOS 286, it was initially not imagined as a brand-new code base and architecture; rather it was an extension of MS-DOS 2 and internally named DOS 4. The brain behind the multitasking DOS was Gordon Letwin12.
It soon became clear that the task was more complex than anybody imagined. Microsoft decided to scale down DOS 4; Protected Mode was abandoned and only a limited version of multitasking was introduced. The operating system was released to a select group of OEMs in May 1986 under the name MS-DOS 4.0 and quickly forgotten as it did not receive support from IBM.
However, the idea of developing a DOS descendent that would use Protected Mode was not abandoned. The project was at first internally called DOS 5 (unrelated to MS-DOS 5.0, released in 1991), but in the summer of 1985 the agreement was made with IBM to merge the project with IBM’s similar effort, led by Ed Iacobucci13, code named CP/DOS. The operating system would eventually be released under the name OS/2.
About the time the joint work on CP/DOS started, Intel announced it next x86 compatible processor - 80386. It solved all problems with Real Mode compatibility by introducing the Virtual 8086 Mode specifically to run multiple legacy DOS applications, and according to some sources, Bill Gates wanted to abandon the 80286 and develop the new operating system for the
正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。