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

35 lines
689 B
Text

( sprite )
:dev/w fff9 ( const write port )
|0100 @RESET
#01 =dev/w ( set dev/write to screen )
#02 =dev/w ( set dev/write to sprite )
#0110 ,cursor_icn #20 #38 ,drawsprite JSR
#0010 ,rounds_chr #28 #38 ,drawsprite JSR
#3210 ,cursor_icn #20 #40 ,drawsprite JSR
#0010 ,rounds_chr #28 #40 ,drawsprite JSR
BRK
@drawsprite
IOW ( y byte )
IOW ( x byte )
IOW2 ( sprite address )
IOW2 ( redraw byte )
RTS
|0200 @SPRITESHEET
@cursor_icn [ 80c0 e0f0 f8e0 1000 ]
@rounds_chr [ 3844 92aa 9244 3800 0038 7c7c 7c38 0000 ]
BRK
|c000 @FRAME BRK
|d000 @ERROR BRK
|FFF0 [ f2ac 35bb 2b53 ] ( palette )
|FFFA .RESET .FRAME .ERROR