This DPMI 0.9 Specification is hosted by Tenberry Software, Inc.

7. Mode Detection


[Next Section] * [Previous Section] * [DPMI Index]
[Tenberry Home] * [Software Quality] * [DOS/4G] * [DOS/4GW] * [DOS/16M]

It is possible to write a program or library that can run in either real or protected mode. This function is supplied so that bimodal code can detect at run time whether it is running under protected mode. Code that only runs in protected mode does not need to perform this test.

To Call

     AX = 1686h
     Execute an Int 2Fh (not an Int 31h)

Returns

     If executing in protected mode under DPMI:
     AX = 0

     If executing in real mode or not under DPMI then:
     AX != 0

Programmer's Notes


[Next Section] * [Previous Section] * [DPMI Index]
[Tenberry Home] * [Software Quality] * [DOS/4G] * [DOS/4GW] * [DOS/16M]
This HTML edition of the DPMI 0.9 Specification is hosted by Tenberry Software, Inc., makers of the DOS/16M and the DOS/4G family of DOS extenders. Page last modified 2003.1.28, <webmaster@tenberry.com>