pfe-tools-misc-ext
Prev? | pfe Forth Wordset List | ?Next

## Name

pfe-tools-misc-ext ? TOOLS-Misc Compatibility words

## Synopsis

`VLIST ( -- ) ?=>? (` | `)`; | ?

`[FORTH]`;
?

`!CSP ( -- ) ?=>? (` | `)`; | ?

`[FORTH]`;
?

`?CSP ( -- ) ?=>? (` | `)`; | ?

`[FORTH]`;
?

`CS-SWAP ?=>? (` | `)`; | ?

`[FORTH]`;
?

`CS-DROP ?=>? (` | `)`; | ?

`[FORTH]`;
?

`?COMP ( -- ) ?=>? (` | `)`; | ?

`[FORTH]`;
?

`?EXEC ( -- ) ?=>? (` | `)`; | ?

`[FORTH]`;
?

`?FILE ( file-id -- ) ?=>? (` | `)`; | ?

`[FORTH]`;
?

`?LOADING ( -- ) ?=>? (` | `)`; | ?

`[FORTH]`;
?

`?PAIRS ( a b -- ) ?=>? (` | `)`; | ?

`[FORTH]`;
?

`?STACK ( -- ) ?=>? (` | `)`; | ?

`[FORTH]`;
?

`DEFINED ( "name" -- flag ) ?=>? (` | `)`; | ?

`[FORTH]`;
?

`[DEFINED] ( "name" -- flag ) ?=>? (` | `)`; | ?

`[FORTH]`;
?

`[UNDEFINED] ( "name" -- flag ) ?=>? (` | `)`; | ?

`[FORTH]`;
?

`(FORGET) ?=>? (` | `)`; | ?

`"EXTENSIONS"`;
?

`(DICTLIMIT) ?=>? (` | `)`; | ?

`"EXTENSIONS"`;
?

`(DICTFENCE) ?=>? (` | `)`; | ?

`"EXTENSIONS"`;
?

## Description

DICTLIMIT ( -- var* ) * the lower end of usable area - the forth memory block minus the * forth-related DICTALLOCS at the upper end (e.g. => POCKET-PAD ) * Note that this is a variable by tradition but you should not move it.

VLIST ( -- ) => [FORTH]

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

!CSP ( -- ) => [FORTH]

put `SP` into `CSP` used in control-words

?CSP ( -- ) => [FORTH]

check that `SP` == `CSP` otherwise `THROW` used in control-words

CS-SWAP - no description, sorry

CS-DROP - no description, sorry

?COMP ( -- ) => [FORTH]

check that the current `STATE` is compiling otherwise `THROW` often used in control-words

?EXEC ( -- ) => [FORTH]

check that the current `STATE` is executing otherwise `THROW` often used in control-words

?FILE ( file-id -- ) => [FORTH]

check the file-id otherwise (fixme)

?LOADING ( -- ) => [FORTH]

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

?PAIRS ( a b -- ) => [FORTH]

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

?STACK ( -- ) => [FORTH]

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

DEFINED ( "name" -- flag ) => [FORTH]

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 BL WORD COUNT (FIND-NFA) ;

[DEFINED] ( "name" -- flag ) => [FORTH]

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

[UNDEFINED] ( "name" -- flag ) => [FORTH]

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

see `[DEFINED]`

(FORGET) - no description, sorry

(DICTLIMIT) - no description, sorry

(DICTFENCE) - no description, sorry

Prev? | Up | ?Next
pfe-tools-ext? | Home | ?pfe-useful-ext