Pascal Mouse is a mouse interface library for Turbo and Borland Pascal that I wrote in 1996. I needed mouse support in a Pascal program and could not find a library that was both complete and easy to use — some were too simple, others were too complex. So I found Ralf Brown's Interrupt List, learned how INT 33H works, and wrote my own.
The library provides 55 procedures and functions wrapping almost all standard INT 33H mouse driver calls. Written in assembler for speed and small code size. Full source code included.
- Detect the mouse driver, read position and button state
- Show, hide, and position the mouse cursor
- Define custom cursor shapes in text and graphics modes
- Set movement range, sensitivity, and double-speed threshold
- Install custom mouse event handlers
- Save and restore mouse driver state
- Enable and disable the mouse driver
- Query driver version, mouse type, and IRQ
- Convert between virtual and text-mode coordinates
The ZIP contains the source code, a pre-compiled unit for Turbo Pascal 7.0, a reference manual, and 8 demo programs.
I build and run Pascal Mouse using DOSBox-X on macOS, with a copy of Borland Turbo Pascal 7.0 downloaded from WinWorld:
- Mount the project directory and the Turbo Pascal installation in DOSBox-X
- Launch
TURBO.EXEand set Options > Directories to point at your units path - Open
SRC\MOUSE.PASand press ALT+F9 to compile the unit - Open any demo from
SRC\DEMOS\and press Ctrl+F9 to run it
The graphics demos need EGAVGA.BGI from your Turbo Pascal installation. Each demo has a BGIPath constant near the top that you can change to match your setup (defaults to C:\TP\BGI).
Compiling in Turbo Pascal on macOS |
The Eyes demo on macOS via DOSBox-X |
SRC/
MOUSE.PAS the mouse interface unit (55 procedures/functions)
DEMOS/
SIMPLE.PAS a minimum mouse program
TEXTMOUS.PAS virtual-to-text coordinate conversion
VIDEOMOD.PAS mouse in different video modes
BARS.PAS draw colored bars with the mouse
CIRCLES1.PAS draw circles with the mouse
CIRCLES2.PAS auto-moving circles with keyboard control
CURSOR.PAS changing the mouse cursor shape
EYES.PAS eyes that follow the mouse
dist/
MOUSE.TPU pre-compiled unit (Turbo Pascal 7.0)
MANUAL.TXT complete reference manual
README.TXT introduction and release history
FILE_ID.DIZ BBS file description
Pascal Mouse is licensed under the MIT License.
Made with ❤️ in Oradea, Romania https://www.thehelloworldwriter.com


