DECLARE SUB Stopprogram ()
DECLARE FUNCTION MouseInit% ()

'$INCLUDE: 'qb2.bi'
DIM SHARED Regs AS RegTypeX
Hand:
DATA &HFFFF,&HFFFF,&HFFFF,&HFFFF,&HFFFF,&HFFFF,&HFFFF,&HFFFF
DATA &HFFFF,&HFFFF,&HFFFF,&HFFFF,&HFFFF,&HFFFF,&HFFFF,&HFFFF
DATA &H100,&H100,&H100,&H100,&H100,&H100,&H100,&H100
DATA &HFFFE,&H100,&H100,&H100,&H100,&H100,&H100,&H100


SUB MouseCursor
RESTORE Hand:
DIM m%(0 TO 31)
FOR i = 0 TO 31
READ m%(i)
NEXT i
Regs.ax = 9
Regs.bx = 7
Regs.cx = 8
Regs.dx = VARPTR(m%(0))
Regs.es = VARSEG(m%(0))
INTERRUPTX &H33, Regs, Regs
END SUB

SUB MouseHide
Regs.ax = 2
INTERRUPTX &H33, Regs, Regs
END SUB

FUNCTION MouseInit%
Regs.ax = 0
INTERRUPTX &H33, Regs, Regs
MouseInit% = Regs.ax
IF NOT Regs.ax = -1 THEN
PRINT "Mouse not installed"
Stopprogram
END
END IF
END FUNCTION

SUB MouseShow
Regs.ax = 1
INTERRUPTX &H33, Regs, Regs
END SUB

SUB ReturnData (Button%, x%, y%)
Regs.ax = 3
INTERRUPTX &H33, Regs, Regs
Button% = Regs.bx
x% = Regs.cx
y% = Regs.dx
END SUB

