tools_misc wordset

description

-- miscellaneous useful extra words for TOOLS-EXT

Copyright (C) Tektronix, Inc. 1998 - 2001. All rights reserved.

description: Compatiblity with former standards, miscellaneous useful words. ... for TOOLS-EXT

FORTH

VLIST ( -- )();
p4:"vlist";

The VLIST command had been present in FIG and other forth implementations. It has to list all accessible words. In PFE it list all words in the search order. Well, the point is, that we do really just look into the search order and are then calling WORDS on that Wordl. That way you can see all accessible words in the order they might be found. Uses ?CR

FORTH

CSP ( .. )();
as:"csp";

threadstate variable CSP

csp (no special usage info)

FORTH

!CSP ( -- )();
p4:"store-csp";

put SP into CSP <br> used in control-words

FORTH

?CSP ( -- )();
p4:"Q-csp";

check that SP == CSP otherwise THROW <br> used in control-words

FORTH

CS-SWAP ( .. )();
as:"cs-minus-swap";

ordinary primitive CS-SWAP

an executable word (no special usage info)

or wrapper call around p4_two_swap

FORTH

CS-DROP ( .. )();
as:"cs-minus-drop";

ordinary primitive CS-DROP

an executable word (no special usage info)

or wrapper call around p4_two_drop

FORTH

?COMP ( -- )();
p4:"Q-comp";

check that the current STATE is compiling otherwise THROW <br> often used in control-words

FORTH

?EXEC ( -- )();
p4:"Q-exec";

check that the current STATE is executing otherwise THROW <br> often used in control-words

FORTH

?FILE ( file-id -- )();
p4:"Q-file";

check the file-id otherwise (fixme)

FORTH

?LOADING ( -- )();
p4:"Q-loading";

check that the currently interpreted text is from a file/block, otherwise THROW

FORTH

?PAIRS ( a b -- )();
p4:"Q-pairs";

if compiling, check that the two magics on the CS-STACK are identical, otherwise throw <br> used in control-words

FORTH

?STACK ( -- )();
p4:"Q-stack";

check all stacks for underflow and overflow conditions, and if such an error condition is detected THROW

FORTH

[VOID] ( .. )();
as:"bracket-void";

( 0 )  constant [VOID]

an immediate constant (no special usage info)

FORTH

DEFINED ( .. )();
as:"defined";

ordinary primitive DEFINED

an executable word (no special usage info)

or wrapper call around p4_defined

FORTH
[DEFINED] ( [name] -- flag )(); 
 ;

Search the dictionary for _name_. If _name_ is found, return TRUE; otherwise return FALSE. Immediate for use in definitions.

  

This word will actually return what FIND returns (the NFA). does check for the word using find (so it does not throw like ' ) and puts it on stack. As it is immediate it does work in compile-mode too, so it places its argument in the cs-stack then. This is most useful with a directly following [IF] clause, so that sth. like an [IFDEF] word can be simulated through [DEFINED] word [IF]

 : [DEFINED] DEFINED ; IMMEDIATE
 : [DEFINED] BL WORD COUNT (FIND-NFA) ; IMMEDIATE
 
FORTH
[UNDEFINED] ( [name] -- flag )(); 
 ;

Search the dictionary for _name_. If _name_ is found, return FALSE; otherwise return TRUE. Immediate for use in definitions.

see [DEFINED]

 : [UNDEFINED] DEFINED 0= ; IMMEDIATE
 
EXTENSIONS

(FORGET) ( .. )();
as:"paren-forget";

ordinary primitive (FORGET)

an executable word (no special usage info)

or wrapper call around p4_paren_forget

EXTENSIONS

FENCE ( .. )();
as:"fence";

threadstate variable FENCE

fence (no special usage info)

EXTENSIONS

DICTLIMIT ( .. )();
as:"dictlimit";

threadstate variable DICTLIMIT

dictlimit (no special usage info)

EXTENSIONS

DICTFENCE ( .. )();
as:"dictfence";

threadstate variable DICTFENCE

dict (no special usage info)

EXTENSIONS

(DICTLIMIT) ( .. )();
as:"paren-dictlimit";

ordinary primitive (DICTLIMIT)

an executable word (no special usage info)

or wrapper call around p4_paren_dictlimit

EXTENSIONS

(DICTFENCE) ( .. )();
as:"paren-dictfence";

ordinary primitive (DICTFENCE)

an executable word (no special usage info)

or wrapper call around p4_paren_dictfence

EXTENSIONS
EXCEPTION_MAGIC ( .. )(); 
 ;
( P4_EXCEPTION_MAGIC )  constant EXCEPTION_MAGIC

an ordinary constant (no special usage info)

EXTENSIONS

INPUT_MAGIC ( .. )();
as:"input-magic";

( P4_INPUT_MAGIC )  constant INPUT_MAGIC

an ordinary constant (no special usage info)

EXTENSIONS

DEST_MAGIC ( .. )();
as:"dest-magic";

( P4_DEST_MAGIC )  constant DEST_MAGIC

an ordinary constant (no special usage info)

EXTENSIONS

ORIG_MAGIC ( .. )();
as:"orig-magic";

( P4_ORIG_MAGIC )  constant ORIG_MAGIC

an ordinary constant (no special usage info)

EXTENSIONS

LOOP_MAGIC ( .. )();
as:"loop-magic";

( P4_LOOP_MAGIC )  constant LOOP_MAGIC

an ordinary constant (no special usage info)

EXTENSIONS

CASE_MAGIC ( .. )();
as:"case-magic";

( P4_CASE_MAGIC )  constant CASE_MAGIC

an ordinary constant (no special usage info)

EXTENSIONS

OF_MAGIC ( .. )();
as:"of-magic";

( P4_OF_MAGIC )  constant OF_MAGIC

an ordinary constant (no special usage info)