home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
forth
/
compiler
/
fpc
/
tutor
/
l7p030
< prev
next >
Wrap
Text File
|
1990-07-15
|
4KB
|
88 lines
╔════════════════════════════════════════════════════╗
║ Lesson 7 Part 030 F-PC 3.5 Tutorial by Jack Brown ║
╚════════════════════════════════════════════════════╝
┌──────────────────────────────────────────┐
│ Quick Review of Some Dictionary Words │
└──────────────────────────────────────────┘
HIDE ( -- ) Removes last word defined by unlinking it from its
vocabulary thread. Previously smudge bit was set.
REVEAL ( -- ) Link the most recently defined word into the current
vocabulary. Previously smudge bit was cleared.
IMMEDIATE ( -- ) Turn on the precedence bit of the most recently
defined word in the dictionary. IMMEDIATE flags a
definition so that it is executed during compilation
instead of being compiled. Many compiler words are
IMMEDIATE.
' {word} ( -- cfa ) Leave code field address of {word}. on the stack.
['] {word} ( -- cfa ) This is an IMMEDIATE word used within a
definition. ['] is used to compile the cfa of the following
word as a LITERAL or number.
['] is equivalent to the sequence [ ' {word} ] LITERAL
within a colon definition.
DP ( -- addr ) Variable containing pointer to the first available
location in the dictionary.
HERE ( -- addr ) Returns pointer to end of dictionary as stored in DP
┌───────────────────────────┐
│ Vocabulary Access Words │
└───────────────────────────┘
ORDER ( -- ) Display the CONTEXT vocabulary names forming the
search order in their present search order sequence.
Then show CURRENT vocabulary into which new
definitions will be put. This information is obtained
from the CONTEXT and CURRENT below.
CURRENT ( -- addr ) Variable containing the pfa of the vocabulary in to
which new definitions are compiled.
CONTEXT ( -- addr ) The address of the array that specifies the search
order.
VOCS ( -- ) List all vocabularies that exist in this FORTH
system.
DEFINITIONS ( -- ) Select the first vocabulary in the search path as
the compilation vocabulary into which all subsequent
new word definitions will be placed.
VOCABULARY {name} ( -- ) Make a new VOCABULARY .
A dictionary entry for {name} is created which specifies
a new list of word definitions. Subsequent execution of
{name} replaces the first vocabulary in the current
search order with {name}. When name becomes the
compilation vocabulary new definitions will be appended
to {name}'s word list.
ALSO ( -- ) Duplicate first context vocabulary making two copies of
it in the vocabulary the search order.
PREVIOUS ( -- ) The inverse of ALSO, removes the most recently
referenced vocabulary from the search order.
ROOT ( -- ) A small vocabulary for controlling search order.
ONLY ( -- ) Erases the search order and forces the ROOT vocabulary
to be the first and last.
SEAL ( -- ) Usage: SEAL FORTH will change the search order such that
only FORTH will be searched. Used for turn-key
applications.
┌───────────────────────────────────┐
│ Please Move to Lesson 7 Part 040 │
└───────────────────────────────────┘