home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 19
/
CD_ASCQ_19_010295.iso
/
dos
/
prg
/
pas
/
swag
/
win_os2.swg
/
0003_WINCHECK.PAS.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-05-28
|
621b
|
40 lines
{
>How can I check from my Dos Program that Windows are running in
>the background?
}
Unit Chk4Win;
Interface
Type
Win3ModeType = (NoWin, RealStd, Enhanced);
Function CheckForWin3 : Win3ModeType;
Implementation
Function CheckForWin3 : Win3ModeType; Assembler;
Asm
mov ax,1600h
int 2Fh
cmp al,1
jbe @@CheckRealStd
cmp al,80h
jae @@CheckRealStd
mov al,2
jmp @@ExitPoint
@@CheckRealStd:
mov ax,4680h
int 2Fh
or ax,ax
jnz @@notWin
mov al,1
jmp @@ExitPoint
@@notWin:
xor al,al
@@ExitPoint:
end;
end.