DECLARE SUB Mousestat (lb%,rb%,xmouse%,ymouse%)
DECLARE SUB Mousedriver (ax%,bx%,cx%,dx%)
DECLARE SUB Mouseshow ()
DECLARE FUNCTION Mouseinit% ()
DIM SHARED mouse$
Mouse$ = SPACE$(57)
FOR i% = 1 to 57
READ a$
h$ = CHR$(VAL("&h"+a$))
MID$(Mouse$,i%,1)=h$
NEXT i%
DATA 55,89,e5,8b,5e,0c,8b,07,50,8b,5e,0a,8b,07,50,8b
DATA 5e,08,8b,0f,8b,5e,06,8b,17,5b,58,1e,07,cd,33,53
DATA 8b,5e,0c,89,07,58,8b,5e,0a,89,07,8b,5e,08,89,0f
DATA 8b,5e,06,89,17,5d,ca,08,00
CLS
ms% = Mouseinit%
IF NOT ms% THEN PRINT "Mouse Not Found": END
mouseshow
PRINT "Right Click to Exit"
DO
Mousestat lb%,mb%,rb%,x%,y%
PRINT lb%,mb%,rb%,x%,y%
LOOP UNTIL rb% = -1
SUB Mousedriver (ax%,bx%,cx%,dx%,Mouse%)
DEF SEG = VARSEG(Mouse$)
Mouse% = SADD(Mouse$)
CALL Absolute (ax%,bx%,cx%,dx%,Mouse%)
END SUB
FUNCTION Mouseinit%
ax% = 0
Mousedriver ax%,0,0,0
Mouseinit% = ax%
END FUNCTION
SUB Mouseshow
ax% = 1
Mousedriver ax%,0,0,0
END SUB
SUB Mousestat (lb%,mb&,rb%,xmouse%,ymouse%)
ax% = 3
Mousedriver ax%,bx%,cx%,dx%
lb% = ((bx% AND 1)<>0)
rb% = ((bx% AND 1)<>0)
mb% = -((bx% AND 4) \ 4)
ymouse% = dx%
xmouse% = cx%
END SUB