From 9164599cedc7956951cf7728f58c503e9cbb1a24 Mon Sep 17 00:00:00 2001 From: d_m Date: Sun, 19 Jan 2025 18:28:26 -0500 Subject: [PATCH] more tests --- hello.tal | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/hello.tal b/hello.tal index 149c00e..68c4581 100644 --- a/hello.tal +++ b/hello.tal @@ -1,4 +1,7 @@ -|100 +|0000 + @x $1 @y $1 @z $1 + +|0100 ;on-input #10 DEO2 #0123 INC2 #45 INC POP2 POP LIT "h #18 DEO @@ -7,9 +10,58 @@ LIT "l #18 DEO LIT "o #18 DEO #0a18 DEO + + ;skip1 JMP2 LIT "n #18 DEO LIT "o #18 DEO LIT "t #18 DEO #2018 DEO + @skip1 LIT "o #18 DEO LIT "k #18 DEO LIT "1 #18 DEO #0a18 DEO + + ,skip2 JMP LIT "n #18 DEO LIT "o #18 DEO LIT "t #18 DEO #2018 DEO + @skip2 LIT "o #18 DEO LIT "k #18 DEO LIT "2 #18 DEO #0a18 DEO + + #01 ;skip3 JCN2 LIT "n #18 DEO LIT "o #18 DEO LIT "t #18 DEO #2018 DEO + @skip3 LIT "o #18 DEO LIT "k #18 DEO LIT "3 #18 DEO #0a18 DEO + + #01 ,skip4 JCN LIT "n #18 DEO LIT "o #18 DEO LIT "t #18 DEO #2018 DEO + @skip4 LIT "o #18 DEO LIT "k #18 DEO LIT "4 #18 DEO #0a18 DEO + + #01 ?{ LIT "n #18 DEO LIT "o #18 DEO LIT "t #18 DEO #2018 DEO } + LIT "o #18 DEO LIT "k #18 DEO LIT "5 #18 DEO #0a18 DEO + + ;print-ok JSR2 LIT "6 #18 DEO #0a18 DEO + + print-ok LIT "7 #18 DEO #0a18 DEO + + LIT "o .x STZ LIT "k .y STZ LIT "8 .z STZ + .x LDZ #18 DEO .y LDZ #18 DEO .z LDZ #18 DEO #0a18 DEO + + #0a DUP INC MUL INC #18 DEO LIT "k #18 DEO LIT "9 #18 DEO #0a18 DEO + + !skip10 LIT "n #18 DEO LIT "o #18 DEO LIT "t #18 DEO #2018 DEO + @skip10 LIT "o #18 DEO LIT "k #18 DEO LIT "1 #18 DEO LIT "0 #18 DEO #0a18 DEO + + LIT "k LIT "o DUP2 NIP2 #18 DEO #18 DEO LIT "1 #18 DEOk DEO #0a18 DEO + + !&skip12 LIT "n #18 DEO LIT "o #18 DEO LIT "t #18 DEO #2018 DEO + &skip12 LIT "o #18 DEO LIT "k #18 DEO LIT "1 #18 DEO LIT "2 #18 DEO #0a18 DEO + + LIT "o .x STZ LIT "k .y STZ + .x LDZk #18 DEO INC LDZ #18 DEO LIT "1 #18 DEO LIT "3 #18 DEO #0a18 DEO + + LIT "o .x STZ LIT "k .y STZ + ;x LDAk #18 DEO INC2 LDA #18 DEO LIT "1 #18 DEO LIT "4 #18 DEO #0a18 DEO + ( ;x LDA #18 DEO ;y LDA #18 DEO LIT "1 #18 DEO LIT "4 #18 DEO #0a18 DEO ) + + ;string/c1 LDA #18 DEO ;string/c2 LDA #18 DEO LIT "1 #18 DEO LIT "9 #18 DEO #0a18 DEO + + ,string/c1 LDR #18 DEO ,string/c2 LDR #18 DEO LIT "2 #18 DEO LIT "0 #18 DEO #0a18 DEO + ( #830f DEO ) BRK +@string "abc &c1 "o &c2 "k "xyz + +@print-ok + LIT "o #18 DEO LIT "k #18 DEO JMP2r + @on-input #010e DEO #17 DEI LIT "0 ADD #18 DEO