Writing drivers? I don't think QB is the language to do it in. Anyhow, someone gave me thid code awhile back. It adds support for a Mouse
DEFINT A-Z
DECLARE SUB basicint (IntType AS INTEGER) 'the routine
DECLARE SUB mouseinit (scrmode) 'starts the mouse(in SCREEN scrmode)
DECLARE SUB mouseshow ()
DECLARE SUB mousehide ()
DECLARE SUB updatemouse () 'call this each time new data from
'the mouse is wanted
DECLARE FUNCTION mousex ()
DECLARE FUNCTION mousey ()
DECLARE FUNCTION lbutton () 'Ä¿
DECLARE FUNCTION rbutton () ' Å 1 if pressed, 0 if not pressed
DECLARE FUNCTION bothbs () 'ÄÙ
COMMON SHARED xfactor, yfactor
TYPE REGISTERS
ax AS INTEGER
bx AS INTEGER
cx AS INTEGER
dx AS INTEGER
END TYPE
DIM SHARED regs AS REGISTERS
PRINT "Yippy do dah day... A mouse routine..."
LOCATE 10, 1: PRINT "Press any key to exit."
mouseshow
DO
updatemouse
LOCATE 2, 1
PRINT "X:"; mousex, "Y:"; mousey
PRINT "L:"; lbutton, "R:"; rbutton, "BOTH:"; bothbs
LOOP UNTIL INKEY$ <> ""
mousehide
END
DATA 1566,3669,-30457,-29723,2678,-30547,-20284,9933,18083,-29952,3190,20653,-30291,-21053,-15991,-30291,-29758,3190,-14717,-21236,-16351,1396,-16242,-30291,-29753,3190
DATA
-31970,2246,8621,29888,7941,-21168,-14711,-29096,22744,-28528,28299,-30452,70,24201,-30462,1102,22153,-29690,2142,30345,-29686,3142,32393,-24818,18057,23824,7943,714,0
SUB basicint (IntType AS INTEGER) STATIC
DIM ASM%(54)
DEF SEG = VARSEG(ASM%(0))
IF ASM%(1) = 0 THEN
FOR l = 0 TO 54: READ ASM%(l): NEXT
END IF
CALL ABSOLUTE(regs, IntType, VARPTR(ASM%(0)))
DEF SEG
END SUB
FUNCTION bothbs
IF lbutton = 1 AND rbutton = 1 THEN
bothbs = 1
ELSE
bothbs = 0
END IF
END FUNCTION
FUNCTION lbutton
lbutton = regs.bx AND 1
END FUNCTION
SUB mousehide
regs.ax = 2: CALL basicint(&H33)
END SUB
SUB mouseinit (scrmode)
regs.ax = 3: CALL basicint(&H33)
SELECT CASE scrmode
CASE 0: xfactor = 8: yfactor = 8
CASE 1: xfactor = 2: yfactor = 1
CASE 2: xfactor = 1: yfactor = 1
CASE 7: xfactor = 2: yfactor = 1
CASE 8: xfactor = 1: yfactor = 1
CASE 9: xfactor = 1: yfactor = 1
CASE 10: xfactor = 1: yfactor = 1
CASE 11: xfactor = 1: yfactor = 1
CASE 12: xfactor = 1: yfactor = 1
CASE 13: xfactor = 2: yfactor = 1
CASE ELSE: PRINT "What kind of screen mode is that?!?!": END
END SELECT
END SUB
SUB mouseshow
regs.ax = 1: CALL basicint(&H33)
END SUB
FUNCTION mousex
mousex = regs.cx / xfactor
END FUNCTION
FUNCTION mousey
mousey = regs.dx / yfactor
END FUNCTION
FUNCTION rbutton
rbutton = (regs.bx AND 2) / 2
END FUNCTION
SUB updatemouse
regs.ax = 3: CALL basicint(&H33)
END SUB