;-----------------------------
; Detecting MS Windows by Joe Koss

PROC    IsWin
        ; in> None
        ;out> CF = TRUE if Windows

        ; First check for windows 3.0 in Real (/R) or Standard (/S) mode.
        mov ax 4680h
        int 2fh
        or ax, ax
        jz @@Windows

        ; Now check for Windows 3.x in enhanced mode and Win/386 2.x
        mov ax, 1600h
        int 2Fh
        or ax, ax
        jz @@NoWindows
        cmp al, 80h
        je @@NoWindows
@@Windows
        stc
        ret
@@NoWindows
        clc
        ret
ENDP    IsWin

