0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-08 23:35:05 +00:00
uxn/projects/tests/jump.usm
2021-03-14 14:26:17 -07:00

59 lines
No EOL
786 B
Text

( tests/jump )
|0100 @RESET
,test1 JSR2
,test2 JSR2
BRK
@test1
( should print 11, 22, 33, 44 )
#11 =Console.byte
#03 JMPS BRK BRK BRK
( skip foward with id )
#22 =Console.byte
^jump JMPS BRK BRK BRK @jump
( skip patterns )
#33 =Console.byte
,skip1 #12 #34 LTH JMP2? POP2
#ff =Console.byte
@skip1
#12 #34 LTH ^skip2 #04 SUB MUL JMPS
#ff =Console.byte
@skip2
#44 =Console.byte
RTN
@test2
,end JMP2
( should print aa, bb, cc, dd )
@label1 #aa =Console.byte ^label3 JMPS
@label2 #cc =Console.byte ^label4 JMPS
@label3 #bb =Console.byte ^label2 JMPS
@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 )