SAMPLE: Simulating Real Mode Interrupts

Last reviewed: August 5, 1996
Article ID: Q79989
The information in this article applies to:
  • Microsoft Windows Device Driver Kit (DDK) for Windows versions 3.0 and 3.1

SUMMARY

DPMI0301 is a file in the Software/Data Library 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).

Download DPMI0301.EXE, a self-extracting file, from the Microsoft Software Library (MSL) on the following services:

  • Microsoft Download Service (MSDL)

          Dial (206) 936-6735 to connect to MSDL
          Download DPMI0301.EXE (size: 18750 bytes) 
    
  • Internet (anonymous FTP)

          ftp ftp.microsoft.com
          Change to the \softlib\mslfiles directory
          Get DPMI0301.EXE (size: 18750 bytes) 
    

MORE INFORMATION

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 reference words: 3.00 3.10 DPMI0301.EXE DDKDPMI softlib
KBCategory: kbprg kbfile kbwebcontent
KBSubcategory: IsrDpmiSimint


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: August 5, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.