Why is it that a 32 bit OS that is installed on a 64 bit CPU can run old DOS 16 bit applications, but if you install a 64 bit OS it can't run those applications directly and need some sort of emulation (that doesn't always work perfectly)?
To be more specific I have an Intel Core 2 Duo (64 bit) processor, and I had Windows Xp and Windows 7 (both 32 bit) installed and it could run old DOS applications, but now that I have installed Windows 7 64 bit it can't run those same applications anymore?
|
|
|||||||||||
|
migrated from stackoverflow.com May 14 '10 at 0:34
|
From my understanding, it's because when running in Long Mode (x64 native), the CPU itself doesn't support going into 16 bit mode. See Wikipedia. So, in order to support 16 bit mode, the NTVDM (the 16 bit layer in Windows) would have to fully emulate a 16 bit processor. I suppose they weighed re-implementing an emulation layer vs using already extant virtualization software (VirtualPC, VirtualBox) to handle this, and it was decided to cut the VDM. |
|||||||||||||||||
|
|
For Windows, it's because the x86 versions of the OS includes 16-bit emulation that allows them to run those older DOS processes. In the x64 versions, they already have to emulate x86 execution (they call it WoW64) to allow 32-bit processes to run, and I guess using Wow64 to further emulate the 16-bit emulator caused too many problems. A handful of recognized 16-bit processes will run because the emulation is hard-coded to handle them, but the rest don't work because emulation isn't included in x64. See "No 16-bit code" at the MSKB article: http://support.microsoft.com/kb/282423 |
|||||||||||||
|
Because 64-bit handles have 32 significant bits.In Windows, programs pass around "handles" to the OS and vice-versa (which are numbers that the OS uses to identify a particular resource, such as a window). To support 16-bit programs, 32-bit Windows only generates a handles that have 16 significant bits -- the 16 upper bits are ignored by the OS (even though programs are not to be taking advantage of this fact). So no program can interact with more than 216 objects, which is actually rather low. However, in order to improve this, 64-bit Windows increased the number of significant bits in a handle to 32. But now that means that handles cannot be passed to 16-bit programs without loss of information. So 16-bit programs cannot run on 64-bit Windows. |
|||||||||||
|
|
I think that the most likely reason is that only a tiny percentage of PC owners actually want to be able to run old 16 bit applications on their new 64 bit hardware. Microsoft probably figured that it wasn't worth their while continuing to support 16 bit applications. |
|||
|
|
Correct me if I'm wrong, but to my understanding it is just because of Windows-specific problem that NTVDM is using virtual 8086 mode. Compatibility mode on x64 processors (running in long mode) supports full 'clean' protected mode, 16 and 32 bit from what I've found here: http://en.wikipedia.org/wiki/Long_mode, but not some of the 386 additions such as virtual 8086 mode. So it is not supported most likely because it doesn't pay off for Microsoft to reprogram NTVDM, which would probably require adding some more emulation because some 16-bit protected mode applications can use virtual 8086, even if most do not. I suppose with enough labor it is possible to write something faster than dosbox running in long mode, since there is hardware support for 16bit apps. |
|||
|
|