HomePage | Optical Illusions | War Stories | QBasic | Dads Navy Days | Bristol | Bristol, USA | Bristol, Canada | Terre Haute | Miscellany | Web Stuff | About Ray | Site Map | Site Search | Messages | Credits | Links | Web Rings

QBasic | Errors | 40lb Weight | Bits | Chance | Colours | Dates | Delays | File Dialog | Files | Input | Matching | Menus | Mouse | Numbers | SeqNo | SIRDS | Sorts | Text | Timer | DLoads

Mouse support

As much as I like QBasic, two of the most annoying things about it is the lack of point and click file support and its utter disregard for the mouse.

There is a way, though, to make QBasic recognise and use the mouse, this is through the system known as interupts. Think of interupts as a collection of pre-written subroutines provided by the operating system. They control and report on all aspects of the system. These subroutines also contain sub functions that can be used to get to further information.

The interupts not only give information, the data they point to can be changed. As interupts control all aspects of the operating system they are very powerful tools. Unfortunately, as PCs got more complicated and more devices were added the interupts have changed over the years, so if you are tempted to go into this area of programming make sure you have the most up to date information on them that you can get hold of. A good place to start is the Ralf Brown's Interupt List.

The mouse uses interupt 33 (in hexadecimal), function AX = 3 of this returns further information on the mouse. If BX = 1 then the left button is pressed, 2 then the right button is pressed, 3 means both buttons are depressed. CX gives the X position of the mouse cursor and CD the Y position.

I cannot take any credit for the three programs contained in the download zip file, but I have adapted them all slightly. I do not know who the original authors are either.

Bob Goddard very kindly sent me the program mouse6.bas in April 2002. He says he can't take the credit for writing it, he just adapted and improved it. I thinks it works very well.

A further word of caution, the programs Mouser and Mousex have both caused memory conflicts on my PC. I take no responsibility for how these programs affect your PC at all.

QBasic | Errors | 40lb Weight | Bits | Chance | Colours | Dates | Delays | File Dialog | Files | Input | Matching | Menus | Mouse | Numbers | SeqNo | SIRDS | Sorts | Text | Timer | DLoads

HomePage | Optical Illusions | War Stories | QBasic | Dads Navy Days | Bristol | Bristol, USA | Bristol, Canada | Terre Haute | Miscellany | Web Stuff | About Ray | Site Map | Site Search | Messages | Credits | Links | Web Rings