
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Dos Protected Mode Interface - <b>mode detection</b>
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
MODE DETECTION
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
o This call will return AX = 0 when the caller is
running in protected mode. It will return AX non-
zero even when running under environments that
support DPMI if the caller is in real (virtual
8086) mode.
Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson