*** Welcome to piglix ***

DPMI 1.0


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 new PC processors of the time 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. Almost all modern 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 80286 series and later processors and make calls back to the operating system running in Real Mode. For example, a 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, since Windows itself was 16-bit. This capability remains today in a 32-bit Windows "DOS box" all the way to the Windows 10 operating system (32-bit editions only) for backwards compatibility reasons (although unofficially deprecated).

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 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.


...
Wikipedia

...