Browse Source

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...
pull/102/head
Virgil Dupras 4 years ago
parent
commit
7a0e63746f
5 changed files with 2 additions and 16 deletions
  1. +1
    -1
      blk/058
  2. +1
    -1
      emul/Makefile
  3. +0
    -8
      forth/parse.fs
  4. +0
    -5
      forth/str.fs
  5. +0
    -1
      recipes/rc2014/Makefile

+ 1
- 1
blk/058 View File

@@ -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.





+ 1
- 1
emul/Makefile View File

@@ -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


+ 0
- 8
forth/parse.fs View File

@@ -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 )


+ 0
- 5
forth/str.fs View File

@@ -1,5 +0,0 @@
: SLEN ( a -- n )
DUP ( astart aend )
BEGIN C@+ NOT UNTIL
1- -^
;

+ 0
- 1
recipes/rc2014/Makefile View File

@@ -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…
Cancel
Save