M etc/example.tal => etc/example.tal +4 -8
@@ 91,17 91,13 @@ BRK
JMP2r
( bad unkept )
-
DUP2 ADD
DUP2k EOR2
-STH2 ADDr
-
-#34 #12 ADD
-#1234 ;help ADD2
-
-DEI2 STH2
-SWP2 ADD2
+( slow literals )
+LIT ". DUP
+#02 DUP
+.test DUP
~etc/include.tal
M src/uxnlin.tal => src/uxnlin.tal +18 -0
@@ 359,6 359,10 @@ JMP2r
;noswp2-lut OVR2 afnd #ffff EQU2 ?&no-noswp2
POP2 POP2 #01 JMP2r
&no-noswp2
+ OVR2 ;&ari1-1x scmp #00 EQU ?&no-ari1-1x
+ ;ari1-1x-lut OVR2 afnd #ffff EQU2 ?&no-ari1-1x
+ POP2 POP2 #01 JMP2r
+ &no-ari1-1x
OVR2 ;&ari1-2x scmp #00 EQU ?&no-ari1-2x
;ari1-2x-lut OVR2 afnd #ffff EQU2 ?&no-ari1-2x
POP2 POP2 #01 JMP2r
@@ 376,6 380,12 @@ JMP2r
DUP2 is-litshort #00 EQU ?&no-static2
POP2 POP2 #01 JMP2r
&no-static2
+ OVR2 ;&char scmp #00 EQU ?&no-char
+ LDAk LIT "" NEQ ?&no-char
+ DUP2 slen #0002 NEQ2 ?&no-char
+ POP2 POP2 #01 JMP2r
+ &no-char
+
SWP2
( literals )
LDA2k [ LIT2 "#_ ] NEQ2 ?&no-lit
@@ 410,6 420,8 @@ JMP2r
JMP2r
&pass POP2 POP2 #01 JMP2r
+ &char "<char> $1
+ &ari1-1x "<ari1-1x> $1
&ari1-2x "<ari1-2x> $1
&ari2-2x "<ari2-2x> $1
&static1 "<static1> $1
@@ 508,6 520,9 @@ JMP2r
"ADD2 $1 "MUL2 $1 "EQU2 $1 "NEQ2 $1
"ORA2 $1 "AND2 $1 "EOR2 $1 ] $1
+@ari1-1x-lut [ ( consume 1 bytes )
+ "INC $1 "DUP $1 "POP $1 ] $1
+
@ari1-2x-lut [ ( consume 2 bytes )
"ADD $1 "SUB $1 "MUL $1 "DIV $1
"GTH $1 "LTH $1 "EQU $1 "NEQ $1
@@ 784,7 799,9 @@ JMP2r
"<any-12> $1 "STH2 $1 =latestack
"SWP $1 "<noswp> $1 =redundance
"SWP2 $1 "<noswp2> $1 =redundance
+ ( static )
"<static2> $1 "<ari1-2x> $1 =static
+ "<static1> $1 "<ari1-1x> $1 =static
&end
@rules3
@@ 824,6 841,7 @@ JMP2r
"OVR2 $1 "OVR2 $1 "<any2-2x> $1 =keep
"<static1> $1 "<static1> $1 "<ari1-2x> $1 =static
"<static2> $1 "<static2> $1 "<ari2-2x> $1 =static
+ "LIT $1 "<char> $1 "DUP $1 =static
"DUP $1 "<static1> $1 "SWP $1 =00ovr
"DUP2 $1 "<static2> $1 "SWP2 $1 =0000ovr2
&end