uxn/projects/tests/jump.usm

59 lines
775 B
Plaintext
Raw Normal View History

2021-03-11 15:19:59 -05:00
( tests/jump )
2021-03-14 16:30:17 -04:00
|0100 @RESET
2021-03-14 13:40:13 -04:00
,test1 JSR2
2021-03-14 17:26:17 -04:00
,test2 JSR2
2021-03-14 13:40:13 -04:00
BRK
@test1
( should print 11, 22, 33, 44 )
2021-03-11 15:19:59 -05:00
2021-03-14 13:40:13 -04:00
#11 =Console.byte
2021-03-15 21:08:41 -04:00
#03 JMP BRK BRK BRK
2021-03-11 15:19:59 -05:00
( skip foward with id )
2021-03-14 13:40:13 -04:00
#22 =Console.byte
2021-03-15 21:08:41 -04:00
^jump JMP BRK BRK BRK @jump
2021-03-11 15:19:59 -05:00
( skip patterns )
2021-03-14 13:40:13 -04:00
#33 =Console.byte
2021-03-11 15:19:59 -05:00
2021-03-15 18:27:43 -04:00
,skip1 #12 #34 LTH JMP2?
2021-03-14 13:40:13 -04:00
#ff =Console.byte
2021-03-11 15:19:59 -05:00
@skip1
2021-03-15 21:08:41 -04:00
#12 #34 LTH ^skip2 #04 SUB MUL JMP
2021-03-14 13:40:13 -04:00
#ff =Console.byte
2021-03-11 15:19:59 -05:00
@skip2
2021-03-14 13:40:13 -04:00
#44 =Console.byte
2021-03-14 17:26:17 -04:00
RTN
2021-03-14 13:40:13 -04:00
@test2
2021-03-11 15:19:59 -05:00
,end JMP2
( should print aa, bb, cc, dd )
2021-03-15 21:08:41 -04:00
@label1 #aa =Console.byte ^label3 JMP
@label2 #cc =Console.byte ^label4 JMP
@label3 #bb =Console.byte ^label2 JMP
2021-03-14 13:40:13 -04:00
@label4 #dd =Console.byte BRK
2021-03-11 15:19:59 -05:00
@end
2021-03-14 17:26:17 -04:00
RTN
2021-03-11 15:19:59 -05:00
|c000 @FRAME
|d000 @ERROR
2021-03-14 13:40:13 -04:00
|FF00 ;Console { pad 8 char 1 byte 1 short 2 }
2021-03-11 15:19:59 -05:00
|FFF0 .RESET .FRAME .ERROR ( vectors )
|FFF8 [ 13fd 1ef3 1bf2 ] ( palette )