' In head of code:
'$INCLUDE: 'qb.bi'    'Include the file for type register variable. The file qb.bi must be present in the same directory will .EXE create, after the compilation the .EXE can run alone.
DECLARE SUB mouseget (bott%, x%, y%)  'Declarations of subroutines. In the code its can be called only with the name. 
DECLARE SUB mouseshow ()
DECLARE SUB mousehide ()
DECLARE SUB mousecenter ()

'At end of code:

'get data of button 1 on or off, x, y coordinates of cursor position.
SUB mouseget (bott%, x%, y%) 'Name of subroutines and parameters.
    DIM reg AS RegType 'Reset register variables
    reg.ax = 3         'Put the number of service of the interrupt.
    CALL INTERRUPT(&H33, reg, reg) 'Call the interrupt of mouse.
    'Get the data:
    x% = reg.cx
    y% = reg.dx
    IF reg.bx = 1 OR reg.bx = 2 THEN bott% = 1 ELSE bott% = 0 'Button 1 is click, 0 is released 
END SUB

'Cursor hide. In MSDOS is necessary before every graphics statements: CIRLE, LINE, etc... else if the cursor is where the objects appear, the confusion can be total. 
SUB mousehide ()
    DIM reg AS RegType
    reg.ax = 2
    CALL INTERRUPT(&H33, reg, reg)
END SUB

'Cursor appear. After every graphics statements.
SUB mouseshow ()
    DIM reg AS RegType
    reg.ax = 1
    CALL INTERRUPT(&H33, reg, reg)
END SUB

'The cursor is forced at the center of the screen.
SUB mousecenter ()
    DIM reg AS RegType
    reg.ax = 0
    CALL INTERRUPT(&H33, reg, reg)
END SUB