commit cb30ac7c1142a205e50fdd68c14138b3d56b5d9f
parent d7059eccd40325d80b6dfba200fb97e657c931a1
Author: Andrew Alderwick <andrew@alderwick.co.uk>
Date: Mon, 22 Nov 2021 07:05:07 +0000
Remove flag constants in asma.
Diffstat:
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/projects/library/asma.tal b/projects/library/asma.tal
@@ -188,6 +188,9 @@
)
@asma-init-first-pass ( -- )
+ LIT2 POP2 POP EOR ;asma-parse-opcode/short-flag STA
+ LIT2 POPr POP EOR ;asma-parse-opcode/return-flag STA
+ LIT2 POPk POP EOR ;asma-parse-opcode/keep-flag STA
#ff ;asma/pass STA
#0000 DUP2k
;asma/error STA2
@@ -401,10 +404,6 @@
#00
JMP2r
-%asma-SHORT-FLAG { #20 }
-%asma-RETURN-FLAG { #40 }
-%asma-KEEP-FLAG { #80 }
-
~projects/library/string.tal
@asma-traverse-tree ( incoming-ptr* -- binary-ptr* 00 if key found
@@ -441,15 +440,15 @@
¬-end
DUP LIT '2 NEQ ,¬-two JCN
- POP asma-SHORT-FLAG ORA ,&loop JMP
+ POP LIT &short-flag $1 ORA ,&loop JMP
¬-two
DUP LIT 'r NEQ ,¬-return JCN
- POP asma-RETURN-FLAG ORA ,&loop JMP
+ POP LIT &return-flag $1 ORA ,&loop JMP
¬-return
LIT 'k NEQ ,¬-keep JCN
- &set-keep asma-KEEP-FLAG ORA ,&loop JMP
+ &set-keep LIT &keep-flag $1 ORA ,&loop JMP
¬-keep ( 00 byte / end* )
¬-found ( incoming-ptr* / end* )