0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-08 15:25:05 +00:00
uxn/examples/test.usm

55 lines
1,002 B
Text
Raw Normal View History

2021-02-13 21:21:05 +00:00
( comment )
2021-02-01 19:58:47 +00:00
2021-02-14 19:51:36 +00:00
:dev/r fff8 ( const read port )
:dev/w fff9 ( const write port )
2021-02-13 00:18:52 +00:00
2021-02-14 19:51:36 +00:00
;x 2 ;y 2
2021-02-09 05:59:46 +00:00
|0100 @RESET
2021-02-09 18:06:55 +00:00
2021-02-14 19:51:36 +00:00
#05 ,dev/r STR ( set dev/read to ctrl )
#04 ,dev/w STR ( set dev/write to ppu-sprite )
#0080 ,x STR2
#0040 ,y STR2
#01 ,cursor_icn ,x LDR2 ,y LDR2 ,putsprite JSR
2021-02-14 18:22:42 +00:00
2021-02-14 19:51:36 +00:00
BRK
|0200 @SPRITESHEET
2021-02-14 18:22:42 +00:00
2021-02-14 19:51:36 +00:00
@cursor_icn .80c0 .e0f0 .f8e0 .1000 .0000 .0000 .0000 .0000
@star_icn .1054 .28c6 .2854 .1000 .0000 .0000 .0000 .0000
2021-02-14 18:22:42 +00:00
2021-02-14 19:51:36 +00:00
BRK
2021-02-14 18:22:42 +00:00
2021-02-14 19:51:36 +00:00
|c000 @FRAME
#00 IOR #10 NEQ ,next0 ROT JMP? POP2
,y LDR2 #0001 SUB2 ,y STR2
@next0
#00 IOR #20 NEQ ,next1 ROT JMP? POP2
,y LDR2 #0001 ADD2 ,y STR2
@next1
#00 IOR #40 NEQ ,next2 ROT JMP? POP2
,x LDR2 #0001 SUB2 ,x STR2
@next2
#00 IOR #80 NEQ ,next3 ROT JMP? POP2
,x LDR2 #0001 ADD2 ,x STR2
@next3
( redraw )
#01 ,cursor_icn ,x LDR2 ,y LDR2 ,putsprite JSR
2021-02-12 18:26:58 +00:00
2021-02-09 05:59:46 +00:00
BRK
2021-02-05 02:25:49 +00:00
2021-02-14 18:22:42 +00:00
@putsprite
IOW2 ( y short )
IOW2 ( x short )
IOW2 ( sprite address )
IOW ( redraw byte )
RTS
2021-02-05 19:57:37 +00:00
|d000 @ERROR BRK
2021-02-05 19:57:37 +00:00
|FFFA .RESET .FRAME .ERROR