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.
This commit is contained in:
parent
bd1e76ec5b
commit
33d37d4ce9
1
blk/081
1
blk/081
@ -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
|
||||
|
5
blk/405
5
blk/405
@ -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
|
||||
|
4
blk/406
4
blk/406
@ -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
BIN
emul/forth.bin
Binary file not shown.
Loading…
Reference in New Issue
Block a user