In
computing
Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes, and development of both hardware and software. Computing has scientific, ...
, the DOS Protected Mode Interface (DPMI) is a specification introduced in 1989 which allows a
DOS program to run in
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 ...
, giving access to many features of the new PC processors of the time not available in
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 ...
. It was initially developed by
Microsoft
Microsoft Corporation is an American multinational corporation, multinational technology company, technology corporation producing Software, computer software, consumer electronics, personal computers, and related services headquartered at th ...
for
Windows 3.0, although Microsoft later turned control of the specification over to an industry committee with open membership.
Almost all modern
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 are based on DPMI and allow DOS programs to address all memory available in the PC and to run in protected mode (mostly in
ring 3, least privileged).
Overview
DPMI stands for DOS Protected Mode Interface.
It is an
API that allows a program to run in
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 ...
on 80286 series and later processors, and do the
calls to
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 ...
without having to set up these CPU modes manually. DPMI also provides the functions for managing
various resources, notably
memory
Memory is the faculty of the mind by which data or information is encoded, stored, and retrieved when needed. It is the retention of information over time for the purpose of influencing future action. If past events could not be remembered ...
. This allows the DPMI-enabled programs to work in
multi-tasking OSes,
allowing an OS kernel to distribute such resources between multiple applications. DPMI provides only the functionality that
needs to be implemented in
supervisor mode
In computer science, hierarchical protection domains, often called protection rings, are mechanisms to protect data and functionality from faults (by improving fault tolerance) and malicious behavior (by providing computer security).
Compute ...
. It can be
thought of as a single-tasking
microkernel
In computer science, a microkernel (often abbreviated as μ-kernel) is the near-minimum amount of software that can provide the mechanisms needed to implement an operating system (OS). These mechanisms include low-level address space management, ...
. The rest of the functionality is available to DPMI-enabled programs
via the calls to real-mode
DOS and
BIOS
In computing, BIOS (, ; Basic Input/Output System, also known as the System BIOS, ROM BIOS, BIOS ROM or PC BIOS) is firmware used to provide runtime services for operating systems and programs and to perform hardware initialization during the ...
services, allowing the DPMI API itself to remain mostly independent of DOS.
Things that make DPMI API DOS-specific, are just 3 functions for managing DOS memory, and the letter "D" in the "DPMI" acronym.
A DPMI service can be 16-bit, 32-bit, or "universal" and is called the ''DPMI kernel'', ''DPMI host'', or ''DPMI server''. It is provided either by the host operating system (''virtual DPMI host'') or by a
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 ...
(''real DPMI host''). The DPMI kernel can be a part of a DOS extender such as in
DOS/4GW
DOS/4G is a 32-bit DOS extender developed by Rational Systems (later Tenberry Software). It allows DOS programs to eliminate the 640 KB conventional memory limit by addressing up to 64 MB of extended memory on Intel 80386 and above machine ...
or
DOS/32A, or separate, like
CWSDPMI
CWSDPMI is a 32-bit DOS Protected Mode Interface, DPMI host written by Charles W. Sandmann from 1996 to 2010, currently at r7. It is loosely based upon prior GO32.EXE code used in DJGPP v1. It can provide DPMI 0.90+ 32-bit services for programs com ...
or
HDPMI.
The primary use of DPMI API is to allow
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 to provide the host-OS-agnostic environment.
DOS extender checks the presence of a DPMI kernel, and installs its own only if the one was not installed already. This allows
DOS-extended programs to run either in a multitasking OS that provides its own DPMI kernel, or directly
under
bare-metal DOS, in which case DOS extender uses its own DPMI kernel. Windows 3.x and 9x's
user-mode
kernels are built with a DOS extender, so they fully rely on a DPMI API that is provided by windows's ring-0 kernel.
History
The first DPMI specification drafts were published in 1989 by Microsoft's
Ralph Lipe
Ralph (pronounced ; or ,) is a male given name of English, Scottish and Irish origin, derived from the Old English ''Rædwulf'' and Radulf, cognate with the Old Norse ''Raðulfr'' (''rað'' "counsel" and ''ulfr'' "wolf").
The most common forms ...
.
While based on a prototypical version of DPMI for Windows 3.0 in 386 enhanced mode, several features of this implementation were removed from the official specification, including a feature named MS-DOS Extensions
or DOS API translation that had been proposed by Ralph Lipe in the original drafts.
Most of it was implementing DOS and BIOS interfaces (due to this history some INT 21h APIs like 4Ch have to be implemented by all DPMI implementations). DPMI version 0.9 was published in 1990 by the newly formed
DPMI Committee. The version number 0.9 of the resulting specification was chosen to reflect the stripped-down nature and incomplete status of the standard the members of the DPMI Committee could agree upon.
While Windows reports DPMI version 0.9 for compatibility, it actually implements the other parts as well, since they present a vital part of the system.
This undocumented full nature of DPMI has become known as "true DPMI" in the industry.
The DPMI standard was not the only effort to overcome the shortcomings of the
VCPI specification. At the same time that Microsoft developed DPMI for Windows 3.0, another industry alliance including
Intel's Software Focus Group,
Lotus
Lotus may refer to:
Plants
*Lotus (plant), various botanical taxa commonly known as lotus, particularly:
** ''Lotus'' (genus), a genus of terrestrial plants in the family Fabaceae
**Lotus flower, a symbolically important aquatic Asian plant also ...
,
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 ...
,
Interactive Systems and others developed a specification named
Extended VCPI (
XVCPI) to make the memory management and multitasking capabilities of the 386 available for extended DOS applications.
When it turned out that Microsoft's DPMI proposal addressed a number of similar issues and was supported by Windows, these efforts led to the creation of the DPMI Committee in February 1990 during a meeting at Intel in Santa Clara.
In 1991, the DPMI Committee revised DPMI to version 1.0 in order to incorporate a number of clarifications and extensions, but it still did not include the missing "true DPMI" bits implemented in Windows. In fact, "true DPMI" never became part of the official DPMI specification, and Windows likewise never implemented the DPMI 1.0 extensions (and not many DPMI hosts did).
While DPMI is tailored to run extended DOS application software in protected mode and extended memory,
it is not particularly well suited for resident system extensions. Another specification named
DPMS,
developed by
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 ...
around 1992, specifically addresses requirements to easily relocate modified DOS driver software into extended memory and run them in protected mode, thereby reducing their conventional memory footprint down to small
stubs. This is also supported by
Helix Cloaking.
The DPMI "method" is specific to DOS and the IBM PC. Other computer types were upgraded from 16-bit to 32-bit, and the advanced program support was provided by upgrading the operating system with a new 32-bit
API and new memory management/addressing capabilities. For example, the
OS/2
OS/2 (Operating System/2) is a series of computer operating systems, initially created by Microsoft and IBM under the leadership of IBM software designer Ed Iacobucci. As a result of a feud between the two companies over how to position OS/2 ...
core system supports 32-bit programs, and can be run without the GUI. The DPMI solution appears to be mainly needed to address third party need to get DOS protected mode programs running stably on Windows 3.x before the dominant operating system vendor, Microsoft, could or would address the future of 32-bit Windows. In addition, Microsoft didn't see the answer to the 32-bit transition as a 32-bit DOS, but rather a 32-bit Windows with a completely different (and incompatible) API.
Compatibility
While Windows 3.0 implements "true DPMI"
and reports support for DPMI 0.9,
DPMI version 1.0 was never implemented in
Microsoft Windows, so most programs and DOS extenders were mostly only written for version 0.9. Few extenders, however, implement "true DPMI".
Beta versions of
Qualitas 386MAX
386MAX (originally 386 to the Max, later Qualitas MAX) is a computer memory manager for DOS-based personal computers. It competed with Quarterdeck's QEMM memory manager. It was manufactured by Qualitas.
BlueMax was a special version designed ...
implemented "true DPMI" and could run Windows' KRNL386.EXE from the command line, but it was claimed that was disabled in the released product in an internal email.
However, DPMIONE (by Bob Smith based on the 386MAX code) can do it. Currently
DPMIONE and
386MAX is also the only DPMI host which supports DPMI 1.0 completely (e.g. uncommitted memory) and they are the main supporter of DPMI 1.0.
The KRNL386.SYS (aka "MultiMAX") of
DR DOS "Panther"
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-DO ...
and
"StarTrek", which has been under development since 1991,
and the
EMM386.EXE
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 available ...
memory managers of
Novell DOS 7,
Caldera OpenDOS and
DR-DOS
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-DO ...
7.02 and higher have built-in support for DPMI when loaded with the
/DPMI ON/code> option. KRNL386.SYS even had a command line option /VER=0.9, 1.0
to provide support for either DPMI 1.0 or 0.9. DOS API translation was referred to as "called interrupt 21 from protected mode". Multiuser DOS, System Manager and REAL/32 support DPMI as well.
The most famous separate DPMI kernel is probably CWSDPMI
CWSDPMI is a 32-bit DOS Protected Mode Interface, DPMI host written by Charles W. Sandmann from 1996 to 2010, currently at r7. It is loosely based upon prior GO32.EXE code used in DJGPP v1. It can provide DPMI 0.90+ 32-bit services for programs com ...
; it supports DPMI 0.9, but no undocumented "DOS API translation".
Another variant called PMODE by "TRAN" aka Thomas Pytel
Thomas may refer to:
People
* List of people with given name Thomas
* Thomas (name)
* Thomas (surname)
* Saint Thomas (disambiguation)
* Thomas Aquinas (1225–1274) Italian Dominican friar, philosopher, and Doctor of the Church
* Thomas the Ap ...
was popular with 32-bit programmers during the demo scene of the 1990s.
Many games used DOS/4GW, which was developed by Rational Systems
Tenberry Software (previously Rational Systems) was a software company notable for the development of DOS/16M and DOS/4G, which were the first industry standard DOS extender
A DOS extender is a computer software program running under DOS that e ...
as a subset of DOS/4G and was distributed with the Watcom C compiler
Watcom C/C++ (currently Open Watcom C/C++) is an integrated development environment (IDE) product from Watcom International Corporation for the C, C++, and Fortran programming languages. Watcom C/C++ was a commercial product until it was discon ...
.
HDPMI (part of HX DOS Extender) provides "DOS API translation" and almost complete DPMI 1.0 implementation.
DPMI Committee
The DPMI 1.0 Committee met between 1990 through 1991 and consisted of 12 groups:
* Borland International
Borland Software Corporation was a computer technology company founded in 1983 by Niels Jensen, Ole Henriksen, Mogens Glad and Philippe Kahn. Its main business was the development and sale of software development and software deployment products ...
( Borland C, Turbo Pascal
Turbo Pascal is a software development system that includes a compiler and an integrated development environment (IDE) for the Pascal programming language running on CP/M, CP/M-86, and DOS. It was originally developed by Anders Hejlsberg at ...
)
* IBM Corporation ( PC DOS, OS/2
OS/2 (Operating System/2) is a series of computer operating systems, initially created by Microsoft and IBM under the leadership of IBM software designer Ed Iacobucci. As a result of a feud between the two companies over how to position OS/2 ...
)
* AI Architects/ Ergo Computer Solutions/ Eclipse Computer Solutions/Ergo Computing
Ergo may refer to:
* A Latin word meaning "therefore" as in Cogito ergo sum
*''Ergo (journal)'', an academic journal
* A Greek word έργο meaning "work", used as a prefix ergo-, for example, in ergonomics.
* Ergometer (rowing), an indoor rowi ...
( OS/286, OS/386 DOS extenders)
* Intelligent Graphics Corporation
VM/386 is a multitasking operating system or 'control program' that took early advantage of the capabilities of Intel's 386 processor. By utilizing Virtual 8086 mode, users were able to run their existing text-based and graphical DOS software i ...
( VM/386 multi-user DOS)
* Intel Corporation
Intel Corporation is an American multinational corporation and technology company headquartered in Santa Clara, California. It is the world's largest semiconductor chip manufacturer by revenue, and is one of the developers of the x86 series ...
(286
__NOTOC__
Year 286 ( CCLXXXVI) was a common year starting on Friday (link will display the full calendar) of the Julian calendar. At the time, it was known as the Year of the Consulship of Maximus and Aquilinus (or, less frequently, year 1039 ...
, 386
__NOTOC__
Year 386 ( CCCLXXXVI) was a common year starting on Thursday (link will display the full calendar) of the Julian calendar. At the time, it was known as the Year of the Consulship of Honorius and Euodius (or, less frequently, year 113 ...
, 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 ...
microprocessors)
* Locus Computing Corporation ( Merge)
* Lotus Development Corporation
Lotus Software (called Lotus Development Corporation before its acquisition by IBM) was an American software company based in Massachusetts; it was "offloaded" to India's HCL Technologies in 2018.
Lotus is most commonly known for the Lotus 1-2- ...
(Lotus 1-2-3
Lotus 1-2-3 is a discontinued spreadsheet program from Lotus Software (later part of IBM). It was the first killer application of the IBM PC, was hugely popular in the 1980s, and significantly contributed to the success of IBM PC-compatible ...
)
* Microsoft Corporation
Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washingt ...
(MS-DOS
MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few oper ...
, Microsoft Windows)
* Phar Lap Software
Phar Lap Software, Inc., was a software company specializing in software development tools for DOS operating systems. The company was named after the champion New Zealand racehorse Phar Lap. They were most noted for their software allowing develo ...
( DOS, 286, DOS, 386, TNT)
* Phoenix Technologies
Phoenix Technologies Ltd is an American company that designs, develops and supports core system software for personal computers and other computing devices. The company's products commonly referred to as BIOS (Basic Input/Output System) or fir ...
( Phoenix BIOS, PMate, PForCe, Plink-86)
* Quarterdeck Office Systems ( QEMM, DESQview, DESQview/X
DESQview (DV) is a text mode multitasking operating environment developed by Quarterdeck Office Systems which enjoyed modest popularity in the late 1980s and early 1990s. Running on top of DOS, it allows users to run multiple programs concurrentl ...
)
* Rational Systems
Tenberry Software (previously Rational Systems) was a software company notable for the development of DOS/16M and DOS/4G, which were the first industry standard DOS extender
A DOS extender is a computer software program running under DOS that e ...
/ Tenberry Software ( DOS/16M, DOS/4G, DOS/4GW
DOS/4G is a 32-bit DOS extender developed by Rational Systems (later Tenberry Software). It allows DOS programs to eliminate the 640 KB conventional memory limit by addressing up to 64 MB of extended memory on Intel 80386 and above machine ...
DOS extenders)
See also
* Virtual Control Program Interface (VCPI)
* DOS Protected Mode Services
DOS Protected Mode Services (DPMS) is a set of extended DOS memory management services to allow DPMS-enabled DOS drivers to load and execute in extended memory and protected mode.
Not being a DOS extender by itself, DPMS is a minimal set of ...
(DPMS)
* Helix Cloaking
* NetWare I/O Subsystem (NIOS)
* Multiuser DOS Federation
Notes
References
Further reading
* (22 pages)
* (112 pages)
* (160 pages)
*
*
* (MSDPMI on Japanese MS-DOS 5.00A for PC-98
The , commonly shortened to PC-98 or , is a lineup of Japanese 16-bit and 32-bit personal computers manufactured by NEC from 1982 to 2000. The platform established NEC's dominance in the Japanese personal computer market, and, by 1999, more ...
platform.)
External links
*
*
*
*
*
{{Disk operating systems
DOS technology
DOS memory management
DOS extenders
Computer-related introductions in 1989