Virtual DOS machine
From Wikipedia, the free encyclopedia
| This article does not cite any references or sources. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. (April 2007) |
Virtual DOS machine (VDM) is Microsoft's technology that allows running legacy MS-DOS and 16-bit Windows programs on Intel 80386 or higher computers when there is already another operating system running and controlling the hardware.
Contents |
[edit] Overview
Virtual DOS machines rely on the virtual 8086 mode of the Intel 80386 processor, which allows real mode 8086 software to run in a controlled environment by catching and forwarding to the normal operating system (as exceptions) all operations which involve accessing hardware. The operating system can then perform an emulation and resume the execution of the DOS software.
VDMs generally also implement support for running 16- and 32-bit protected mode software (DOS extenders), which has to conform to the DOS Protected Mode Interface.
When a DOS program running inside a VDM needs to access a peripheral, Windows will either allow this directly (rarely), or will present the DOS program with a Virtual Device Driver (VxD in short) which emulates the hardware using operating system functions. A VDM will systematically have emulations for the Intel 8259A interrupt controllers, the 8254 timer chips, the 8237 DMA, etc.
In general, the VDMs and similar technologies do not satisfactorily run many older DOS programs on today's computers. Emulation is only provided for the most basic peripherals, although Windows XP added emulation of the Sound Blaster and other multimedia devices. Emulation of supported peripherals is incomplete and quirky. NT-family versions of Windows only update the real screen a few times per second when a DOS program writes to it, and do not emulate higher resolution graphics modes. Because software runs mostly native, all timing loops will expire prematurely. This either makes a game run much too fast or causes the software to not even notice the emulated hardware peripherals, because it does not wait long enough for an answer.
[edit] History
VDMs appeared with Windows/386 2.1 and are present in all subsequent 32-bit versions of Windows (as well as Wine). In the Windows NT family, they are however relegated to running DOS and Windows 3.x programs and no longer participate in the implementation of the Windows API. The Windows NT executable which is used to handle a single DOS (and Windows 3.x) environment is called ntvdm.exe.
VDMs were also used in OS/2 2.0 and later.
Recent versions of Windows NT for 64-bit architectures, including Windows XP Professional x64 Edition (x86-64), Windows XP 64-bit Edition (IA-64), Windows Server 2003 (x64) and Windows Vista (x64), no longer include the NTVDM; so they are unable to run 16-bit DOS or Windows applications. This is because an x86-64 CPU in its full 64-bit mode cannot go to virtual mode without a hard reset. Virtual mode is not part of the x64 specification; the CPU needs to be running in x86 mode.
[edit] See also
[edit] External links
- Virtual DOS Machine Structure
- Troubleshooting MS-DOS-based programs in Windows XP
- Troubleshooting an MS-DOS application which hangs the NTVDM subsystem in Windows XP and Windows Server 2003

