running in the NTVDM of
Windows 10 NTVDM is a system component of all
IA-32 editions of the
Windows NT family since 1993 with the release of
Windows NT 3.1. It allows execution of 16-bit Windows and 16-bit / 32-bit DOS applications. The Windows NT 32-bit user-mode executable which forms the basis for a single DOS (or
Windows 3.x) environment is called . 16-bit Windows applications by default all run in their own thread within a single NTVDM process. Although NTVDM itself is a 32-bit process and pre-emptively multitasked with respect to the rest of the system, the 16-bit applications within it are cooperatively multitasked with respect to each other. When the "Run in separate memory space" option is checked in the
Run box or the application's shortcut file, each 16-bit Windows application gets its own NTVDM process and is therefore pre-emptively multitasked with respect to other processes, including other 16-bit Windows applications. NTVDM emulates BIOS calls and tables as well as the Windows 3.1 kernel and 16-bit API stubs. The 32-bit
WoW translation layer
thunks 16-bit API routines. 32-bit DOS emulation is present for
DOS Protected Mode Interface (DPMI) and 32-bit memory access. This layer converts the necessary extended and expanded memory calls for DOS functions into Windows NT memory calls. is the emulation layer that emulates 16-bit Windows.
Windows XP added
Sound Blaster 2.0 emulation. 16-bit virtual device drivers and
DOS block device drivers (e.g., RAM disks) are not supported.
Inter-process communication with other subsystems can take place through
OLE,
DDE and
named pipes. Since virtual 8086 mode is not available on non-
x86-based processors (more specifically,
MIPS,
DEC Alpha, and
PowerPC) NTVDM is instead implemented as a full emulator in these versions of NT, using code licensed from Insignia's
SoftPC. Up to
Windows NT 3.51, only 80286 emulation is available. With
Windows NT 4.0,
486 emulation was added. NTVDM is not included with 64-bit versions of Windows or ARM32 based versions such as
Windows RT or Windows 10 IoT Core. The last version of Windows to include the component is
Windows 10, as Windows 11 dropped support for
32-bit processors.
Commands The following 16-bit
commands for MS-DOS subsystem are included with Windows XP. •
APPEND •
DEBUG •
EDIT •
EDLIN •
EXE2BIN •
FASTOPEN •
FORCEDOS •
GRAPHICS •
LOADFIX •
LOADHIGH (LH) •
MEM •
NLSFUNC •
SETVER •
SHARE Security issue In January 2010,
Google security researcher
Tavis Ormandy revealed a serious security flaw in Windows NT's VDM implementation that allowed unprivileged users to escalate their privileges to
SYSTEM level, noted as applicable to the security of all x86 versions of the Windows NT kernel since 1993. This included all 32-bit versions of Windows NT, 2000, XP, Server 2003, Vista, Server 2008, and Windows 7. Ormandy published a
proof-of-concept exploit for the vulnerability. Prior to Microsoft's release of a security patch, the workaround for this issue was to turn off 16-bit application support, which prevented older programs (those written for DOS and Windows 3.1) from running. 64-bit versions of Windows are not affected since the NTVDM subsystem is not included. Once the Microsoft security patches had been applied to the affected operating systems the VDM could be safely reenabled.
Limitations A limitation exists in the Windows XP 16-bit subsystem (but not in earlier versions of Windows NT) because of the raised per-session limit for GDI objects which causes GDI handles to be shifted to the right by two bits, when converting them from 32 to 16 bits. As a result, the actual handle cannot be larger than 14 bits and consequently 16-bit applications that happen to be served a handle larger than 16384 by the GDI system crash and terminate with an error message. In general, VDM and similar technologies do not satisfactorily run most older DOS games on today's computers. Emulation is only provided for the most basic peripherals, often implemented incompletely. For example, sound emulation in NTVDM is very limited. NT-family versions of Windows only update the real screen a few times per second when a DOS program writes to it, and they do not emulate higher resolution graphics modes. Because software mostly runs native at the speed of the host CPU, all
timing loops will expire prematurely. This either makes a game run much too fast or causes the software not even to notice the emulated hardware peripherals, because it does not wait long enough for an answer.
Absence in x64 and AArch64 architectures In an
x86-64 CPU,
virtual 8086 mode is available as a sub-mode only in its legacy mode (for running 16- and 32-bit operating systems), not in the native 64-bit
long mode. NTVDM is not supported on x86-64 editions of Windows, including DOS programs, because NTVDM uses VM86 CPU mode instead of the Local Descriptor Table in order to enable 16‑bits segment required for addressing. NTVDM is also unavailable on
AArch64 (or ARM64) versions of Windows (such as
Windows RT), because Microsoft did not release a full emulator for this incompatible instruction set like it did on previous incompatible architectures. While NTVDM is not supported on x86-64 and AArch64 versions of Windows, they can still be run using
virtualization software, such as
Windows XP Mode in non-home versions of
Windows 7 or
VMware Workstation. Other methods include using the version from
ReactOS or WineVDM/OTVDM (see below). ==WineVDM==