mirror of
https://git.sr.ht/~rabbits/uxn
synced 2024-11-24 14:55:11 +00:00
59 lines
No EOL
775 B
Text
59 lines
No EOL
775 B
Text
( tests/jump )
|
|
|
|
|0100 @RESET
|
|
|
|
,test1 JSR2
|
|
,test2 JSR2
|
|
|
|
BRK
|
|
|
|
@test1
|
|
|
|
( should print 11, 22, 33, 44 )
|
|
|
|
#11 =Console.byte
|
|
#03 JMP BRK BRK BRK
|
|
|
|
( skip foward with id )
|
|
|
|
#22 =Console.byte
|
|
^jump JMP BRK BRK BRK @jump
|
|
|
|
( skip patterns )
|
|
|
|
#33 =Console.byte
|
|
|
|
,skip1 #12 #34 LTH JMP2?
|
|
#ff =Console.byte
|
|
@skip1
|
|
|
|
#12 #34 LTH ^skip2 #04 SUB MUL JMP
|
|
#ff =Console.byte
|
|
@skip2
|
|
|
|
#44 =Console.byte
|
|
|
|
RTN
|
|
|
|
@test2
|
|
|
|
,end JMP2
|
|
|
|
( should print aa, bb, cc, dd )
|
|
|
|
@label1 #aa =Console.byte ^label3 JMP
|
|
@label2 #cc =Console.byte ^label4 JMP
|
|
@label3 #bb =Console.byte ^label2 JMP
|
|
@label4 #dd =Console.byte BRK
|
|
|
|
@end
|
|
|
|
RTN
|
|
|
|
|c000 @FRAME
|
|
|d000 @ERROR
|
|
|
|
|FF00 ;Console { pad 8 char 1 byte 1 short 2 }
|
|
|
|
|FFF0 .RESET .FRAME .ERROR ( vectors )
|
|
|FFF8 [ 13fd 1ef3 1bf2 ] ( palette ) |