Date : Wed, 29 Mar 2000 00:41:48 +0100
From : jgh@... (Jonathan Graham Harston)
Subject: BBC Computers and mice
"Carey Williams" <Carey@...> wrote:
> I have some mice which connect through the user port underneath the
> machine. Has anyone a program that can run these or could write a program
> that would for example enable the mouse to be used in the word processor
> in place of the arrow keys. Most children are now used to using mouse and
> this would make the old Beebs more accessible for them.
I have a *MOUSE command that works on all BBC/Master computers and
provided Osword 64, Osbyte 128 and Osbyte 129 read routines. I have put
it on my website, along with a test program that shows how to read the
mouse state. They are at http://mdfs.net/Software/CommandSrc/Mouse/
There are two defined interfaces to read the mouse state, AMX and Arc:
Osword 64:
Returns: XY+0,1 Mouse X
2,3 Mouse Y
4 Text X
5 Text Y
6 Button state: RML-----
ADVAL(7) (Osbyte 128,7) - Read mouse X position
ADVAL(8) (Osbyte 128,8) - Read mouse Y position
INKEY-109 (Osbyte 129,&FF93) - Read RIGHT button
INKEY-13 (Osbyte 129,&FFF3) - Read RIGHT button
INKEY-108 (Osbyte 129,&FF94) - Read MIDDLE button
INKEY-12 (Osbyte 129,&FFF4) - Read MIDDLE button
INKEY-107 (Osbyte 129,&FF95) - Read LEFT button
INKEY-11 (Osbyte 129,&FFF5) - Read LEFT button
--
J.G.Harston (JGH BBC PD Library) 70 Camm Street, Walkley, SHEFFIELD S6 3TR
jgh@... - Running on BBCs & Masters with SJ MDFS FileServer
Z80+6502/CoPro+Tubes/Econet+SJ -- http://mdfs.net
A TRUE Klingon Warrior does not comment his code!