Now that the SID storm has almost subsided, maybe Geco or Istvan-v have time to study how to make work my Click-event approach on the Mouse Driver.
What I want to do is to move the Editor cursor to the mouse pointer position when a click is done.
I already have created a mouse pointer on text video pages. Once installed the driver, the mouse pointer can be called, for example, from the Basic editor with ":MOUSE ON". Also ":MOUSE OFF" closes the mouse channel.
Hacking a little the interrupt area I have managed to do an EXOS call within the interrupt. Then, every time a click is done on an Editor page, a four bytes string like this is written to the Editor channel: 01Bh&"="&020h+Y&020h+X. Being Y and X the character boundaries of the mouse pointer.
This effectively moves the cursor to a place near the pointer, but corrupts the Editor data.
The "Click-event" is called like this:
in a, (0B1h)
in a, (0B3h)
out (0B1h), a
ld a,0f3h ; This hack is to prevent the blocking of the EXOS call inside the interrupt
ld de,SET_CURSOR; This contains something like this "db 27,61,33,33 ; escape sequence set cursor"
ld (0056h),a; the value is restored
Edit: snapshot corrected