parse: don't validate 0x and 0b lengths
It doesn't serve much purpose and takes up many precious bytes. And, after all, parsed didn't do it either...
This commit is contained in:
parent
372524fd19
commit
7a0e63746f
2
blk/058
2
blk/058
@ -7,7 +7,7 @@ LIT< x -- Read following word and write to HERE as a
|
||||
LITS a -- Write word at addr a as a atring literal.
|
||||
S= a1 a2 -- f Returns whether string a1 == a2.
|
||||
SCPY a -- Copy string at addr a into HERE.
|
||||
SLEN a -- n Push length of str at a.
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@ BOOTSRCS = ./forth/conf.fs \
|
||||
../forth/icore.fs \
|
||||
./forth/xstop.fs
|
||||
|
||||
FORTHSRCS = core.fs cmp.fs print.fs str.fs parse.fs readln.fs fmt.fs blk.fs
|
||||
FORTHSRCS = core.fs cmp.fs print.fs parse.fs readln.fs fmt.fs blk.fs
|
||||
FORTHSRC_PATHS = ${FORTHSRCS:%=../forth/%} forth/run.fs
|
||||
OBJS = emul.o libz80/libz80.o
|
||||
SLATEST = ../tools/slatest
|
||||
|
@ -29,10 +29,6 @@
|
||||
DUP @ 30768 = NOT IF 0 EXIT THEN ( a 0 )
|
||||
( We have "0x" prefix )
|
||||
2+
|
||||
( validate slen )
|
||||
DUP SLEN ( a l )
|
||||
DUP NOT IF DROP 0 EXIT THEN ( a 0 )
|
||||
4 > IF DROP 0 EXIT THEN ( a 0 )
|
||||
0 ( a r )
|
||||
BEGIN
|
||||
SWAP C@+ ( r a+1 c )
|
||||
@ -58,10 +54,6 @@
|
||||
DUP @ 25136 = NOT IF 0 EXIT THEN ( a 0 )
|
||||
( We have "0b" prefix )
|
||||
2+
|
||||
( validate slen )
|
||||
DUP SLEN ( a l )
|
||||
DUP 0 = IF DROP 0 EXIT THEN ( a 0 )
|
||||
16 > IF DROP 0 EXIT THEN ( a 0 )
|
||||
0 ( a r )
|
||||
BEGIN
|
||||
SWAP C@+ ( r a+1 c )
|
||||
|
@ -1,5 +0,0 @@
|
||||
: SLEN ( a -- n )
|
||||
DUP ( astart aend )
|
||||
BEGIN C@+ NOT UNTIL
|
||||
1- -^
|
||||
;
|
@ -15,7 +15,6 @@ BOOTSRCS = conf.fs \
|
||||
PATHS = \
|
||||
$(FDIR)/core.fs \
|
||||
$(FDIR)/cmp.fs \
|
||||
$(FDIR)/str.fs \
|
||||
$(FDIR)/parse.fs \
|
||||
$(BASEDIR)/drv/acia.fs \
|
||||
$(FDIR)/print.fs \
|
||||
|
Loading…
Reference in New Issue
Block a user