More x86 Lore – Illegal instructions and the 286 Protected Mode

Back in the old days, when Windows was just starting to run on the 386, the fastest way to get from v86 mode (which the vast majority of apps were running), and into protected mode was to execute illegal instructions ! Raymond Chen has a funny story about that and some great comments on his blog post about it.

This reminded me of another bit of lore. When the 286 came out, there was talk that it couldn’t really run Unix well. After looking on the net, I found out that wasn’t the case. The problem was that it couldn’t exit protected mode. For a Unix this isn’t a problem. For a DOS memory extender, this was a huge problem. It turned out that most people solved the problem by doing a RESET on the CPU to get back into real mode ! Ouch! Read more about the proper way, here under ‘Entering Protected Mode’ and here for the Triple Fault Technique.

Here is another discussion on why the x86 had so few registers. Answer: legacy of course with older 70’s designs. It also had some interesting comments from people discussing the benefits of having fewer registers! It is interesting to see this debate still happening with the people that actually still care about this stuff (and not the processor architects themselves). Don’t they know the trade-offs?

This entry was posted in General. Bookmark the permalink.

Leave a Reply

Your email address will not be published.