Mouse #3: Mode Byte of the SetMouse Routine

Apple II Technical Notes Developer Technical Support

Revised by: Matt Deatherage November 1988
Revised by: Rilla Reynolds November 1985

This Technical Note explains the results of turning the mouse on and off through the mode byte of the SetMouse routine.


What Turning the Mouse Off Does

In the description of SetMouse and the mouse mode, the low-order bit of the mouse mode is said to control mouse off and mouse on. This terminology is somewhat misleading. When this bit is set to 0, the mouse is off only in the following respects:


1. The mouse position is not tracked; any mouse motion is ignored.
2. ReadMouse calls do not update the status byte or the screen holes, except on the IIGS, where ReadMouse always functions the same, regardless of mouse on or mouse off.
3. Button and movement interrupts are not generated, regardless of the other mouse mode bits. Pure VBL interrupts can still be generated, however, if bit 3 is set.

What Turning the Mouse Off Does Not Do

Other mouse functions will continue to work as usual when the mouse is off. PosMouse and ClearMouse will change the mouse position, ClampMouse will set new clamp values, etc. In particular:


1. Turning the mouse off and on with the mode byte does not reset any mouse values, including position. The mouse position retains the last values it had before the mouse was turned off until it is turned on again.
2. A mode byte of $08 (mouse off but VBL interrupt on) will generate VBL interrupts.

Further Reference