Virtual DOS machines (VDM) refer to a technology that allows running 16-bit/32-bit
DOS and
16-bit Windows
The Windows API, informally WinAPI, is Microsoft's core set of application programming interfaces (APIs) available in the Microsoft Windows operating systems. The name Windows API collectively refers to several different platform implementations th ...
programs when there is already another
operating system
An operating system (OS) is system software that manages computer hardware, software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ef ...
running and controlling the hardware.
Overview
Virtual DOS machines can operate either exclusively through typical
software emulation methods (e.g.
dynamic recompilation) or can rely on the
virtual 8086 mode
In the 80386 microprocessor and later, virtual 8086 mode (also called virtual real mode, V86-mode, or VM86) allows the execution of real mode applications that are incapable of running directly in protected mode while the processor is running ...
of the
Intel
Intel Corporation is an American multinational corporation and technology company headquartered in Santa Clara, California, Santa Clara, California. It is the world's largest semiconductor chip manufacturer by revenue, and is one of the devel ...
80386 processor, which allows
real mode
Real mode, also called real address mode, is an operating mode of all x86-compatible CPUs. The mode gets its name from the fact that addresses in real mode always correspond to real locations in memory. Real mode is characterized by a 20-bit s ...
8086 software to run in a controlled environment by catching all operations which involve accessing protected hardware and forwarding them to the normal operating system (as
exceptions). 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
In computer architecture, 32-bit computing refers to computer systems with a processor, memory, and other major system components that operate on data in 32- bit units. Compared to smaller bit widths, 32-bit computers can perform large calcula ...
protected mode
In computing, protected mode, also called protected virtual address mode, is an operational mode of x86-compatible central processing units (CPUs). It allows system software to use features such as virtual memory, paging and safe multi-taskin ...
software (
DOS extender
A DOS extender is a computer software program running under DOS that enables software to run in a protected mode environment even though the host operating system is only capable of operating in real mode.
DOS extenders were initially developed ...
s), which has to conform to the
DOS Protected Mode Interface (DPMI).
When a DOS program running inside a VDM needs to access a peripheral,
Windows
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for ...
will either allow this directly (rarely), or will present the DOS program with a
virtual device driver (VDD) which emulates the hardware using operating system functions. A VDM will systematically have emulations for the Intel
8259A interrupt
In digital computers, an interrupt (sometimes referred to as a trap) is a request for the processor to ''interrupt'' currently executing code (when permitted), so that the event can be processed in a timely manner. If the request is accepted ...
controllers, the
8254 timer chips, the 8237 DMA controller, etc.
Concurrent DOS 8086 emulation mode
In January 1985
Digital Research
Digital Research, Inc. (DR or DRI) was a company created by Gary Kildall to market and develop his CP/M operating system and related 8-bit, 16-bit and 32-bit systems like MP/M, Concurrent DOS, FlexOS, Multiuser DOS, DOS Plus, DR DOS ...
together with Intel previewed
Concurrent DOS 286 1.0,
a version of
Concurrent DOS
Multiuser DOS is a real-time multi-user multi-tasking operating system for IBM PC-compatible microcomputers.
An evolution of the older Concurrent CP/M-86, Concurrent DOS and Concurrent DOS 386 operating systems, it was originally developed b ...
capable of running real mode DOS programs in the
80286
The Intel 80286 (also marketed as the iAPX 286 and often called Intel 286) is a 16-bit microprocessor that was introduced on February 1, 1982. It was the first 8086-based CPU with separate, non- multiplexed address and data buses and also th ...
's protected mode.
The method devised on B-1 stepping processor chips, however, in May 1985 stopped working on the C-1 and subsequent processor steppings shortly before Digital Research was about to release the product. Although with the E-1 stepping Intel started to address the issues in August 1985, so that Digital Research's "8086 emulation mode" worked again utilizing the undocumented
LOADALL processor instruction,
it was too slow to be practical.
Microcode
In processor design, microcode (μcode) is a technique that interposes a layer of computer organization between the central processing unit (CPU) hardware and the programmer-visible instruction set architecture of a computer. Microcode is a la ...
changes for the E-2 stepping improved the speed again.
This early implementation can be seen as a predecessor to actual virtual DOS machines.
Eventually, Concurrent DOS 286 was reworked from a potential desktop operating system to become
FlexOS 286 for industrial use in 1986.
It was also licensed by
IBM for their
4680 OS in 1986.
When Intel's 80386 with its virtual 8086 mode became available (as samples since October 1985 and in quantities since June 1986), Digital Research switched to use this to run real mode DOS programs in virtual DOS machines in protected mode under
Concurrent DOS 386 1.0 (February 1987)
and
FlexOS 386 1.0
FlexOS is a discontinued modular real-time multiuser multitasking operating system ( RTOS) designed for computer-integrated manufacturing, laboratory, retail and financial markets. Developed by Digital Research's Flexible Automation Business ...
(June 1987).
However, the architecture of these multiuser multitasking
protected mode operating systems was not DOS-based by themselves.
Concurrent DOS 386 was later developed to become
Multiuser DOS (since 1991) and
REAL/32 (since 1995).
FlexOS 386 later became
4690 OS in 1993.
DOS-based VDMs
In contrast to these protected mode operating systems, DOS, by default, is a real-mode operating system, switching to protected mode and virtual 86 mode only on behalf of memory managers and DOS extenders in order to provide access to extended memory or map in memory into the first megabyte, which is accessible to normal DOS programs.
DOS-based VDMs appeared with Microsoft's
Windows/386 2.01 in September 1987.
DOS-based virtual DOS machines were also present in
Windows 3.0,
3.1x and
Windows for Workgroups 3.1x running in
386 Enhanced Mode
Windows 3.0 is the third major release of Microsoft Windows, launched in 1990. It features a new graphical user interface (GUI) where applications are represented as clickable icons, as opposed to the list of file names seen in its predecesso ...
as well as in
Windows 95
Windows 95 is a consumer-oriented operating system developed by Microsoft as part of its Windows 9x family of operating systems. The first operating system in the 9x family, it is the successor to Windows 3.1x, and was released to manufactu ...
,
98,
98 SE and
ME. One of the characteristics of these solutions running on top of DOS is that the memory layout shown inside virtual DOS machines are virtual instances of the DOS system and DOS driver configuration run before the multitasker is loaded, and that requests which cannot be handled in protected mode are passed down into the system domain to be executed by the underlying DOS system.
Similar to Windows 3.x 386 Enhanced Mode in architecture,
EMM386
EMM386 is the expanded memory manager of Microsoft's MS-DOS, IBM's PC DOS, Digital Research's DR-DOS, and Datalight's ROM-DOS which is used to create expanded memory using extended memory on Intel 80386 CPUs. There also is an EMM386.EXE availab ...
3.xx of
Novell DOS 7,
Caldera OpenDOS 7.01
DR-DOS (written as DR DOS, without a hyphen, in versions up to and including 6.0) is a disk operating system for IBM PC compatibles. Upon its introduction in 1988, it was the first DOS attempting to be compatible with IBM PC DOS and MS-D ...
,
DR-DOS 7.02 (and later) also uses DOS-based VDMs to support pre-emptive multitasking of multiple DOS applications, when the
EMM386 /MULTI option is used.
This component has been under development at
Digital Research
Digital Research, Inc. (DR or DRI) was a company created by Gary Kildall to market and develop his CP/M operating system and related 8-bit, 16-bit and 32-bit systems like MP/M, Concurrent DOS, FlexOS, Multiuser DOS, DOS Plus, DR DOS ...
/
Novell
Novell, Inc. was an American software and services company headquartered in Provo, Utah, that existed from 1980 until 2014. Its most significant product was the multi- platform network operating system known as Novell NetWare.
Under the l ...
since 1991
under the codename "Vladivar" (originally a separate device driver
KRNL386.SYS instead of a module of EMM386). While primarily developed for the next major version of DR DOS, released as Novell DOS 7 in 1994,
it was also used in the never released
DR DOS "Panther" and "
Star Trek
''Star Trek'' is an American science fiction media franchise created by Gene Roddenberry, which began with the eponymous 1960s television series and quickly became a worldwide pop-culture phenomenon. The franchise has expanded into vario ...
" project in 1992/1993.
OS/2 MVDM
VDMs called MVDM (Multiple Virtual DOS Machine) are used in
OS/2 2.0 and later since 1992.
OS/2 MVDMs are considerably more powerful than
NTVDM
Virtual DOS machines (VDM) refer to a technology that allows running 16-bit/32-bit DOS and 16-bit Windows programs when there is already another operating system running and controlling the hardware.
Overview
Virtual DOS machines can operate ei ...
. For example, block devices are supported, and various DOS versions can be booted into an OS/2 MVDM.
While the OS/2 1.x DOS box was based on DOS 3.0, OS/2 2.x MVDMs emulate DOS 5.0.
Seamless integration of
Windows 3.1 and later
Win32s applications in OS/2 is a concept looking similar on surface to the seamless integration of
XP Mode
Windows Virtual PC (successor to Microsoft Virtual PC 2007, Microsoft Virtual PC 2004, and Connectix Virtual PC) is a virtualization program for Microsoft Windows. In July 2006, Microsoft released the Windows version free of charge. In August ...
based on
Windows Virtual PC in
Windows 7
Windows 7 is a major release of the Windows NT operating system developed by Microsoft. It was released to manufacturing on July 22, 2009, and became generally available on October 22, 2009. It is the successor to Windows Vista, released nearl ...
. A redirector in a "guest" VDM or NTVDM allows access on the disks of the OS/2 or NT "host". Applications in a "guest" can use
named pipes for communication with their "host".
Due to a technical limitation, DOS and 16-bit Windows applications under OS/2 were unable to see more than 2 GB of hard drive space,
this was fixed in
ArcaOS
ArcaOS is an operating system based on OS/2, developed and marketed by Arca Noae, LLC under license from IBM. It was codenamed Blue Lion during its development. It builds on OS/2 Warp 4.52 by adding support for new hardware, fixing defects and l ...
5.0.4.
Windows NTVDM
NTVDM was a system component of all
IA-32
IA-32 (short for "Intel Architecture, 32-bit", commonly called i386) is the 32-bit version of the x86 instruction set architecture, designed by Intel and first implemented in the 80386 microprocessor in 1985. IA-32 is the first incarnation of ...
editions of the
Windows NT
Windows NT is a proprietary graphical operating system produced by Microsoft, the first version of which was released on July 27, 1993. It is a processor-independent, multiprocessing and multi-user operating system.
The first version of Wi ...
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 .
In order to execute DOS programs, NTVDM loads which in turn loads , which executes a modified in order to run the application that was passed to NTVDM as command-line argument. The 16-bit real-mode system files are stripped down derivations of their
MS-DOS 5.0 equivalents , and
with all hard-wired assumptions on the
FAT file system removed and using the
invalid opcode
An illegal opcode, also called an unimplemented operation, unintended opcode or undocumented instruction, is an instruction to a CPU that is not mentioned in any official documentation released by the CPU's designer or manufacturer, which nev ...
0xC4 0xC4 to
bop down into the 32-bit NTVDM to handle the requests.
Originally, NTDOS reported a DOS version of 30.00 to programs,
but this was soon changed to report a version of 5.00 at and 5.50 at to allow more programs to run unmodified.
This holds true even in the newest releases of Windows; many additional MS-DOS functions and commands introduced in MS-DOS versions 6.x and in
Windows 9x
Windows 9x is a generic term referring to a series of Microsoft Windows computer operating systems produced from 1995 to 2000, which were based on the Windows 95 kernel and its underlying foundation of MS-DOS, both of which were updated in sub ...
are missing.
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 2000
Windows 2000 is a major release of the Windows NT operating system developed by Microsoft and oriented towards businesses. It was the direct successor to Windows NT 4.0, and was released to manufacturing on December 15, 1999, and was official ...
and
Windows XP
Windows XP is a major release of Microsoft's Windows NT operating system. It was release to manufacturing, released to manufacturing on August 24, 2001, and later to retail on October 25, 2001. It is a direct upgrade to its predecessors, Wind ...
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 pipe
In computing, a named pipe (also known as a FIFO for its behavior) is an extension to the traditional pipe concept on Unix and Unix-like systems, and is one of the methods of inter-process communication (IPC). The concept is also found in OS/ ...
s.
Since virtual 8086 mode is not available on non-
x86-based processors (more specifically,
MIPS,
DEC Alpha
Alpha (original name Alpha AXP) is a 64-bit reduced instruction set computer (RISC) instruction set architecture (ISA) developed by Digital Equipment Corporation (DEC). Alpha was designed to replace 32-bit VAX complex instruction set computer ...
, and
PowerPC
PowerPC (with the backronym Performance Optimization With Enhanced RISC – Performance Computing, sometimes abbreviated as PPC) is a reduced instruction set computer (RISC) instruction set architecture (ISA) created by the 1991 Apple– IBM ...
) NTVDM was instead implemented as a full emulator in these versions of NT, using code licensed from Insignia's
SoftPC.
Up to
Windows NT 3.51
Windows NT 3.51 is a major release of the Windows NT operating system developed by Microsoft and oriented towards businesses. It is the third version of Windows NT and was released on May 30, 1995, eight months following the release of Windows NT ...
, only 80286 emulation was available. With
Windows NT 4.0,
486
__NOTOC__
Year 486 ( CDLXXXVI) was a common year starting on Wednesday (link will display the full calendar) of the Julian calendar. At the time, it was known as the Year of the Consulship of Basilius and Longinus (or, less frequently, year 12 ...
emulation was added.
NTVDM is not included with 64-bit versions of Windows prior to
Windows 11
Windows 11 is the latest major release of Microsoft's Windows NT operating system, released in October 2021. It is a free upgrade to its predecessor, Windows 10 (2015), and is available for any Windows 10 devices that meet the new Windows 11 ...
or ARM32 based versions such as
Windows RT or Windows 10 IoT Core.
Windows 10
Windows 10 is a major release of Microsoft's Windows NT operating system. It is the direct successor to Windows 8.1, which was released nearly two years earlier. It was released to manufacturing on July 15, 2015, and later to retail on ...
is the final version of Windows to include this component.
When Windows 11 dropped support for 32-bit processors, the NTVDM component has been discontinued.
Commands
The following list of
commands
Command may refer to:
Computing
* Command (computing), a statement in a computer language
* COMMAND.COM, the default operating system shell and command-line interpreter for DOS
* Command key, a modifier key on Apple Macintosh computer keyboards
* ...
is part of the Windows XP MS-DOS subsystem.
*
APPEND
*
DEBUG
*
EDIT
Edit may refer to:
Concepts
* an action that is part of an editing process (including of images, video, and film)
* a particular version that is the result of editing, especially of film (for example, fan edit), or music (for example, radio ...
*
EDLIN
*
EXE2BIN
The command-line tool exe2bin is a post-compilation utility program available on MS-DOS and other operating systems.
Overview
Early compilers and linkers for the MS-DOS platform could not produce a COM file executable directly. Instead, the co ...
*
FASTOPEN
*
FORCEDOS
*
GRAPHICS
Graphics () are visual images or designs on some surface, such as a wall, canvas, screen, paper, or stone, to inform, illustrate, or entertain. In contemporary usage, it includes a pictorial representation of data, as in design and manufacture, ...
*
LOADFIX
*
LOADHIGH (LH)
*
MEM
Mem (also spelled Meem, Meme, or Mim) is the thirteenth letter of the Semitic abjads, including Hebrew mēm , Aramaic Mem , Syriac mīm ܡ, Arabic mīm and Phoenician mēm . Its sound value is .
The Phoenician letter gave rise to the Greek mu ...
*
NLSFUNC
*
SETVER
*
SHARE
Security issue
In January 2010,
Google
Google LLC () is an American Multinational corporation, multinational technology company focusing on Search Engine, search engine technology, online advertising, cloud computing, software, computer software, quantum computing, e-commerce, ar ...
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 an
x86-64
x86-64 (also known as x64, x86_64, AMD64, and Intel 64) is a 64-bit version of the x86 instruction set, first released in 1999. It introduced two new modes of operation, 64-bit mode and compatibility mode, along with a new 4-level paging ...
CPU,
virtual 8086 mode
In the 80386 microprocessor and later, virtual 8086 mode (also called virtual real mode, V86-mode, or VM86) allows the execution of real mode applications that are incapable of running directly in protected mode while the processor is running ...
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
In the x86-64 computer architecture, long mode is the mode where a 64-bit operating system can access 64-bit instructions and registers. 64-bit programs are run in a sub-mode called 64-bit mode, while 32-bit programs and 16-bit protected mode p ...
.
The 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
and
AArch64
AArch64 or ARM64 is the 64-bit extension of the ARM architecture family.
It was first introduced with the Armv8-A architecture. Arm releases a new extension every year.
ARMv8.x and ARMv9.x extensions and features
Announced in October 2011, ...
because Microsoft did not release a full emulator for this incompatible instruction set like it did on previous incompatible architecture. However, they can still be run using
virtualization
In computing, virtualization or virtualisation (sometimes abbreviated v12n, a numeronym) is the act of creating a virtual (rather than actual) version of something at the same abstraction level, including virtual computer hardware platforms, st ...
software, like
Windows XP Mode
Windows Virtual PC (successor to Microsoft Virtual PC 2007, Microsoft Virtual PC 2004, and Connectix Virtual PC) is a virtualization program for Microsoft Windows. In July 2006, Microsoft released the Windows version free of charge. In August ...
in
Windows 7
Windows 7 is a major release of the Windows NT operating system developed by Microsoft. It was released to manufacturing on July 22, 2009, and became generally available on October 22, 2009. It is the successor to Windows Vista, released nearl ...
or
VMware Workstation, or by installing NTVDMx64, an unofficial port of the older emulated implementation of the NTVDM which was provided on
NT 4 for non-x86 platforms.
Another option is OTVDM (WineVDM), a 16-bit Windows interpreter based on
MAME's i386 emulation and the 16-bit part of the popular Windows compatibility layer
Wine
Wine is an alcoholic drink typically made from fermented grapes. Yeast consumes the sugar in the grapes and converts it to ethanol and carbon dioxide, releasing heat in the process. Different varieties of grapes and strains of yeasts are ...
.
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.
See also
*
Comparison of platform virtualization software
*
DESQview 386 (since 1988)
*
Wine (software)
Wine (formerly a recursive backronym for ''Wine Is Not an Emulator'', now just "Wine") is a free and open-source compatibility layer that aims to allow application software and computer games developed for Microsoft Windows to run on Unix-l ...
*
DOSBox
DOSBox is a free and open-source emulator which runs software for MS-DOS compatible disk operating systems—primarily video games. It was first released in 2002, when DOS technology was becoming obsolete. Its adoption for running DOS games i ...
*
DOSEMU
*
Merge (software)
*
List of Microsoft Windows components
The following is a list of Microsoft Windows components.
Configuration and maintenance
User interface
Applications and utilities
Windows Server components
File systems
Core components
Services
This list is not all-inclusiv ...
*
Hypervisor
A hypervisor (also known as a virtual machine monitor, VMM, or virtualizer) is a type of computer software, firmware or hardware that creates and runs virtual machines. A computer on which a hypervisor runs one or more virtual machines is called ...
*
Windows on Windows (WoW)
*
Virtual machine
In computing, a virtual machine (VM) is the virtualization/ emulation of a computer system. Virtual machines are based on computer architectures and provide functionality of a physical computer. Their implementations may involve specialized har ...
(VM)
Notes
References
Further reading
*
External links
Virtual DOS Machine StructureTroubleshooting MS-DOS-based programs in Windows XP*
ttp://www.adontec.com/commex_e.htm Troubleshooting MS-DOS-based serial communication programs in Windows 2000 and laterMS-DOS Player for Win32-x64, a Microsoft MS-DOS Emulator runs many command line DOS programs like compilers or other tools, also packaged into one stand-alone executable file.
vDOS a DOS emulator designed for the running the more "serious" DOS apps (not games) on 64-bit NT systems (effectively a replacement for NTVDM on modern systems).
{{Windows Components
Virtualization
DOS technology
Windows administration
DOS emulators
Windows components