DOS Protected Mode Interface
   HOME

TheInfoList



OR:

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 DOS is shorthand for the MS-DOS and IBM PC DOS family of operating systems. DOS may also refer to: Computing * Data over signalling (DoS), multiplexing data onto a signalling channel * Denial-of-service attack (DoS), an attack on a communicat ...
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 ...
. It was initially developed by
Microsoft 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, Washi ...
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 ...
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 remember ...
. 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. It can be thought of as a single-tasking microkernel. The rest of the functionality is available to DPMI-enabled programs via the calls to real-mode
DOS DOS is shorthand for the MS-DOS and IBM PC DOS family of operating systems. DOS may also refer to: Computing * Data over signalling (DoS), multiplexing data onto a signalling channel * Denial-of-service attack (DoS), an attack on a communicat ...
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 b ...
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 machines ...
or DOS/32A, or separate, like CWSDPMI 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 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). Comput ...
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,
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 and ...
,
Interactive Systems Interactive Systems Corporation (styled INTERACTIVE Systems Corporation, abbreviated ISC) was a US-based software company and the first vendor of the Unix operating system outside AT&T, operating from Santa Monica, California. It was founded in 19 ...
and others developed a specification named
Extended VCPI In computing, the Virtual Control Program Interface (VCPI) is a specification published in 1989 by Phar Lap Software that allows a DOS program to run in protected mode, granting access to many features of the processor not available in real mod ...
(
XVCPI In computing, the Virtual Control Program Interface (VCPI) is a specification published in 1989 by Phar Lap Software that allows a DOS program to run in protected mode, granting access to many features of the processor not available in real mode ...
) 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 and ...
/
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 le ...
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
stub Stub or Stubb may refer to: Shortened objects and entities * Stub (stock), the portion of a corporation left over after most but not all of it has been bought out or spun out * Stub, a tree cut and allowed to regrow from the trunk; see Pollardi ...
s. 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 r ...
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 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 ...
, 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 Quarterdeck Expanded Memory Manager (QEMM) is a memory manager produced by Quarterdeck ...
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- ...
and "StarTrek", which has been under development since 1991, and the EMM386.EXE memory managers of
Novell DOS 7 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 ...
, 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- ...
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; 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 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 dis ...
. 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 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 product ...
C, Turbo Pascal) * IBM Corporation (
PC DOS PC or pc may refer to: Arts and entertainment * Player character or playable character, a fictional character controlled by a human player, usually in role-playing games or computer games * '' Port Charles'', an American daytime TV soap opera * ...
,
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 r ...
) * AI Architects/ Ergo Computer Solutions/ Eclipse Computer Solutions/ Ergo Computing ( 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 in ...
( 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 serie ...
( 286, 386,
486 __NOTOC__ Year 486 (Roman numerals, 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 freq ...
microprocessors) *
Locus Computing Corporation Locus Computing Corporation was formed in 1982 by Gerald J. Popek, Charles S. Kline and Gregory I. Thiel to commercialize the technologies developed for the LOCUS distributed operating system at UCLA. Locus was notable for commercializing s ...
( 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- ...
( Lotus 1-2-3) *
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 o ...
,
Microsoft 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 ...
) * Phar Lap Software ( DOS, 286, DOS, 386, TNT) * Phoenix Technologies ( Phoenix BIOS, PMate, PForCe, Plink-86) * Quarterdeck Office Systems (
QEMM Quarterdeck Expanded Memory Manager (QEMM) is a memory manager produced by Quarterdeck Office Systems in the late 1980s through the late 1990s. It was the most popular third-party memory manager for the MS-DOS and other DOS operating systems. ...
, 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 concurrent ...
) * Rational Systems/
Tenberry Software 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 extenders. See also * Phar Lap (company), Phar Lap - competitor References ...
( 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 machines ...
DOS extenders)


See also

* Virtual Control Program Interface (VCPI) * DOS Protected Mode Services (DPMS) * Helix Cloaking *
NetWare I/O Subsystem 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 ext ...
(NIOS) *
Multiuser DOS Federation The Multiuser DOS Federation (MDOS) was an industry alliance to promote the growth and acceptance of multi-user DOS-based solutions on 286, 386 and 486 computers. It was formed in July 1990. Initially among them were Digital Research, Theos ...


Notes


References


Further reading

* (22 pages) * (112 pages) * (160 pages) *

* * (MSDPMI on Japanese MS-DOS 5.00A for PC-98 platform.)


External links

* * * * * {{Disk operating systems DOS technology DOS memory management DOS extenders Computer-related introductions in 1989