Windows 3.1 Device Drivers (ddag31qh.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Interrupt 2Fh Function 1600h
                                                     Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
mov     ax, 1600h   ; Get Enhanced-Mode Windows Installed State
int     2Fh         ; multiplex interrupt
 
test    al, 7Fh
jz      No_EM_Win   ; 386 enhanced-mode Windows not running
 
Get Enhanced-Mode Windows Installed State (Interrupt 2Fh Function 1600h)
determines whether 386 enhanced-mode Windows is running. If a program
intends to use a 386 enhanced-mode Windows function, it must first use this
function to make sure that 386 enhanced-mode Windows is running.
 
This function is valid under all versions of 386 enhanced-mode Windows.
 
Return Value
 
The return value is 00h or 80h in the AL register if 386 enhanced-mode
Windows is not running. If 386 enhanced-mode Windows is running, the return
value depends on the version of Windows. Windows/386 version 2.x returns 01h
or 0FFh. Windows version 3.x returns the major version number in the AL
register, and the minor version number in the AH register.
 
Example
 
The following example determines whether 386 enhanced-mode Windows is
running, then determines which version is running.
 
mov     ax, 1600h
int     2Fh
test    al, 7Fh
jz      No_EM_Win   ; 386 enhanced-mode Windows not running
 
cmp     al, 1
je      Ver_2x      ; Windows/386 version 2.x running
cmp     al, -1
je      Ver_2x      ; Windows/386 version 2.x running
 
mov     byte ptr [MajorVer], al
mov     byte ptr [MinorVer], ah
 
 
                                      ♦