TIP: Click on subject to list as thread! ANSI
echo: cis.os9.6809.coco
to: Brother Jeremy, CSJW 76477,142
from: Kevin Darling 76703,4227
date: 1991-09-08 03:27:13
subject: #12120-Mouse_Hlp

#: 12123 S10/OS9/6809 (CoCo)
    08-Sep-91  03:27:13
Sb: #12120-Mouse_Hlp
Fm: Kevin Darling 76703,4227
To: Brother Jeremy, CSJW 76477,142

Br Jeremy - you/we forgot to set the reg.B to the statcall!

PROCEDURE SS_Mouse
(* message 12120
TYPE stack=CC,A,B,DP:BYTE; X,Y,U:INTEGER
DIM reg:stack
BASE 0
DIM I_GetStt,SS_Mouse,mouse(32):BYTE
I_GetStt=$8D
SS_Mouse=$89
LOOP
reg.A=0
reg.B=SS_Mouse \ (* <======== aha!
reg.Y=0
reg.X=ADDR(mouse)
RUN Syscall(I_GetStt,reg)
PRINT "Mouse X = "; mouse(28)*256+mouse(29); " ";
PRINT "Mouse Y = "; mouse(30)*256+mouse(31)
EXITIF mouse(8)0 THEN
PRINT "Left button Hit"
ENDEXIT
ENDLOOP

Also, this assumes autoselect of mouse; that is, that you've run one of
those gshell or setmouse or etc utils or patches first so that the system
knows that your hires mouse is in the right (or left) port.  - kev

SOURCE: compuserve via textfiles.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.