uxn/projects/tests/jump.usm

59 lines
786 B
Plaintext

( 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 )