From a67101fb8bf302eb3f93cd57fe243447e2c7cced Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Tue, 14 Apr 2020 16:07:07 -0400 Subject: [PATCH] Add word "EMPTY" --- blk/037 | 4 ++-- blk/038 | 9 +++++---- emul/forth/run.fs | 1 + emul/forth/z80c.bin | Bin 2172 -> 2190 bytes forth/core.fs | 5 +++++ forth/icore.fs | 9 +++++---- 6 files changed, 18 insertions(+), 10 deletions(-) diff --git a/blk/037 b/blk/037 index 243ad52..7b689ac 100644 --- a/blk/037 +++ b/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.) diff --git a/blk/038 b/blk/038 index 22e0144..3320f91 100644 --- a/blk/038 +++ b/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 diff --git a/emul/forth/run.fs b/emul/forth/run.fs index b5dc796..2e6916e 100644 --- a/emul/forth/run.fs +++ b/emul/forth/run.fs @@ -11,5 +11,6 @@ ['] EFS@ BLK@* ! RDLN$ Z80A$ + LIT< _sys [entry] INTERPRET ; diff --git a/emul/forth/z80c.bin b/emul/forth/z80c.bin index 543f4722974c933756f302fc75aa12830fd16a67..3f44d696afa0acd7230c97cf0ff774d0a8a2f1ec 100644 GIT binary patch delta 124 zcmew(&?mTogryrdNLYdVNF|*@K!cHc4r1pzYy1; zfFRcp!O4E?>ll+J|7G_y^J7#|$4DqH6i~zs19aI1S delta 106 zcmeAZ{3Eb|g