Browse Source

WORD: don't overwrite RAM on words over 31 chars

This allows me to reclaim some RAM I hadn't even noticed I
needlessly monopolise.
pull/102/head
Virgil Dupras 4 years ago
parent
commit
33d37d4ce9
4 changed files with 4 additions and 6 deletions
  1. +1
    -0
      blk/081
  2. +1
    -4
      blk/405
  3. +2
    -2
      blk/406
  4. BIN
      emul/forth.bin

+ 1
- 0
blk/081 View File

@@ -7,6 +7,7 @@ RAMSTART FUTURE USES +55 (key) override
+0c C<* +70 DRIVERS
+0e WORDBUF +80 RAMEND
+2e BOOT C< PTR
+30 FUTURE USES
+4e INTJUMP
+51 CURRENTPTR
+53 (emit) override


+ 1
- 4
blk/405 View File

@@ -1,7 +1,4 @@
( The NOT is to normalize the negative/positive numbers to 1
or 0. Hadn't we wanted to normalize, we'd have written:
32 CMP 1 - )
: WS? 33 CMP 1+ NOT ;
: WS? 33 < ;

: TOWORD
BEGIN


+ 2
- 2
blk/406 View File

@@ -1,5 +1,5 @@
( Read word from C<, copy to WORDBUF, null-terminate, and
return, make HL point to WORDBUF. )
return WORDBUF. )
: WORD
0x0e RAM+ ( 0e == WORDBUF )
TOWORD ( a c )
@@ -8,7 +8,7 @@
always zero to pre-write our null-termination )
OVER ! 1+ ( a+1 )
C< ( a c )
DUP WS?
OVER 0x2d ( 2e-1 for NULL ) RAM+ = OVER WS? OR
UNTIL
( a this point, PS is: a WS )
( null-termination is already written )


BIN
emul/forth.bin View File


Loading…
Cancel
Save