#: 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
|