"TOOLS-Misc Compatibility words"

tools_misc FORTH
* 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/FORTH tools_misc ordinary primitive

* see !CSP and ?CSP
    CSP

[] no special info, see general notes

FORTH/FORTH tools_misc threadstate variable

* !CSP ( -- )

put SP into CSP

used in control-words

FORTH/FORTH tools_misc ordinary primitive

* ?CSP ( -- )

check that SP == CSP otherwise THROW

used in control-words

FORTH/FORTH tools_misc ordinary primitive

CS-SWAP

[] no special info, see general notes

FORTH/FORTH tools_misc ordinary primitive

CS-DROP

[] no special info, see general notes

FORTH/FORTH tools_misc ordinary primitive

/* state checks */
* ?COMP ( -- )

check that the current STATE is compiling
otherwise THROW

often used in control-words

FORTH/FORTH tools_misc ordinary primitive

* ?EXEC ( -- )

check that the current STATE is executing
otherwise THROW

often used in control-words

FORTH/FORTH tools_misc ordinary primitive

* ?FILE ( file-id -- )

check the file-id otherwise (fixme)

FORTH/FORTH tools_misc ordinary primitive

* ?LOADING ( -- )

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

FORTH/FORTH tools_misc ordinary primitive

* ?PAIRS ( a b -- )

if compiling, check that the two magics on
the CS-STACK are identical, otherwise throw

used in control-words

FORTH/FORTH tools_misc ordinary primitive

* ?STACK ( -- )

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

FORTH/FORTH tools_misc ordinary primitive

/* definition checks */
[VOID]

[] no special info, see general notes

FORTH/FORTH tools_misc immediate constant

DEFINED

[] no special info, see general notes

FORTH/FORTH tools_misc ordinary primitive

* [DEFINED] ( "name" -- flag )

Search the dictionary for _name_. If _name_ is found,
return TRUE; otherwise return FALSE. Immediate for use in
definitions.
  
[DEFINED] word ( -- nfa|0 ) immediate
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] BL WORD FIND NIP ; IMMEDIATE

FORTH/FORTH tools_misc immediate primitive

* [UNDEFINED] ( "name" -- flag )

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

see [DEFINED]

FORTH/FORTH tools_misc immediate primitive

EXTENSIONS /** dictionary area dividers */
* (FORGET) ( addr -- )

forget everything above addr
- used by FORGET

EXTENSIONS tools_misc ordinary primitive

FENCE

[] no special info, see general notes

EXTENSIONS tools_misc threadstate variable

DICTLIMIT

[] no special info, see general notes

EXTENSIONS tools_misc threadstate variable

DICTFENCE

[] no special info, see general notes

EXTENSIONS tools_misc threadstate variable

* (DICTLIMIT) ( -- constvalue )

the upper limit of the forth writeable memory space,
the variable DICTLIMIT must be below this line.
stack-space and other space-areas are often allocated
above DICTLIMIT upto this constant.

DICTFENCE is the lower end of the writeable dictionary

EXTENSIONS tools_misc ordinary primitive

* (DICTFENCE) ( -- constvalue )

the lower limit of the forth writeable memory space,
the variable DICTFENCE must be above this line.
Some code-areas are often moved in between DICTFENCE and
this constant. To guard normal Forth code from deletion
the usual practice goes with the FENCE variable

DICTLIMIT is the upper end of the writeable dictionary

EXTENSIONS tools_misc ordinary primitive

/** implementation specific magic - used by control words */
EXCEPTION_MAGIC

[] no special info, see general notes

EXTENSIONS tools_misc ordinary constant

INPUT_MAGIC

[] no special info, see general notes

EXTENSIONS tools_misc ordinary constant

DEST_MAGIC

[] no special info, see general notes

EXTENSIONS tools_misc ordinary constant

ORIG_MAGIC

[] no special info, see general notes

EXTENSIONS tools_misc ordinary constant

LOOP_MAGIC

[] no special info, see general notes

EXTENSIONS tools_misc ordinary constant

CASE_MAGIC

[] no special info, see general notes

EXTENSIONS tools_misc ordinary constant

OF_MAGIC

[] no special info, see general notes

EXTENSIONS tools_misc ordinary constant