new "vlist" inspired by F79Forth

This commit is contained in:
Carsten Strotmann 2021-04-21 20:35:29 +02:00
parent 52740e8949
commit 30577e05d4
2 changed files with 18 additions and 1 deletions

View File

@ -1 +0,0 @@

View File

@ -0,0 +1,18 @@
: .flags ( cntf -- )
dup $80 and if [char] R emit else space then
dup $40 and if [char] I emit else space then
$20 and if [char] N emit else space then ;
: vlist ( -- ) base @ cr
." Word" &25 spaces ." Flags CFA Length" cr
[compile] char capital >r context @
BEGIN @ dup stop? 0= and
WHILE ?cr dup 2+ r@ bl = over 1+ c@ r@ = or
IF dup .name
dup c@ $F and &20 swap - spaces ( Name )
dup c@ .flags space ( Count Field )
dup name> hex u. space ( CFA )
2- 2- @ decimal 3 u.r space ( Block )
cr
ELSE drop THEN
REPEAT drop rdrop base ! ;