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-11 15:19:59 -05:00
|
|
|
#03 JMPS BRK BRK BRK
|
|
|
|
|
|
|
|
( skip foward with id )
|
|
|
|
|
2021-03-14 13:40:13 -04:00
|
|
|
#22 =Console.byte
|
2021-03-11 15:19:59 -05:00
|
|
|
^jump JMPS BRK BRK BRK @jump
|
|
|
|
|
|
|
|
( 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
|
|
|
|
|
|
|
|
#12 #34 LTH ^skip2 #04 SUB MUL JMPS
|
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-14 13:40:13 -04:00
|
|
|
@label1 #aa =Console.byte ^label3 JMPS
|
|
|
|
@label2 #cc =Console.byte ^label4 JMPS
|
|
|
|
@label3 #bb =Console.byte ^label2 JMPS
|
|
|
|
@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 )
|