uxn/examples/pixel.usm

28 lines
393 B
Plaintext
Raw Normal View History

2021-02-10 22:05:40 -05:00
( draw a single pixel )
2021-02-09 13:06:55 -05:00
2021-02-10 19:41:16 -05:00
:dev/w fff9 ( keep write port in a const )
;x 2
;y 2
2021-02-09 13:06:55 -05:00
|0100 @RESET
2021-02-09 20:22:52 -05:00
2021-02-10 19:41:16 -05:00
( set dev/write to screen )
2021-02-09 13:06:55 -05:00
2021-02-10 19:41:16 -05:00
,01 ,dev/w STR
,0020 ,x STR^ ( set x-pos )
,0030 ,y STR^ ( set y-pos )
2021-02-09 13:06:55 -05:00
2021-02-10 19:41:16 -05:00
( IOW will now send to screen )
,y LDR^ IOW^ ( y-pos )
,x LDR^ IOW^ ( x-pos )
,02 IOW ( color )
2021-02-09 20:22:52 -05:00
,01 IOW ( redraw )
2021-02-10 19:41:16 -05:00
BRK
2021-02-09 20:22:52 -05:00
2021-02-09 13:06:55 -05:00
|c000 @FRAME BRK
|d000 @ERROR BRK
|FFFA .RESET .FRAME .ERROR