$CPU 8086 ' make compatible with XT systems $LIB ALL OFF ' turn off all PowerBASIC libraries $ERROR ALL OFF ' turn off all PowerBASIC error checking $OPTIMIZE SIZE ' optimize for smaller code $COMPILE UNIT ' compile to a UNIT (.PBU) '$COMPILE EXE ' compile to a UNIT (.PBU) DEFINT A-Z ' Required for all numeric functions, forces PB to not ' include floating point in UNIT (makes it smaller) '/*------------------------------------------------------------------*/ $CODE SEG "MLIB5" '/*------------------------------------------------------------------*/ ' IS4DOS() ' Returns: 0 = 4DOS is NOT loaded. ' 1 = 4DOS is loaded. ' EXAMPLE: T = IS4DOS '/*------------------------------------------------------------------*/ FUNCTION IS4DOS() PUBLIC AS INTEGER ! mov AX, &hD44D ! xor BX,BX ! INT &h2F ! mov X,AX IF X=&H44DD THEN FUNCTION = 1 ELSE FUNCTION = 0 End Function '/*------------------------------------------------------------------*/ ' $INCLUDE "C:\CODE\MLIB\MLIB.INC" ' PRINT IS4DOS ' Y$ = GETKEY