mirror of
https://github.com/hsoft/collapseos.git
synced 2025-02-19 04:16:02 +11:00
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.
|
C, b -- Write byte b in HERE and advance it.
|
||||||
DELW a -- Delete wordref at a. If it shadows another
|
DELW a -- Delete wordref at a. If it shadows another
|
||||||
definition, that definition is unshadowed.
|
definition, that definition is unshadowed.
|
||||||
FORGET x -- Rewind the dictionary (both CURRENT and HERE)
|
EMPTY -- Rewind HERE and CURRENT where they were at
|
||||||
up to x's previous entry. (cont.)
|
system initialization. (cont.)
|
||||||
|
9
blk/038
9
blk/038
@ -1,5 +1,6 @@
|
|||||||
(cont.)
|
(cont.)
|
||||||
PREV a -- a Return a wordref's previous entry.
|
FORGET x -- Rewind the dictionary (both CURRENT and HERE)
|
||||||
WHLEN a -- n Get word header length from
|
up to x's previous entry.
|
||||||
wordref. That is, name length + 3.
|
PREV a -- a Return a wordref's previous entry.
|
||||||
a is a wordref
|
WHLEN a -- n Get word header length from wordref. That is,
|
||||||
|
name length + 3. a is a wordref
|
||||||
|
@ -11,5 +11,6 @@
|
|||||||
['] EFS@ BLK@* !
|
['] EFS@ BLK@* !
|
||||||
RDLN$
|
RDLN$
|
||||||
Z80A$
|
Z80A$
|
||||||
|
LIT< _sys [entry]
|
||||||
INTERPRET
|
INTERPRET
|
||||||
;
|
;
|
||||||
|
Binary file not shown.
@ -144,3 +144,8 @@
|
|||||||
DUP WHLEN - HERE ! ( w )
|
DUP WHLEN - HERE ! ( w )
|
||||||
PREV CURRENT !
|
PREV CURRENT !
|
||||||
;
|
;
|
||||||
|
|
||||||
|
: EMPTY
|
||||||
|
LIT< _sys (find) NOT IF ABORT THEN
|
||||||
|
DUP HERE ! CURRENT !
|
||||||
|
;
|
||||||
|
@ -146,10 +146,9 @@
|
|||||||
AGAIN
|
AGAIN
|
||||||
;
|
;
|
||||||
|
|
||||||
: (entry)
|
: [entry]
|
||||||
HERE @ ( h )
|
HERE @ ( w h )
|
||||||
WORD ( h s )
|
SWAP SCPY ( h )
|
||||||
SCPY ( h )
|
|
||||||
( Adjust HERE -1 because SCPY copies the null )
|
( Adjust HERE -1 because SCPY copies the null )
|
||||||
HERE @ 1 - ( h h' )
|
HERE @ 1 - ( h h' )
|
||||||
DUP HERE ! ( h h' )
|
DUP HERE ! ( h h' )
|
||||||
@ -161,6 +160,8 @@
|
|||||||
HERE @ CURRENT !
|
HERE @ CURRENT !
|
||||||
;
|
;
|
||||||
|
|
||||||
|
: (entry) WORD [entry] ;
|
||||||
|
|
||||||
: INTERPRET
|
: INTERPRET
|
||||||
BEGIN
|
BEGIN
|
||||||
WORD
|
WORD
|
||||||
|
Loading…
Reference in New Issue
Block a user