Jump to content

MVDM

From Alfawiki
Adapted from the English Wikipedia article MVDM, available under CC BY-SA 4.0Updated 9 August 2025
Digital Research
IndustrySoftware
Founded1970s
ProductsConcurrent DOS, FlexOS, Multiuser DOS, REAL/32

Virtual DOS machines (VDMs) facilitate the execution of 16-bit and 32-bit DOS as well as 16-bit Windows applications on a running operating system that manages the underlying hardware.

Overview

VDMs function either through software emulation techniques such as dynamic recompilation or by utilizing the virtual 8086 mode available on the Intel 80386 CPU. This mode enables real-mode 8086 programs to operate within a controlled environment by intercepting hardware interactions and redirecting them to the operating system for proper emulation. As a result, DOS applications can coexist with contemporary operating systems.

These virtual machines also accommodate running 16-bit and 32-bit protected mode programs (including DOS extenders) that adhere to the DOS Protected Mode Interface (DPMI) standard.

When DOS applications running inside a VDM attempt to access hardware peripherals, the host Windows system either grants direct access or supplies a virtual device driver (VDD) that simulates hardware interaction through OS-level functions. VDMs emulate critical components such as the Intel 8259A interrupt controllers, 8254 timers, and 8237 DMA controllers.

Concurrent DOS 8086 Emulation Mode

In early 1985, Digital Research together with Intel introduced Concurrent DOS 286 1.0, which enabled execution of real-mode DOS programs within the protected mode of the 80286 processor. Initial issues related to processor stepping delayed its release; however, subsequent microcode enhancements restored this functionality by leveraging the undocumented LOADALL instruction, albeit with limited performance. This pioneering method anticipated modern virtual DOS machine technology.

The Concurrent DOS 286 product was later renamed FlexOS 286 in 1986 for use in industrial settings and was licensed by IBM for their 4680 OS platform.

Following the launch of Intel's 80386 processor featuring virtual 8086 mode (introduced in late 1985), Digital Research adopted this capability to run real-mode DOS software under protected mode environments through products like Concurrent DOS 386 1.0 (1987) and FlexOS 386 1.0. These operating systems supported multiuser multitasking but were not based on DOS themselves.

Concurrent DOS 386 eventually evolved into Multiuser DOS (1991) and later into REAL/32 (1995), while FlexOS 386 was developed into the 4690 OS in 1993.

DOS-based VDMs

As a real-mode operating system, DOS accesses extended memory and switches to protected or virtual-86 modes only via memory managers or DOS extenders. Microsoft introduced DOS-based virtual DOS machines with Windows/386 2.01 in 1987; these were subsequently incorporated into versions such as Windows 3.0, Windows 3.1x, Windows for Workgroups 3.1x, as well as Windows 95, Windows 98, Windows 98 SE, and Windows ME. These VDMs simulate virtual instances of the DOS environment along with preloaded drivers before multitasking begins, forwarding any unhandled requests from protected mode back to the underlying DOS system.

Likewise, versions of EMM386 (3.xx) included in Novell DOS 7, Caldera OpenDOS 7.01, and DR-DOS 7.02 implement DOS-based VDMs that enable preemptive multitasking for multiple DOS applications via the EMM386 /MULTI command-line option. This technology, developed since 1991 under the codename "Vladivar" at Digital Research / Novell, originated as an independent driver named KRNL386.SYS before being integrated into EMM386. It was primarily designed for Novell DOS 7 (1994) and also found application in unreleased projects such as DR DOS "Panther" and the "Star Trek" development effort.

OS/2 MVDM

Starting with OS/2 2.0 in 1992 and continuing in subsequent releases, multiple virtual DOS machines (MVDMs) have been implemented, offering capabilities that surpass those of NTVDM. These OS/2 MVDMs accommodate block device access and can boot a range of DOS versions. For example, OS/2 2.x emulates DOS 5.0, an improvement over the DOS box in OS/2 1.x, which was based on DOS 3.0.

OS/2 provides smooth integration for running Windows 3.1 and later Win32s applications within its environment. This functionality resembles Windows 7’s XP Mode conceptually but is built on different underlying technology. Disk access from the guest VDM or NTVDM is managed by a redirector on the host OS/2 or NT system, while named pipes facilitate communication between guest applications and the host.

A technical constraint initially prevented DOS and 16-bit Windows software under OS/2 from accessing more than 2 GB of hard disk space; this limitation was lifted with the release of ArcaOS 5.0.4.

Windows NTVDM

Since the debut of Windows NT 3.1 in 1993, all IA-32 versions of the Windows NT family have included NTVDM, a component that allows execution of both 16-bit Windows programs and 16-/32-bit DOS applications. The environment is managed by a 32-bit user-mode executable.

When launching DOS applications, NTVDM initiates , which subsequently loads to execute a customized version of . These 16-bit system files are streamlined adaptations of their MS-DOS 5.0 equivalents, modified to eliminate fixed assumptions about the FAT file system and to incorporate a special opcode facilitating transitions into the 32-bit NTVDM context. Initially, NTDOS identified itself as version 30.00 but was soon updated to report versions 5.00 and 5.50 to enhance compatibility with a broader range of software. Despite these adjustments, numerous features from MS-DOS 6.x and Windows 9x remain unsupported.

By default, multiple 16-bit Windows applications operate as threads within a single NTVDM process, utilizing cooperative multitasking among themselves while NTVDM benefits from the operating system’s pre-emptive multitasking. Opting for "Run in separate memory space" causes each application to launch in its own NTVDM instance, enabling pre-emptive multitasking between these processes. NTVDM emulates BIOS routines, tables, the Windows 3.1 kernel, and stubs for the 16-bit API calls. The translation ("thunking") of these API calls into their 32-bit equivalents is handled by the WoW (Windows on Windows) subsystem.

For supporting DOS Protected Mode Interface (DPMI) and accessing 32-bit memory, NTVDM includes a translation layer that converts extended memory requests into corresponding Windows NT memory operations. The emulation of 16-bit Windows is managed by this layer as well. Starting with Windows XP, Sound Blaster 2.0 emulation was introduced; however, support for 16-bit virtual device drivers and DOS block device drivers such as RAM disks remains unavailable. Communication between processes is facilitated through OLE, DDE, and named pipes.

On processors lacking virtual 8086 mode support—such as those based on MIPS, DEC Alpha, or PowerPC—NTVDM relies on full software emulation licensed from Insignia's SoftPC. Up through Windows NT 3.51, only emulation for the 80286 processor was provided; this was extended to include 486 emulation starting with Windows NT 4.0.

NTVDM is not included in any 64-bit editions of Windows or ARM32-based variants like Windows RT and Windows 10 IoT Core. Its final appearance was in Windows 10, as support for 32-bit processors was discontinued with Windows 11.

Commands

Windows XP provides the following set of 16-bit commands within its MS-DOS subsystem:

Security issue

In January 2010, Tavis Ormandy, a security researcher at Google, revealed a critical vulnerability in the Virtual DOS Machine (VDM) implementation on Windows NT systems. This flaw permitted unprivileged users to elevate their rights to SYSTEM level. It impacted every x86 Windows NT kernel release dating back to 1993, including Windows NT, 2000, XP, Server 2003, Vista, Server 2008, and Windows 7. Prior to Microsoft issuing a fix, Ormandy published a proof-of-concept exploit. A temporary mitigation involved disabling support for 16-bit applications, which adversely affected legacy DOS and Windows 3.1 software. Importantly, 64-bit Windows editions were immune since they do not include the NTVDM component. Following the patch deployment, VDM operations could be safely re-enabled.

Limitations

A limitation exists in Windows XP’s 16-bit subsystem due to an elevated per-session GDI object cap that causes GDI handles to be shifted right by two bits during conversion from 32-bit to 16-bit format. As a result, handles are restricted to a maximum of 14 bits; if a 16-bit application is assigned a handle exceeding 16384, it will crash.

More generally, VDM and related technologies fall short in adequately supporting older DOS games on contemporary hardware. Peripheral device emulation is minimal—NTVDM’s sound emulation capabilities are especially limited. Screen refreshes during DOS program output occur only sporadically at low frequency, and emulation of higher-resolution graphics modes is absent. Since these programs execute directly at the host CPU's speed, timing loops often expire prematurely, causing games to run too rapidly or fail to recognize emulated hardware peripherals.

Absence in x64 and AArch64 architectures

On an x86-64 processor, virtual 8086 mode functions exclusively in legacy mode intended for 16- and 32-bit operating systems and is not supported in native 64-bit long mode. Consequently, NTVDM is not available on x86-64 editions of Windows because it depends on VM86 CPU mode for enabling 16-bit segment addressing. Similarly, NTVDM is absent from AArch64 (ARM64) versions of Windows—such as Windows RT—since Microsoft has not developed a complete emulator compatible with this differing instruction set.

Despite the lack of native NTVDM support on x86-64 and AArch64 platforms, legacy applications can still be executed through virtualization solutions like Windows XP Mode (available on non-home editions of Windows 7) or third-party virtualization products such as VMware Workstation. Additional alternatives include implementations derived from ReactOS’s NTVDM or OTVDM (also known as WineVDM), which is a 16-bit Windows interpreter built upon the i386 emulation within MAME and the 16-bit subsystem of the Windows compatibility layer, Wine.

WineVDM

Wine incorporates a Virtual DOS Machine named WineVDM (OTVDM), which is accessible on Linux and Mac OS X via CrossOver and has been ported to 64-bit Windows platforms where NTVDM is unavailable. This approach enables execution of 16-bit Windows applications by utilizing open-source emulation technologies.

See also

Further reading

External links