mirror of
https://git.sr.ht/~rabbits/uxn
synced 2024-11-09 15:55:05 +00:00
41 lines
561 B
Text
41 lines
561 B
Text
( mouse )
|
|
|
|
:dev/r fff8 ( std read port )
|
|
:dev/w fff9 ( std write port )
|
|
|
|
|0100 @RESET
|
|
|
|
#05 =dev/r ( set dev/read mouse#02 )
|
|
#01 =dev/w ( set dev/write screen#01 )
|
|
|
|
BRK
|
|
|
|
|c000 @FRAME
|
|
|
|
( get mouse button, or break )
|
|
#04 IOR
|
|
#01 NEQ
|
|
BRK?
|
|
|
|
( paint a white pixel )
|
|
#01 #01
|
|
,getmouse JSR
|
|
,putpixel JSR
|
|
|
|
BRK
|
|
|
|
@getmouse
|
|
#00 IOR2 ( get mouse x )
|
|
#02 IOR2 ( get mouse y )
|
|
RTS
|
|
|
|
@putpixel
|
|
IOW2 ( y short )
|
|
IOW2 ( x short )
|
|
IOW ( color byte )
|
|
IOW ( redraw byte )
|
|
RTS
|
|
|
|
|d000 @ERROR BRK
|
|
|FFF0 [ f2ac 35bb 2b53 ] ( palette )
|
|
|FFFA .RESET .FRAME .ERROR
|