Interchanges the second 64 bit stack entry and the TOS (64 bit).
SWAP [ W32a W32b -> W32b W32a ] (special) (main)
Interchanges the second stack entry and the TOS.
LROT [ W32a W32b W32c -> W32c W32a W32b ] (main)
Rotate the top three stack entries (e.g. 1 2 3 ROT gives 2 1 3).
RROT [ W32a W32b W32c -> W32b W32c W32a ] (main)
Rotate the top three stack entries (e.g. 1 2 3 ROT gives 1 3 2).
???????? ROT [ W32a W32b W32c -> W32b W32c W32a] (main) this word is used to rotate the top three stack elements, the bottom one of these becomes the top.
DUP [ W32a -> W32a W32a ] (main) (special)
This word is used to duplicate the top 32 bit word on the stack,
creating two words the with the same value.
2DUP [ W64a -> W64a W64a ] (main)
Duplicates the 64 bit value on TOS, creating two new words.
TRUE [ -> W32a ] (main)
Pushes a TRUE value onto the stack, equivalent to : TRUE -1 ;
FALSE [ -> W32a ] (main)
Pushes a FALSE value onto the stack, equivalent to : FALSE -1 ;
STATE [ -> A32a ] (main)
Pushes the address of the STATE variable onto the stack. The
STATE variable is used to indicate wether a word should be compiled
or executed. All the main vocabulary words should be executed in
interpret mode, but only those in the compiler dictionary in compile
mode. In compile mode those words not in the compiler dictionary
should be compiled into the word currently being defined.
BASE [ -> A32a ] (main)
Places the address of the number base onto the stack, currently
the only number base which should be used is decimal.
MODE [ -> B32a ] (main)
If the FORTH system is interpretive mode then put 0 (FALSE) onto
the stack otherwise it is in compile mode and so it places -1
(FALSE) onto the stack.
ENTRY [ A32a -> ] (main)
PRINT_MODE [ -> ] (main) ?????????
LINE_BUFFER [ -> A32a ] (main)
Places the address of the pointer to the current input line on
the stack.
TOKEN_BUFFER [ -> A32a ] (main)
Places the address of the pointer to the currently decoded
token.
CODE [ -> A32a ] (main)
Places the address of the code pointer onto the TOS. The code
pointer points to the place where the next byte (word) of code will
be compiled to.
S0 [ -> ] ?????????????????????????
CONTEXT [ -> A32a ] (main)
Pushes the address of the address of the dictionary to search
initially for word definitions.
CURRENT [ -> A32a ] (main)
Pushes the address of the current user dictionary onto the
stack.
COMPILER [ -> A32a ] (main)
Pushes the address of the compiler dictionary onto the stack.
SPECIAL [ -> A32a ] (main)
Pushes the address of the special dictionary onto the stack.
SEARCH [ A32a -> A32b TRUE or FALSE ] (main)
Seaches the dictionary from address A32a looking for the token
which is in the TOKEN_BUFFER. IF the token is found the place the
execute address of the token onto the stack and then place a -1
(TRUE) onto the stack. If the token is not found just put a 0
(FALSE) onto the stack.
QUESTION [ -> A32a ] (main)
Places the address of the string "<cr> ? " onto the stack.
EXECUTE [ A32a -> ] (main)
Executes the code at address A32a, which could of cause change
the stack.
INLINE [ -> ] (main)
Reads a line (up to 255 characters) into the buffer pointed to
by the LINE_BUFFER variable from the currently selected input steam.
Always ends the line with a 0 Byte so that TYPE works.
NUMBER [ -> W32a TRUE or FALSE ] (main)
If the token in the TOKEN_BUFFER is a valid number in the
current number base (must be decimal for now), then place that
number on the stack and put a true on top, otherwise put a false on
the stack.
*STACK [ -> ] (main)
Checks the stack for overflow / underflow, but not implemented
at the moment.
SETUP_STACK [ -> ] (main)
Used in the outer interpreter/compiler to create the code so
that the TOS would be in R0 and the data_SP pointer would point to
the NOS.
CREATE_BL [ A32a -> W32b ] (main)
Used in the outer interpreter/compiler to create the BL
instruction to call the code at address A32a. This assumes that the
code put at the address CODE (see above).
TOP_REG [ -> W32a ] (main)
Used in the outer interpreter/compiler. TOP_REG contains a value
from 0 to 5, 0 means that the TOS is at the address data_SP, 1 means
that it is contained in R0, .. 5 means that it is contained in R4,
with NOS in R3, etc.
COMPILECONST [ W32a -> ] (main)
This is used to compile a constant into the code.
CONSTANT [ W32a -> ] (main)
Defines a constant which has the value W32a.
i.e. '32 CONSTANT space' defines a new word space which has the
value 32. When space is executed it places the value 32 onto the
stack.
VARIABLE [ W32a -> ] (main)
Defines a variable which has the initial value W32a.
i.e. '32 VARIABLE space' defines a new word space which has the
value 32. When space is executed it places an address on the stack
which points to a word which contains 32 (initially).
ARRAY [ W32a -> ] (main)
A defining word used to create an array W32a words long (e.g.
15 ARRAY ThisArray which would create an array 15 words =60 bytes
long).
CCONSTANT [ W8a -> ] (main)
Defines a byte (or character) constant which has the value W32a,
i.e. '32 CCONSTANT space' defines a new word space which has the
value 32. When space is executed it places the value 32 onto the
stack.
CVARIABLE [ W8a -> ] (main)
Defines a byte (or character) variable which has the initial
value W32a, i.e. '32 CVARIABLE space' defines a new word space
which has the value 32. When space is executed it places an address
on the stack which points to a word which contains 32 (initially).
CARRAY [ W32a -> ] (main)
A defining word used to create an array W32a bytes long
(e.g. 15 ARRAY ThatArray which would create an array 15 bytes long).
VARS [ -> A32a ] (main)
Pushes the address that the next variable will be placed at.
I> [ -> W32a ] (main) (special)
TOS := innermost loop index.
J> [ -> W32a ] (main) (special)
TOS := 2nd innermost loop index.
K> [ -> W32a ] (main) (special)
TOS := 3rd innermost loop index.
TIME [ -> W32a] (main)
The value of the number of centi-seconds that have elapsed since
the last time the clock was set to zero.
PRINT_DICT [ W32a -> ] (main)
This word is used to print a dictionary to the currently
selected output steam.
DICTIONARIES [ -> ] (main)
This word prints all the words defined in the CURRENT, COMPILER
and SPECIAL dictionaries, using PRINT_DICT above.
TOKEN [ -> B32a ] (main)
This word is used to find the next token in the INPUT_BUFFER.
It puts it into TOKEN_BUFFER the token in TOKEN_BUFFER ends with a
zero byte. If an end of line character (i.e. 0 or 10 or 13) is found
before the next printable character a 0 (FALSE) is pushed onto the
stack, otherwise a -1 (TRUE) is pusehed onto the stack.
FORTHTXTWIND [ -> A32a ] (main)
This word pushes the address of the definition of the initial
window onto the stack. It is used in multiple window programs to set
the output window back to the initial one.
(Use as in FORTHTXTWIND SETTXTWIND).
NEWTXTWINS [ U32a U32b -> ] (main)
A defining word which creates a new text window definition (they
take 3K each). U32a is the number of characters across the window
and U32b is the number of characters down (all characters are
assumed to be 16 by 32 OS Units).
(Use as in 50 12 NEWTXTWIND MyWindow
which creates a window 50 characters across by 12 down).
OPENTXTWIND [ A32a -> ] (main)
Open the text window whose definition is on the stack.
(Use as in MyWindow OPENTXTWIND).
CLOSETXTWIND [ A32a -> ] (main)
Close the text window whose definition is on the stack.
(Use as in MyWindow CLOSETXTWIND).
DELTXTWIND [ A32a -> ] (main)
Deletes the text window whose definition is on the stack. Be
very careful not to refer to this window again as it would give an
illegal window handle error from the WIMP.
(Use as in MyWindow DELTXTWIND).
SETTXTWIND [ A32a -> ] (main)
Sets the !FORTH system to use the text window whose definition
is on the stack for output.
(Use as in MyWindow SETTXTWIND).
TITLETXTWIND [ Str A32a -> ] (main)
This changes the title of the text window whose definition is on
the stack (A32a). The new title is a string on the stack.
( use as in " New Title" MyWindow TITLETXTWIND ).
MOVETXTWIND [ I32a I32b A32c -> ] (main)
This word moves the window so that the top left corner is at
(I32a,I32b). The window will always stay within the screen area.