'$DYNAMIC
'$INCLUDE: 'useless.bi'
DEFINT A-Z

REM $STATIC
FUNCTION UScheckXMS%
'Checks for the existence of extended memory
DIM regs AS RegTypeX
regs.ax = &H4300
CALL interruptx(&H2F, regs, regs)
IF HEX$(regs.ax) = "4380" THEN
  UScheckXMS% = 1
ELSE
  UScheckXMS% = 0
END IF
END FUNCTION

