The Full Wiki

DPMI: Wikis

Note: Many of our articles have direct quotes from sources you can cite, within the Wikipedia article! This article doesn't yet, but we're working on it! See more info or our list of citable articles.


(Redirected to DOS Protected Mode Interface article)

From Wikipedia, the free encyclopedia

In computing, the DOS Protected Mode Interface (DPMI) is a specification introduced in 1989 which allows a DOS program to run in protected mode, giving access to many features of the processor not available in real mode. It was initially developed by Microsoft for Windows 3.0, although Microsoft later turned control of the specification over to an industry committee with open membership.[1] Almost all DOS extenders 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).



DPMI allows a program to run in protected mode on the 80x86 series processors and make calls back to the operating system running in "unprotected" mode. For example, a MS-DOS program can "turn on" protected mode, but still make calls back to DOS for service (say, via the 0x21 standard DOS service interrupt). The most important reason for doing this is to allow protected mode programs to function under DOS, whose kernel used 16-bit real mode throughout its commercial life. Because MS-DOS (as a standalone operating system) was never updated for 32 bits, nor enabled 24- or 32-bit addressing, DPMI served as a "patch" to allow advanced protected mode programs to run on the stable MS-DOS platform. DPMI can be thought of as a "translator" that takes (for example) protected mode DOS calls and translates the registers to and from real and protected mode, including translating 16-bit segmented addresses and translating them to a suitable protected mode format.

DPMI also allows, for some time, 32-bit programs to run under Windows 3.x, since Windows itself was 16-bit. This capability remains today in a 32-bit Windows "DOS box" all the way to the Windows Vista operating system for backwards compatibility reasons (although unofficially deprecated).

Unfortunately, DPMI constitutes the only officially supported method to run protected mode DOS programs in most DOS-compatible multitasking operating systems. While Windows has long supported better modes for 32-bit programs such as full GDI, DirectX and console modes, the many MS-DOS compatible systems that still exist must typically use DPMI to provide protected mode services or risk being incompatible. Systems such as FreeDOS still have a place in embedded systems programming, where their simplicity and their low implementation and resource costs, due to the abundance of API documentation and compiler tools, are important.

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 (real DPMI host). The DPMI kernel can be part of a DOS extender such as in DOS/4GW or DOS/32A, or separate, like CWSDPMI or HDPMI.


The first DPMI specification drafts were published in 1989. Version 0.9 was published in 1990 by the DPMI Committee, and it was again extended in 1991 with version 1.0. An additional feature called "True DPMI" or "DOS API translation" was proposed by Ralph Lipe in the version 0.9 drafts, but never became part of the official specification; nevertheless, it is featured by quite a few products. The DPMI specification is available from Intel Literature Sales as well as online.

Note that the DPMI "method" is specific to MS-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 core system supports 32-bit programs, and can be run without the GDI. The DPMI solution appeares 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.


While Windows 3.0 includes support for DPMI 0.9,[2] version 1.0 was never fully implemented in Microsoft Windows, so many programs and DOS extenders were mostly only written for version 0.9.

The most famous separate DPMI kernel is probably CWSDPMI; however, it only fully supports DPMI 0.9 and no undocumented "DOS API translation". Another variant called PMODE by TRAN aka Thomas Pytel which was popular with 32 bit programmers during the demo scene of the nineties.

HDPMI (part of HX DOS Extender) provides "DOS API translation" and almost complete DPMI 1.0 implementation.

Currently DPMIONE (formerly part of 386MAX) is the only standalone DPMI host which supports DPMI 1.0 completely (e.g. uncommitted memory).

DPMI Committee

The DPMI 1.0 Committee met between 1989 through 1991 and consisted of 12 groups:

See also


  1. ^ Duncan, Ray (1992). Extending DOS: A Programmer's Guide to Protected-Mode DOS (2nd ed. ed.). Addison-Wesley. pp. 433–436. ISBN 0-201-56798-9.  
  2. ^ "FILE: Windows Int 21h and NetBIOS Support for DPMI (MSKB65128)". Knowledge Base. Microsoft. August 4, 2004. Retrieved 2008-10-05.  


External links

This article was originally based on material from the Free On-line Dictionary of Computing, used with permission. Update as needed.

Got something to say? Make a comment.
Your name
Your email address