Contents

Mouse Support in PCSCHEME


Microsoft(TM) specified a standard interface to drive the mouse from within applications. Practically all mouse vendors adhered to this interface, so it made sense to access the mouse though it from within PCSCHEME. Unfortunately, the standard was designed for interfacing to assembly language and thus contains some peculiarities, like event handlers, that have carefully to be dealt with.

The solution proposed is a slight extension of PCSCHEME's core—the virtual machine. An op-code has been added to support the int 33h calls, as well as an assembly-language event handler that dispatches requests to a Scheme closure. The solution is not perfect in the sense event handling cannot be honored in the middle of a basic instruction (for instance, during a call to readline). The slowdown due to Scheme handling of even the most simple events (like recording a move), and the context switching required, may render event handling unpractical on slow processors; the system has nevertheless successfully been used on a fast 80486 PC.

This part has been written by Larry Bartholdi.
The interfacing
A simple example

BGI: The Graphics Package
Written by Marc Vuilleumier
Last change October 5, 1993. First draft November 27, 1992
User's manual
What is BGI?
What is different in PCSCHEME's implementation of BGI?
Coordinate systems
And further...
The PS and SPY drivers
How to use SPY
How to use PS
PCSCHEME BGI primitives reference
The Graphics Control System
Drawing
Filling
Bitmapping
Writing text
Using Color
Miscellaneous queries

Index