Stopped incorrectly recognising hex strings longer than four chars
This commit is contained in:
parent
04e4edf05f
commit
4f12079cf4
|
@ -371,10 +371,13 @@ include projects/library/file-read-chunks.tal
|
||||||
#57 SUB
|
#57 SUB
|
||||||
JMP2r
|
JMP2r
|
||||||
|
|
||||||
@asma-parse-hex-string ( -- value* 06 if valid hex and length > 2
|
@asma-parse-hex-string ( -- value* 06 if valid hex and 2 < length <= 4
|
||||||
OR value* 03 if valid hex and length <= 2
|
OR value* 03 if valid hex and length <= 2
|
||||||
OR 00 otherwise )
|
OR 00 otherwise )
|
||||||
;asma/token LDA2 DUP2 ,strlen JSR #0002 GTH2 ROT ROT
|
;asma/token LDA2 DUP2 ,strlen JSR ( token* length^ )
|
||||||
|
DUP2 #0004 GTH2 ,&fail2 JCN
|
||||||
|
&resume
|
||||||
|
#0002 GTH2 ROT ROT
|
||||||
LIT2r 0000
|
LIT2r 0000
|
||||||
|
|
||||||
&loop
|
&loop
|
||||||
|
@ -393,21 +396,24 @@ include projects/library/file-read-chunks.tal
|
||||||
,&loop JMP
|
,&loop JMP
|
||||||
|
|
||||||
&fail
|
&fail
|
||||||
POP POP2 POP2r
|
POP2r
|
||||||
DUP EOR
|
&fail2
|
||||||
|
POP2 POP2
|
||||||
|
#00
|
||||||
JMP2r
|
JMP2r
|
||||||
|
|
||||||
%asma-SHORT-FLAG { #20 }
|
%asma-SHORT-FLAG { #20 }
|
||||||
%asma-RETURN-FLAG { #40 }
|
%asma-RETURN-FLAG { #40 }
|
||||||
%asma-KEEP-FLAG { #80 }
|
%asma-KEEP-FLAG { #80 }
|
||||||
|
|
||||||
|
include projects/library/string.tal
|
||||||
|
|
||||||
@asma-traverse-tree ( incoming-ptr* -- binary-ptr* 00 if key found
|
@asma-traverse-tree ( incoming-ptr* -- binary-ptr* 00 if key found
|
||||||
OR node-incoming-ptr* 01 if key not found )
|
OR node-incoming-ptr* 01 if key not found )
|
||||||
;asma/token LDA2
|
;asma/token LDA2
|
||||||
( fall through to traverse-tree )
|
( fall through to traverse-tree )
|
||||||
|
|
||||||
include projects/library/binary-tree.tal
|
include projects/library/binary-tree.tal
|
||||||
include projects/library/string.tal
|
|
||||||
|
|
||||||
@asma-parse-opcode ( -- byte 00 if valid opcode
|
@asma-parse-opcode ( -- byte 00 if valid opcode
|
||||||
OR 01 otherwise )
|
OR 01 otherwise )
|
||||||
|
|
Loading…
Reference in New Issue