Reply to post: Re: 286

It's 30 years ago: IBM's final battle with reality

Anonymous Coward
Anonymous Coward

Re: 286

The segmented mode has more than the "no execute" bit. It has an "execute only" mode - the CPU can execute the code in the segment, but the application can't nor read nor modify if (goodbye, ROP!). Still, managing segments adds complexity, security checks slow down execution, and applications are less free (which, from a security point of view, is a good thing).

The "flat memory model" was not an inherent new feature - it means just to use large segments, large enough the application never need to load another one (which usually meant the whole application address space). Also, usually, code and data segments overlap to make everything "easier" (and far less secure).

286 16-bit segments were too small to allow for that. 386 32-bit segments allowed that, while the new pagination feature allowed for "virtual memory" with a page (4k) granularity. 286 virtual memory worked at the segment level - with 64k segment it could work, but with flat 4GB segments it couldn't work, obviously.

But what made the 386 able to run DOS applications was the Virtual 86 mode. In that mode, the hardware itself trapped direct accesses to memory and I/O ports, and allowed the OS to handle them, without requiring complex, fragile hacks.

This mode is no longer available in 64 bit mode, and that's why Windows 64 bit can't run DOS applications any longer (Windows supports console applications which are native Windows applications, not DOS ones).

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon