'$DYNAMIC
'$INCLUDE: 'USELESS.BI'
DEFINT A-Z

REM $STATIC
SUB USmouseHide
'Hides the mouse
DIM regs AS RegTypeX
regs.ax = &H2
CALL INTERRUPTX(&H33, regs, regs)
END SUB

FUNCTION USmouseInit
'Check for mouse driver and initialize it
DIM regs AS RegTypeX
regs.ax = &H0
CALL INTERRUPTX(&H33, regs, regs)
USmouseInit = regs.ax
END FUNCTION

SUB USmouseShow
'Shows the mouse
DIM regs AS RegTypeX
regs.ax = &H1
CALL INTERRUPTX(&H33, regs, regs)
END SUB

SUB USmouseStatus (leftbutton AS INTEGER, rightbutton AS INTEGER, posx AS INTEGER, posy AS INTEGER)
'Get the mouse status
DIM regs AS RegTypeX
regs.ax = &H3
CALL INTERRUPTX(&H33, regs, regs)
posx = regs.cx
posy = regs.dx
IF (regs.bx AND 1) THEN leftbutton = 1 ELSE leftbutton = 0
IF (regs.bx AND 2) THEN rightbutton = 1 ELSE rightbutton = 0
END SUB

