Virtual DOS machine

A **Virtual DOS machine** (**VDM**) permits the users of computers to run 16-bit or 32-bit DOS and 16-bit Windows programs on 32-bit computers when there already is a different operating system using the hardware.

## Overview 
Virtual DOS machines normally use the virtual 8086 mode of the Intel 80386 (or later) processor, allowing many 8086 applications to function by translating operating system commands to make applications think that they are running on an 8086. The operating system can then emulate the DOS software. VDMs like Windows 3.x 386 Enhanced Mode can add support for using 16-/32-bit protected mode software if they use the DOS Protected Mode Interface (DPMI). Digital Research / Novell was working on a similar system since 1991 under the codename "Vladivar" (originally a device driver KRNL386.SYS and not part of EMM386). It was made for the next version of DR&nbsp;DOS, released as Novell DOS 7 in 1994, While the OS/2 1.x emulated DOS 3.0, 2.x emulated DOS 5.0.

NTVDM uses NTIO.SYS and NTDOS.SYS, which runs a changed version of COMMAND.COM. The 16-bit system files are smaller versions of their MS-DOS 5.0 counterparts, including IO.SYS, MSDOS.SYS and COMMAND.COM,

32-bit DOS emulation is used for DPMI and using 32-bit memory. wowexec.exe is the emulator process for 16-bit Windows. Windows 2000 added Sound Blaster 2.0 emulation to 32-bit NTVDM. 16-bit and DOS virtual device drivers can't be run. Win16 programs can communicate with other parts of Windows using OLE, DDE and named pipes.

As virtual 8086 mode isn't available on non-x86 processors, NTVDM was a full emulator for NT on these architectures.

### Security issues 
In January 2010, Google security researcher Tavis Ormandy discovered a large security problem in NTVDM system letting non-Administrators to increase their permissions to the SYSTEM level. Ormandy claimed it was a problem for all x86 versions of Windows NT after 1993. 32-bit versions of NT 3.X/4.0, 2000, XP, 2003, Vista, 2008, and 7 were affected. Ormandy published how the problem works. Before Microsoft could fix it, you could turn off 16-bit application support to solve the problem, but it made so you could not run 16-bit programs. x64 Windows never had this problem because it doesn't use NTVDM. After applying the security fixes Microsoft made available, NTVDM could be turned on safely. Handles thus could not be larger than 14 bits, so 16-bit programs with a GDI handle larger than 16384 would crash. so 16-bit applications cannot be run on 64-bit Windows. You'll need Windows XP Mode or similar virtualization software to run 16-bit programs within a 64-bit operating system.

NTVDM cannot run DOS games on computers of today. Emulation is only provided for simple peripherals. For example, sound in NTVDM can be limited. Windows NT only updates the screen a few times per second when DOS programs write on it, and they can't emulate high-resolution graphics options. As software runs at the speed of the CPU, all *timing loops* stop too early. This either makes games run too fast, or causes the software to not see some emulated hardware peripherals, because it can not wait that long for an answer.

## Related pages 
* Virtualization
* Windows on Windows

## Notes 

## References 
## Other websites 
* NTVDM from ReactOS, the individual standalone type of NTVDM that can run windowed text mode MS-DOS programs in 64 bit Windows NT systems, this NTVDM works by using the following syntax: *ntvdm.exe program.exe*, as *start* command in Windows.
* 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
* Troubleshooting MS-DOS-based serial communication programs in Windows 2000 and later