0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-08 15:25:05 +00:00
uxn/examples/pixel.usm
2021-02-10 19:05:40 -08:00

27 lines
393 B
Text

( draw a single pixel )
:dev/w fff9 ( keep write port in a const )
;x 2
;y 2
|0100 @RESET
( set dev/write to screen )
,01 ,dev/w STR
,0020 ,x STR^ ( set x-pos )
,0030 ,y STR^ ( set y-pos )
( IOW will now send to screen )
,y LDR^ IOW^ ( y-pos )
,x LDR^ IOW^ ( x-pos )
,02 IOW ( color )
,01 IOW ( redraw )
BRK
|c000 @FRAME BRK
|d000 @ERROR BRK
|FFFA .RESET .FRAME .ERROR