Loading DPMI Clients and Extended Applications

All DPMI applications begin execution in real mode. An application must run first as a real mode DOS program, but can then switch to protected mode by making a call to DPMI (or to a DOS extender). Once in protected mode, all INT 31h calls supported by DPMI may be issued by the application or its associated DOS extender functions.

A DOS extender and its application under DPMI are loaded and initialized as described below. The DOS extender:

  • Loads in real mode (or V86 mode on an 80386/80486 machine).

  • Checks for presence of a DPMI server.

  • Switches the CPU from real mode to protected mode, and loads registers with the appropriate selectors.

    If no DPMI server is present, the DOS extender checks for the existence of a VCPI server or XMS device driver before assuming total control of the CPU's execution mode, privileged control registers, and memory management hardware.

  • Uses DPMI services to build the protected mode environment to be used by the application.

  • Allocates extended memory segments to hold the application's code, data, and stacks.

  • Allocates selectors to be used by the application to execute in and/or address the memory segments.

  • Reads the application's code and data from disk into the segments.

    The DOS extender can mark pageable memory it uses below 640KB so as to reduce the demand for physical memory.

  • Installs its own handlers for any software interrupts (such as DOS INT 21h) that the application will execute.

    Control is then passed to the application.


    [Back: DOS Extenders]
    [Next: Processing in DOS Extenders]