DOS Protected Mode Interface
Encyclopedia
In computing
Computing
Computing is usually defined as the activity of using and improving computer hardware and software. It is the computer-specific part of information technology...

, the DOS Protected Mode Interface (DPMI) is a specification introduced in 1989 which allows a DOS
DOS
DOS, short for "Disk Operating System", is an acronym for several closely related operating systems that dominated the IBM PC compatible market between 1981 and 1995, or until about 2000 if one includes the partially DOS-based Microsoft Windows versions 95, 98, and Millennium Edition.Related...

 program to run in protected mode
Protected mode
In computing, protected mode, also called protected virtual address mode, is an operational mode of x86-compatible central processing units...

, giving access to many features of the processor not available in real mode
Real mode
Real mode, also called real address mode, is an operating mode of 80286 and later x86-compatible CPUs. Real mode is characterized by a 20 bit segmented memory address space and unlimited direct software access to all memory, I/O addresses and peripheral hardware...

. It was initially developed by Microsoft
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...

 for Windows 3.0
Windows 3.0
Windows 3.0, a graphical environment, is the third major release of Microsoft Windows, and was released on 22 May 1990. It became the first widely successful version of Windows and a rival to Apple Macintosh and the Commodore Amiga on the GUI front...

, although Microsoft later turned control of the specification over to an industry committee with open membership. Almost all DOS extender
DOS extender
A DOS extender is a computer software program which enables software to run under a protected mode environment even though the host operating system is only capable of operating in real mode....

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
Ring (computer security)
In computer science, hierarchical protection domains, often called protection rings, are a mechanism to protect data and functionality from faults and malicious behaviour . This approach is diametrically opposite to that of capability-based security.Computer operating systems provide different...

 3, least privileged).

Overview

DPMI allows a program to run in protected mode
Protected mode
In computing, protected mode, also called protected virtual address mode, is an operational mode of x86-compatible central processing units...

 on the 80x86 series processors and make calls back to the operating system running in "unprotected" mode. For example, an MS-DOS program can "turn on" protected mode, but still make calls back to DOS for service (say, via the INT 21h 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 taking 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
Windows 3.x
Windows 3.x can refer to either an individual or all of the following versions of Microsoft Windows:*Windows 3.0*Windows 3.1x*Windows 3.2...

, since Windows itself was 16-bit. This capability remains today in a 32-bit Windows "DOS box" all the way to the Windows 7 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 had native support for 32-bit programs, 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
FreeDOS
FreeDOS is an operating system for IBM PC compatible computers. FreeDOS is made up of many different, separate programs that act as "packages" to the overall FreeDOS Project...

 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
DOS extender
A DOS extender is a computer software program which enables software to run under a protected mode environment even though the host operating system is only capable of operating in real mode....

 (real DPMI host). The DPMI kernel can be part of a DOS extender such as in DOS/4GW
DOS/4GW
DOS/4G is a 32-bit DOS extender developed by Rational Systems . 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
CWSDPMI
CWSDPMI is a DPMI host written by Charles W Sandmann from 1996 to present, currently at r7. It is loosely based upon prior GO32 code used in DJGPP v1. It can provide DPMI 0.90+ services for programs compiled with latest versions of DJGPP etc. compilers. Since r5, it can also be used for programs...

 or HDPMI.

History

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 (even not with 1.0); nevertheless, Windows implements this undocumented "True DPMI" nature. The official 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
OS/2
OS/2 is a computer operating system, initially created by Microsoft and IBM, then later developed by IBM exclusively. The name stands for "Operating System/2," because it was introduced as part of the same generation change release as IBM's "Personal System/2 " line of second-generation personal...

 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.

DPMI is tailored to run extended DOS application software in protected mode and extended memory, but it is not particularly well suited for resident system extensions. Another specification named DPMS
DOS Protected Mode Services
DOS Protected Mode Services 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....

 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 downto small stubs.

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
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

, so most programs and DOS extenders were mostly only written for version 0.9. Few extenders, however, implement "true DPMI".

The most famous separate DPMI kernel is probably CWSDPMI
CWSDPMI
CWSDPMI is a DPMI host written by Charles W Sandmann from 1996 to present, currently at r7. It is loosely based upon prior GO32 code used in DJGPP v1. It can provide DPMI 0.90+ services for programs compiled with latest versions of DJGPP etc. compilers. Since r5, it can also be used for programs...

; it supports DPMI 0.9, but no undocumented "DOS API translation".
Another variant called PMODE
PMODE
PMODE is a DOS extender used in several IBM PC compatible DOS applications in the mid and late 1990s. It was created by Thomas "Tran" Pytel, and the first version became publicly available in 1994. The original PMODE was written to be used with programs written in x86 assembler, specifically using...

 by "TRAN" aka Thomas Pytel
Thomas Pytel
Tomasz Pytel is a Polish-American programmer, better known as Tran / Renaissance in the demoscene. He is notable for creating the Timeless demo in 1994, and for co-creating the PMODE DOS extender with Charles Scheffold . He was also the designer of the PC game Zone 66. After that, he went to 3D...

 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 compiler
The Watcom C/C++ compiler is a compiler for the computer programming languages C and C++ that produces executable programs for several platforms and operating systems. The code it produces for MS-DOS executes very fast. It was one of the first compilers to support the Intel 80386 "protected mode"...

.

HDPMI (part of HX DOS Extender
HX DOS Extender
The HX DOS Extender is a free DOS extender with built-in Win32 PE file format support. Usually the purpose of a DOS extender is to make protected mode features, especially large memory and 32-bit addressing, available for DOS applications. HX fully supports this goal, but goes some steps further...

) provides "DOS API translation" and almost complete DPMI 1.0 implementation.

Currently DPMIONE (formerly part of 386MAX
386MAX
386MAX was a computer memory manager for DOS-based personal computers. It competed with Quarterdeck's QEMM memory manager. It was manufactured by Qualitas....

) 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:
  • Borland International (Borland C
    Borland C
    Borland C may refer to:* Borland C++, a C++ compiler which followed and replaced Borland C* Borland C, a 1990s C computer programming language compiler from Borland...

    , Turbo Pascal
    Turbo Pascal
    Turbo Pascal is a software development system that includes a compiler and an integrated development environment for the Pascal programming language running on CP/M, CP/M-86, and DOS, developed by Borland under Philippe Kahn's leadership...

    )
  • IBM Corporation (PC-DOS
    PC-DOS
    IBM PC DOS is a DOS system for the IBM Personal Computer and compatibles, manufactured and sold by IBM from the 1980s to the 2000s....

    , OS/2
    OS/2
    OS/2 is a computer operating system, initially created by Microsoft and IBM, then later developed by IBM exclusively. The name stands for "Operating System/2," because it was introduced as part of the same generation change release as IBM's "Personal System/2 " line of second-generation personal...

    )
  • AI Architects/Ergo Computer Solutions/Eclipse Computer Solutions/Ergo Computing (OS/286, OS/386 DOS extenders)
  • Intelligent Graphics Corporation (VM/386
    VM/386
    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 safely separate environments. The system offered a...

     multi-user DOS)
  • Intel Corporation
    Intel Corporation
    Intel Corporation is an American multinational semiconductor chip maker corporation headquartered in Santa Clara, California, United States and the world's largest semiconductor chip maker, based on revenue. It is the inventor of the x86 series of microprocessors, the processors found in most...

     (286
    Intel 80286
    The Intel 80286 , introduced on 1 February 1982, was a 16-bit x86 microprocessor with 134,000 transistors. Like its contemporary simpler cousin, the 80186, it could correctly execute most software written for the earlier Intel 8086 and 8088...

    , 386
    Intel 80386
    The Intel 80386, also known as the i386, or just 386, was a 32-bit microprocessor introduced by Intel in 1985. The first versions had 275,000 transistors and were used as the central processing unit of many workstations and high-end personal computers of the time...

    , 486
    Intel 80486
    The Intel 80486 microprocessor was a higher performance follow up on the Intel 80386. Introduced in 1989, it was the first tightly pipelined x86 design as well as the first x86 chip to use more than a million transistors, due to a large on-chip cache and an integrated floating point unit...

     microprocessors)
  • Locus Computing Corporation
    Locus Computing Corporation
    Locus Computing Corporation was formed in 1982 by Gerald J. Popekto commercialize the technologies developed for the LOCUS distributed operating system at UCLA...

     (Merge
    Merge (software)
    Merge is a software system which allows a user to run DOS/Windows 3.1 on SCO UNIX, in an 8086 virtual machine.Merge was originally developed to run DOS under UNIX System V Release 2 on an AT&T 6300+ personal computer...

    )
  • Lotus Development Corporation (Lotus 1-2-3
    Lotus 1-2-3
    Lotus 1-2-3 is a spreadsheet program from Lotus Software . It was the IBM PC's first "killer application"; its huge popularity in the mid-1980s contributed significantly to the success of the IBM PC in the corporate environment.-Beginnings:...

    )
  • Microsoft Corporation (MS-DOS
    MS-DOS
    MS-DOS is an operating system for x86-based personal computers. It was the most commonly used member of the DOS family of operating systems, and was the main operating system for IBM PC compatible personal computers during the 1980s to the mid 1990s, until it was gradually superseded by operating...

    , Microsoft Windows
    Microsoft Windows
    Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

    )
  • Phar Lap Software (286DOS, 386DOS, TNT)
  • Phoenix Technologies
    Phoenix Technologies
    Phoenix Technologies Ltd designs, develops and supports core system software for personal computers and other computing devices. Phoenix's products — commonly referred to as BIOS or firmware — support and enable the compatibility, connectivity, security and management of the various components and...

     (Phoenix BIOS, PMate, PForCe, Plink-86)
  • Quarterdeck Office Systems
    Quarterdeck Office Systems
    Quarterdeck Office Systems, later Quarterdeck Corporation , was an American computer software company. It was founded by Therese Myers and Gary Pope in 1981and incorporated in 1982...

     (QEMM
    QEMM
    Quarterdeck Expanded Memory Manager , was a memory manager produced by Quarterdeck Office Systems in the late 1980s through late 1990s. It was the most popular memory manager for the MS-DOS and other DOS operating systems.-QEMM product ranges:QRAM: A memory manager for 286 or higher CPU. It...

    , DesqView
    DESQview
    DESQview was a text mode multitasking program developed by Quarterdeck Office Systems which enjoyed modest popularity in the late 1980s and early 1990s...

    )
  • Rational Systems/Tenberry Software
    Tenberry Software
    Tenberry Software is a software company that developed the DOS/16M and DOS/4G DOS extenders....

     (DOS/16M, DOS/4G, DOS/4GW
    DOS/4GW
    DOS/4G is a 32-bit DOS extender developed by Rational Systems . 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)

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK