' ' ' How to use the mouse ' ' DEFINT A-Z DECLARE SUB Mouse (cx, dx, bx) DECLARE SUB MousePointer (SW) DIM SHARED a(9) DEF SEG = VARSEG(a(0)) 'Sets the current segment address FOR i = 0 TO 17 READ r POKE VARPTR(a(0)) + i, r NEXT i CALL MousePointer(0) CALL MousePointer(3) SCREEN 12 DO 'Main loop CALL Mouse(up, over, button) CIRCLE (over, up), 1, 15 IF button = 1 THEN CIRCLE (over, up), 10, 4 'Left mouse button IF button = 2 THEN CIRCLE (over, up), 10, 11 'Right mouse button IF button = 3 THEN CIRCLE (over, up), 10, 14 'Right & Left together LOOP DATA &HB8,&H00,&H00 : 'Data for segment address DATA &H55 : DATA &H8B,&HEC : DATA &HCD,&H33 : DATA &H92 : DATA &H8B,&H5E,&H06 : DATA &H89,&H07 : DATA &H5D : DATA &HCA,&H02,&H00 : SUB Mouse (up, over, button) POKE VARPTR(a(4)), &H92 'Swap code,Get up setup CALL absolute(up, VARPTR(a(0))) 'Run Code up = up 'Adjust 25x80 POKE VARPTR(a(4)), &H91 'Swap code,Get over setup CALL absolute(over, VARPTR(a(0))) 'Run Code over = over 'Adjust 25x80 POKE VARPTR(a(4)), &H93 'Swap code,Get BX setup CALL absolute(button, VARPTR(a(0))) 'Run Code END SUB SUB MousePointer (SW) POKE VARPTR(a(0)) + 1, SW 'Swap code,Set AX = (SW) CALL absolute(c, VARPTR(a(0))) 'Run Code 'Note: 'SW = 0-reset 'SW = 1-on 'SW = 2-off 'SW = 3-coordinates END SUB