mirror of
https://git.sr.ht/~rabbits/uxn
synced 2024-11-08 23:35:05 +00:00
62 lines
No EOL
829 B
Text
62 lines
No EOL
829 B
Text
( tests/jump )
|
|
|
|
%RTS { RSW2 JMP }
|
|
%JSR2 { PRG WSR2 JMP2 }
|
|
%JMC { JMP2? POP2 }
|
|
|
|
|0100 @RESET
|
|
|
|
,test1 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 JMC
|
|
#ff =Console.byte
|
|
@skip1
|
|
|
|
#12 #34 LTH ^skip2 #04 SUB MUL JMPS
|
|
#ff =Console.byte
|
|
@skip2
|
|
|
|
#44 =Console.byte
|
|
|
|
RTS
|
|
|
|
@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
|
|
|
|
RTS
|
|
|
|
|c000 @FRAME
|
|
|d000 @ERROR
|
|
|
|
|FF00 ;Console { pad 8 char 1 byte 1 short 2 }
|
|
|
|
|FFF0 .RESET .FRAME .ERROR ( vectors )
|
|
|FFF8 [ 13fd 1ef3 1bf2 ] ( palette ) |