Add word "EMPTY"
This commit is contained in:
parent
add3b6629b
commit
a67101fb8b
4
blk/037
4
blk/037
@ -12,5 +12,5 @@ ALLOT n -- Move HERE by n bytes
|
||||
C, b -- Write byte b in HERE and advance it.
|
||||
DELW a -- Delete wordref at a. If it shadows another
|
||||
definition, that definition is unshadowed.
|
||||
FORGET x -- Rewind the dictionary (both CURRENT and HERE)
|
||||
up to x's previous entry. (cont.)
|
||||
EMPTY -- Rewind HERE and CURRENT where they were at
|
||||
system initialization. (cont.)
|
||||
|
9
blk/038
9
blk/038
@ -1,5 +1,6 @@
|
||||
(cont.)
|
||||
PREV a -- a Return a wordref's previous entry.
|
||||
WHLEN a -- n Get word header length from
|
||||
wordref. That is, name length + 3.
|
||||
a is a wordref
|
||||
FORGET x -- Rewind the dictionary (both CURRENT and HERE)
|
||||
up to x's previous entry.
|
||||
PREV a -- a Return a wordref's previous entry.
|
||||
WHLEN a -- n Get word header length from wordref. That is,
|
||||
name length + 3. a is a wordref
|
||||
|
@ -11,5 +11,6 @@
|
||||
['] EFS@ BLK@* !
|
||||
RDLN$
|
||||
Z80A$
|
||||
LIT< _sys [entry]
|
||||
INTERPRET
|
||||
;
|
||||
|
Binary file not shown.
@ -144,3 +144,8 @@
|
||||
DUP WHLEN - HERE ! ( w )
|
||||
PREV CURRENT !
|
||||
;
|
||||
|
||||
: EMPTY
|
||||
LIT< _sys (find) NOT IF ABORT THEN
|
||||
DUP HERE ! CURRENT !
|
||||
;
|
||||
|
@ -146,10 +146,9 @@
|
||||
AGAIN
|
||||
;
|
||||
|
||||
: (entry)
|
||||
HERE @ ( h )
|
||||
WORD ( h s )
|
||||
SCPY ( h )
|
||||
: [entry]
|
||||
HERE @ ( w h )
|
||||
SWAP SCPY ( h )
|
||||
( Adjust HERE -1 because SCPY copies the null )
|
||||
HERE @ 1 - ( h h' )
|
||||
DUP HERE ! ( h h' )
|
||||
@ -161,6 +160,8 @@
|
||||
HERE @ CURRENT !
|
||||
;
|
||||
|
||||
: (entry) WORD [entry] ;
|
||||
|
||||
: INTERPRET
|
||||
BEGIN
|
||||
WORD
|
||||
|
Loading…
Reference in New Issue
Block a user