I have not yet worked with the mouse on the x16, but perhaps there is something similar going on? If not, all I can say is compare the resulting assembly code from prog8 to your own code and try to discover where the difference occurs. The easiest way to do this is by making a minimal reproduction program
The mouse in X16 is janky. It only returns screen X Y positions and buttons. (i.e. no dX dY options) and it coopts sprite 0 even if you don't want to have a pointer on the screen. You can specify a blank sprite as sprite0 as the graphic for the pointer, but sprite 0 will be positioned at the X,Y the Kernal wants it to be. Whenever I get zsound to the point where I push it out the door, I might get back on my widget library I was working on, where I planned to counter this by making the engine hide the kernal pointer and move it back to the middle of the screen on each frame so you won't ever run into the edge of the screen and not be able to continue moving the mouse in that direction.
Multiple parameters was supported and "safe" so that
(x, y) -> (y, x)
did a "swap".
This syntax is a lot easier read for long functions chains but I have to admit that I never got 100% comfortable with this syntax style. I guess the traditional Algol syntax was already firmly embedded in my skull by the time I encountered BETA.
@borgarthe pipe was or is a bit experimental. It’s inspired by the pipe operator in f#. The implementation can perhaps be used later to serialize nested expressions, thereby avoiding the slow stack based approach. But it lacks some features to do this now
added atari compilation target, to create programs for the Atari 800XL. It's very rudimentary still.
breaking syntax change of the pipe operator |> : the functions in a pipe now have to be actual function calls (without the first argument specified), rather than just the function names
breaking change of the pipe operator |>: you can no longer use a variable at the end to store the value into. Just use an assignment instead.
sys.memcopy and sys.memset on the cx16 target no longer depend on kernal routine so now work even when the kernal is not banked in.
fix program crash bug caused by non-inlined asmsub not having a proper RTS instruction.
fixed compile time calculated constant results of sin() and cos() functions to now be identical to their runtime counterpart
better searching for used variable names inside assembly code so unused variable elimination is smarter
properly report duplicate label names
properly report invalid text encoding selection
properly report in check against non-constant range
many internal refactorings in the code generator as ongoing attempts to make it easier to change/replace