SAMPLE: DPMI0301.exe Simulates Real Mode Interrupts

ID: Q79989

The information in this article applies to:

SUMMARY

DPMI0301.exe is a sample that demonstrates how an application developed for the Microsoft Windows operating system can use MS- DOS Protected Mode Interface (DPMI) functions 0300h (Simulate Real Mode Interrupt) and 0301h (Call Real Mode Procedure with Far Return Frame). DPMI0301.exe contains source code for a TSR and an application for the Microsoft Windows graphical environment that demonstrate simulating real mode interrupts using DPMI.

MORE INFORMATION

The following file is available for download from the Microsoft Software Library:

 ~ DPMI0301.exe (size: 18750 bytes) 

For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q119591
   TITLE     : How to Obtain Microsoft Support Files from Online Services

The DPMI0301 example has two parts. One part is an MS-DOS terminate-and- stay-resident (TSR) program that must be run before Windows is started. The TSR hooks Interrupt 72h.

The second part of the example is an application that runs under Windows and communicates with the TSR program. When the application starts, it issues a software Interrupt 72h by calling DPMI Function 0300h (Simulate Real Mode Interrupt).

When the TSR program receives this interrupt, it returns the address of an internal routine in the DX:BX register pair. The application takes the address and saves it in the CS and IP structure variables.

Then, when the user selects the menu item in the application, the application calls DPMI function 0301h (Call Real Mode Procedure with Far Return Frame). At various points, the application and the TSR program send messages to the serial port to indicate the progress of the application-TSR program communication.

Additional query words: DDKDPMI Keywords : IsrDpmiSimint

Last Reviewed: July 8, 1998