StrongForth.f Glossary


! ( SINGLE ADDRESS -> 1ST -- )

Store SINGLE at address ADDRESS.


! ( DOUBLE ADDRESS -> 1ST -- )

Store DOUBLE at address ADDRESS.


! ( SINGLE CADDRESS -> 1ST -- )

Store SINGLE at address CADDRESS. Only the number of low-order bits corresponding to character size are transferred.


" ( -- )

Interpretation: ( "ccc<quote>" -- CADDRESS -> CHARACTER UNSIGNED )
Parse ccc delimited by " (double-quote). Store the resulting string at address STR. and return STR as CADDRESS -> CHARACTER. Store the length of the resulting string at #STR and return it as UNSIGNED. An ambiguous condition exists if the length of the string exceeds 80 characters.

Note: Subsequent uses of " will overwrite the buffer.

Compilation: ( "ccc<quote>" -- )
Parse ccc delimited by " (double-quote). Append the runtime semantics given below to the current definition.

Runtime: ( -- CADDRESS -> CHARACTER UNSIGNED )
Return CADDRESS -> CHARACTER as the address and UNSIGNED as the character count of a character string consisting of the characters ccc that were parsed during compilation. A program shall not alter the returned string.

" is an immediate word.


# ( NUMBER-DOUBLE -- 1ST )

Divide NUMBER-DOUBLE by the current number-conversion radix giving the quotient 1ST and the remainder n (n is the least-significant digit of NUMBER-DOUBLE). Convert n to external form and add the resulting character to the beginning of the pictured numeric output string.


#> ( NUMBER-DOUBLE -- CADDRESS -> CHARACTER UNSIGNED )

Drop NUMBER-DOUBLE. Make the pictured numeric output string available as a character string CADDRESS -> CHARACTER UNSIGNED. A program may replace characters within the string.


#FIB ( -- ADDRESS -> UNSIGNED )

ADDRESS -> UNSIGNED is the address of a cell containing the number of characters in the file input buffer.


#ORDER ( -- ADDRESS -> UNSIGNED )

ADDRESS -> UNSIGNED is the address of a cell containing the number of word lists in the present search order.


#PARAMS ( DEFINITION -- UNSIGNED )

UNSIGNED is the length of the parameter list of DEFINITION, i. e. the total number of basic data types in DEFINITION's stack diagram.


#S ( NUMBER-DOUBLE -- 1ST )

Convert one digit of NUMBER-DOUBLE according to the rule for #. Continue conversion until the quotient is zero. 1ST is zero.


#STR ( -- ADDRESS -> UNSIGNED )

ADDRESS -> UNSIGNED is the address of a cell containing the number of characters in the string buffer.

Note: The string buffer is used by " in interpretation state.


#TIB ( -- ADDRESS -> UNSIGNED )

ADDRESS -> UNSIGNED is the address of a cell containing the number of characters in the terminal input buffer.


' ( "<spaces>name" -- DEFINITION )

Skip leading space delimiters. Parse name delimited by a space. Find name and return DEFINITION, the latest definition in the dictionary with that name. An ambiguous condition exists if name is not found.


#VOCS ( -- UNSIGNED )

UNSIGNED is the maximum number of word lists in the search order.


'HOST ( "<spaces>name" -- TOKEN )

Skip leading space delimiters. Parse name delimited by a space. Find name in the ANS Forth host system's dictionary and return TOKEN, the execution token for name. An ambiguous condition exists if name is not found.


'HOST-PARSING ( "<spaces>name1" -- TOKEN )

Skip leading space delimiters. Parse name1 delimited by a space. Create a new definition with no name and link field and return its execution token TOKEN. Compile the runtime semantics given below into the new definiton.

Runtime: ( "<spaces>name2" -- )
Skip leading space delimiters. Parse name2 delimited by a space. Save the current input source specification. Store STRING-ID in SOURCE-ID. Make the string "name1 name2" both the input source and input buffer, set >IN to zero, and interpret. Restore the prior input source specification. Other stack effects are due to the words evaluated.

'HOST-PARSING has to be used instead of 'HOST when a parsing word is to be imported from the host. The new definition ensures that the parsing word parses correctly.


( ( -- FLAG STACK-DIAGRAM )

Produce STACK-DIAGRAM with the input parameter attribute. FLAG is the current value of STATE. Enter interpretation state.

( starts a stack diagram.

Note that the semantics of ( is not the same as in ANS Forth.

( is an immediate word.


(+LOOP) ( DO-SYS -- )

Interpretation:
Interpretation semantics for this word are undefined.

Compilation: ( DO-SYS -- )
Append the runtime semantics given below to the current definition. Resolve the destination of all unresolved occurrences of LEAVE between the location given by DO-SYS and the next location for a transfer of control, to execute the words following (+LOOP).

Runtime: ( INTEGER -- ) ( R: loop-sys1 -- | loop-sys2 )
An ambiguous condition exists if the loop control parameters are unavailable. Add INTEGER to the loop index. If the loop index did not cross the boundary between the loop limit minus one and the loop limit, continue execution at the beginning of the loop. Otherwise, discard the current loop control parameters and continue execution immediately following the loop.

(+LOOP) is an internal definition used by LOOP and +LOOP.


(+STEP-S) ( INTEGER INTEGER -- )

(+STEP-S) is an internal definition compiled by +LOOP in order to adjust the compiler data type heap.


(+STEP-S) ( INTEGER ADDRESS -- )

(+STEP-S) is an internal definition compiled by +LOOP in order to adjust the compiler data type heap.


(+STEP-S) ( INTEGER ADDRESS -> SINGLE -- )

Multiply INTEGER with the size of a cell in address units.

(+STEP-S) is an internal definition compiled by +LOOP in order to adjust the compiler data type heap.


(+STEP-S) ( INTEGER ADDRESS -> DOUBLE -- )

Multiply INTEGER with the size of two cells in address units.

(+STEP-S) is an internal definition compiled by +LOOP in order to adjust the compiler data type heap.


(+STEP-S) ( INTEGER CADDRESS -- )

Multiply INTEGER with the size of a character in address units.

(+STEP-S) is an internal definition compiled by +LOOP in order to adjust the compiler data type heap.


(2DROP-S) ( INTEGER 1ST -- )

Drop the loop limit INTEGER and the loop index 1ST.

(2DROP-S) is an internal definition compiled by DO.


(2DROP-S) ( ADDRESS 1ST -- )

Drop the loop limit ADDRESS and the loop index 1ST.

(2DROP-S) is an internal definition compiled by DO.


(>R) ( SINGLE -- )

Push SINGLE onto the return stack.

(>R) is an internal definition compiled by >R and (LOCAL).


(>R) ( DOUBLE -- )

Push DOUBLE onto the return stack.

(>R) is an internal definition compiled by >R and (LOCAL).


(?DO) ( -- DO-SYS )

Interpretation:
Interpretation semantics for this word are undefined.

Compilation: ( -- DO-SYS )
Place DO-SYS onto the stack. Append the runtime semantics given below to the current definition. The semantics are incomplete until resolved by a consumer of DO-SYS such as LOOP.

Runtime: ( SINGLE 1ST -- ) ( R: -- loop-sys )
If SINGLE is equal to 1ST, continue execution at the location given by the consumer of DO-SYS. Otherwise set up loop control parameters with index 1ST and limit SINGLE and continue executing immediately following ?DO. Anything already on the return stack becomes unavailable until the loop control parameters are discarded.

(?DO) is an internal definition used by ?DO.


(ABORT") ( SINGLE CADDRESS -> CHARACTER UNSIGNED -- )

If any bit of SINGLE is not zero, save CADDRESS -> CHARACTER and UNSIGNED, and then perform the function of -2 THROW.

(ABORT") is an internal definition compiled by ABORT".


(AGAIN) ( DEST -- )

Interpretation:
Interpretation semantics for this word are undefined.

Compilation: ( DEST -- )
Append the runtime semantics given below to the current definition, resolving the backward reference DEST.

Runtime: ( -- )
Continue execution at the location specified by DEST. If no other control flow words are used, any program code after AGAIN will not be executed.

(AGAIN) is an internal definition used by AGAIN.


(AHEAD) ( -- ORIG )

Interpretation:
Interpretation semantics for this word are undefined.

Compilation: ( -- ORIG )
Put the location of a new unresolved forward reference ORIG onto the stack. Append the runtime semantics given below to the current definition. The semantics are incomplete until ORIG is resolved (e.g., by THEN).

Runtime: ( -- )
Continue execution at the location specified by the resolution of ORIG.

(AHEAD) is an internal definition used by AHEAD.


(BEGIN) ( -- DEST )

Interpretation:
Interpretation semantics for this word are undefined.

Compilation: ( -- DEST )
Put the next location for a transfer of control, DEST, onto the stack. Append the runtime semantics given below to the current definition.

Runtime: ( -- )
Continue execution.

(BEGIN) is an internal definition used by BEGIN.


(CASE) ( -- CASE-SYS )

Interpretation:
Interpretation semantics for this word are undefined.

Compilation: ( -- CASE-SYS )
Mark the start of the CASE ... OF ... ENDOF ... ENDCASE structure. Append the runtime semantics given below to the current definition.

Runtime: ( -- )
Continue execution.

(CASE) is an internal definition used by CASE.


(CAST) ( ADDRESS -> DATA-TYPE UNSIGNED FLAG -- )

Change the contents of the interpreter or compiler data type heap according to the stack effect of the stack diagram stored at ADDRESS -> DATA-TYPE, which consists of UNSIGNED basic data types. If FLAG is FALSE, the interpreter data type heap is used. If FLAG is TRUE, the compiler data type heap is used.


(CATCH) ( TOKEN INTEGER -- SIGNED )

Create an exception frame and then execute the execution token TOKEN in such a way that control can be transferred to a point just after (CATCH) if THROW is executed during the execution of TOKEN. INTEGER is the difference of the data stack depth (in cells) before and after normal execution of TOKEN. INTEGER is positive if executing TOKEN decreases the data stack size, negative if executing TOKEN increases the data stack size, and zero if executing TOKEN does not change the data stack size.

If the execution of TOKEN completes normally (i.e., the exception frame created by (CATCH) is not destroyed by an execution of THROW) destroy the exception frame and return zero as SIGNED on top of the data stack, above whatever stack items would have been returned by executing TOKEN. Otherwise, the remainder of the execution semantics are given by THROW.

Note: (CATCH) is a low-level word that is executed or compiled by CATCH.


(COMPILE,) ( TOKEN -- )

Append the execution semantics of the definition represented by TOKEN to the execution semantics of the current definition.


(CONSTANT) ( STACK-DIAGRAM -- 1ST )

Compile the stack diagram of a constant into the dictionary. Modify STACK-DIAGRAM. The compiler data type heap pointer is assumed to point to the compound data type of the constant.

(CONSTANT) is used by CONSTANT and VALUE.


(CREATE) ( TOKEN "<spaces>name" -- )

Skip leading space delimiters. Parse name delimited by a space. Create a new definition for name with the link field containing the address of the name field,.and make it the latest definition. Set the immediate attribute in the new definition's attribute field. TOKEN is the execution token of the new definition.


(CREATE-NONAME) ( TOKEN -- )

Create a new definition with no name and link field in the dictionary and make it the latest definition. Set the immediate attribute and the noname attribute in the new definition's attribute field. TOKEN is the execution token of the new definition.


(DO) ( -- DO-SYS )

Interpretation:
Interpretation semantics for this word are undefined.

Compilation: ( -- DO-SYS )
Place DO-SYS onto the stack. Append the runtime semantics given below to the current definition. The semantics are incomplete until resolved by a consumer of DO-SYS such as LOOP.

Runtime: ( SINGLE 1ST -- ) ( R: -- loop-sys )
Set up loop control parameters with index 1ST and limit SINGLE. Anything already on the return stack becomes unavailable until the loop-control parameters are discarded.

(DO) is an internal definition used by DO.


(DOES) ( DEFINITION -- )

Finish a new definition by compiling its stack diagram. If the new definition does not yet have a stack diagram, copy the stack diagram from an already existing definition DEFINITION, skipping the last input parameter.

(DOES) is an internal definition compiled by DOES>.


(DRDROP) ( -- )

Pop DOUBLE from the return stack and discard it.


(DROP-S) ( SINGLE -- )

Drop the condition SINGLE.

(DROP-S) is an internal definition compiled by IF, UNTIL and WHILE.


(DROP-S') ( SINGLE 1ST -- 1ST )

Drop the selector 1ST.

(DROP-S') is an internal definition compiled by OF.


(ELSE) ( ORIG -- 1ST )

Interpretation:
Interpretation semantics for this word are undefined.

Compilation: ( ORIG -- 1ST )
Put the location of a new unresolved forward reference 1ST onto the stack. Append the runtime semantics given below to the current definition. The semantics will be incomplete until 1ST is resolved (e.g., by THEN). Resolve the forward reference ORIG using the location following the appended runtime semantics.

Runtime: ( -- )
Continue execution at the location given by the resolution of 1ST.

(ELSE) is an internal definition used by ELSE.


(ENDCASE) ( CASE-SYS -- )

Interpretation:
Interpretation semantics for this word are undefined.

Compilation: ( CASE-SYS -- )
Mark the end of the CASE ... OF ... ENDOF ... ENDCASE structure. Use CASE-SYS to resolve the entire structure. Append the runtime semantics given below to the current definition.

Runtime: ( SINGLE -- )
Discard the case selector SINGLE and continue execution.

(ENDCASE) is an internal definition used by ENDCASE.


(ENDOF) ( CASE-SYS OF-SYS -- 1ST )

Interpretation:
Interpretation semantics for this word are undefined.

Compilation: ( CASE-SYS OF-SYS -- 1ST )
Mark the end of the OF ... ENDOF part of the CASE structure. The next location for a transfer of control resolves the reference given by OF-SYS. Append the runtime semantics given below to the current definition. Replace CASE-SYS with 1ST, to be resolved by ENDCASE.

Runtime: ( -- )
Continue execution at the location specified by the consumer of 1ST.

(ENDOF) is an internal definition used by ENDOF.


(EXECUTE) ( TOKEN -- )

Remove TOKEN from the stack and perform the semantics identified by it.

Note that (EXECUTE) does not verify or update the data type heap according to the stack diagram of the word associated with TOKEN. (EXECUTE) is a low-level word that should be used carefully, because it may corrupt StrongForth's data type system. Especially, it should not be used in place of EXECUTE.


(IF) ( -- ORIG )

Interpretation:
Interpretation semantics for this word are undefined.

Compilation: ( -- ORIG )
Put the location of a new unresolved forward reference ORIG onto the stack. Append the runtime semantics given below to the current definition. The semantics are incomplete until ORIG is resolved, e.g., by THEN or ELSE.

Runtime: ( SINGLE -- )
If all bits of SINGLE are zero, continue execution at the location specified by the resolution of ORIG.

(IF) is an internal definition used by IF.


(LEAVE) ( -- )

Discard the current loop control parameters. An ambiguous condition exists if they are unavailable. Continue execution immediately following the innermost syntactically enclosing DO ... LOOP or DO ... +LOOP.

(LEAVE) is an internal definition used by LEAVE.


(LOCAL) ( CADDRESS -> CHARACTER UNSIGNED -- )

Interpretation:
An exception is thrown if (LOCAL) is interpreted.

Execution:
When executed during compilation, (LOCAL) passes a message to the system that has one of two meanings. If UNSIGNED is non-zero, the message identifies a new local whose definition name is given by the string of characters identified by CADDRESS -> CHARACTER UNSIGNED. If UNSIGNED is zero, the message is last local and CADDRESS -> CHARACTER has no significance.

The result of executing (LOCAL) during compilation of a definition is creating a set of named local identifiers, each of which is a definition name, that only have execution semantics within the scope of that definition's source.

Runtime: ( -- x )
Push the local's value, x, onto the stack.

Note: x can be either SINGLE or DOUBLE.


(LOOP) ( DO-SYS -- )

Interpretation:
Interpretation semantics for this word are undefined.

Compilation: ( DO-SYS -- )
Append the runtime semantics given below to the current definition. Resolve the destination of all unresolved occurrences of LEAVE between the location given by DO-SYS and the next location for a transfer of control, to execute the words following the (LOOP).

Runtime: ( -- ) ( R: loop-sys1 -- | loop-sys2 )
An ambiguous condition exists if the loop control parameters are unavailable. Add one to the loop index. If the loop index is then equal to the loop limit, discard the loop parameters and continue execution immediately following the loop. Otherwise continue execution at the beginning of the loop.

(LOOP) is an internal definition used by LOOP.


(OF) ( -- OF-SYS )

Interpretation:
Interpretation semantics for this word are undefined.

Compilation: ( -- OF-SYS )
Put OF-SYS onto the stack. Append the runtime semantics given below to the current definition. The semantics are incomplete until resolved by a consumer of OF-SYS such as ENDOF.

Runtime: ( SINGLE 1ST -- | 1ST )
If the two values on the stack are not equal, discard the top value and continue execution at the location specified by the consumer of OF-SYS, e.g., following the next ENDOF. Otherwise, discard both values and continue execution in line.

(OF) is an internal definition used by OF.


(PARAM) ( STACK-DIAGRAM DATA-TYPE -- 1ST )

If STACK-DIAGRAM does not contain a null data type, reserve two cells in the dictionary and store STACK-DIAGRAM without it's offset attribute in the cells. Add 1 to the offset attribute of STACK-DIAGRAM. 1ST is a stack diagram with the identifier of DATA-TYPE and the input parameter, output parameter and offset attributes of STACK-DIAGRAM.


(RDROP) ( -- )

Pop SINGLE from the return stack and discard it.

(RDROP) is an internal definition compiled by R>.


(REPEAT) ( ORIG DEST -- )

Interpretation:
Interpretation semantics for this word are undefined.

Compilation: ( ORIG DEST -- )
Append the runtime semantics given below to the current definition, resolving the backward reference DEST. Resolve the forward reference ORIG using the location following the appended runtime semantics.

Runtime: ( -- )
Continue execution at the location given by DEST.

(REPEAT) is an internal definition used by REPEAT.


(STEP-S) ( INTEGER -- )

(STEP-S) is an internal definition compiled by LOOP in order to adjust the compiler data type heap.


(STEP-S) ( ADDRESS -- )

(STEP-S) is an internal definition compiled by LOOP in order to adjust the compiler data type heap.


(STEP-S) ( ADDRESS -> SINGLE -- )

(STEP-S) is an internal definition compiled by LOOP in order to adjust the compiler data type heap.

Push the size of a cell in address units onto the stack.


(STEP-S) ( ADDRESS -> DOUBLE -- )

(STEP-S) is an internal definition compiled by LOOP in order to adjust the compiler data type heap.

Push the size of two cells in address units onto the stack.


(STEP-S) ( CADDRESS -- )

(STEP-S) is an internal definition compiled by LOOP in order to adjust the compiler data type heap.

Push the size of a character in address units onto the stack.


(THEN) ( ORIG -- )

Interpretation:
Interpretation semantics for this word are undefined.

Compilation: ( ORIG -- )
Append the runtime semantics given below to the current definition. Resolve the forward reference ORIG using the location of the appended runtime semantics.

Runtime: ( -- )
Continue execution.

(THEN) is an internal definition used by THEN.


(UNLOOP) ( -- )

Discard the loop control parameters for the current nesting level. UNLOOP is required for each nesting level before the definition may be EXITed. An ambiguous condition exists if the loop-control parameters are unavailable.


(UNTIL) ( DEST -- )

Interpretation:
Interpretation semantics for this word are undefined.

Compilation: ( DEST -- )
Append the runtime semantics given below to the current definition, resolving the backward reference DEST.

Runtime: ( SINGLE -- )
If all bits of SINGLE are zero, continue execution at the location specified by DEST.

(UNTIL) is an internal definition used by UNTIL.


(VARIABLE) ( STACK-DIAGRAM -- 1ST )

Compile the stack diagram of a variable into the dictionary. Modify STACK-DIAGRAM. The compiler data heap pointer is assumed to point to the compound data type of the variable.

(VARIABLE) is used by VARIABLE.


(WHILE) ( DEST -- ORIG 1ST )

Interpretation:
Interpretation semantics for this word are undefined.

Compilation: ( DEST -- ORIG 1ST )
Put the location of a new unresolved forward reference ORIG onto the stack, under the existing DEST. Append the runtime semantics given below to the current definition. The semantics are incomplete until ORIG and DEST are resolved (e.g., by REPEAT).

Runtime: ( SINGLE -- )
If all bits of SINGLE are zero, continue execution at the location specified by the resolution of ORIG.

(WHILE) is an internal definition used by WHILE.


) ( FLAG STACK-DIAGRAM -- )

Mark the end of a definition's stack diagram. Compile the stack diagram. Store FLAG in STATE. An exception is thrown if the current definition already has a stack diagram, or if the stack diagram is invalid.


) ( COLON-SYS FLAG STACK-DIAGRAM -- 1ST )

Mark the end of a colon definition's stack diagram. Compile the stack diagram and place a copy of the input parameter list onto the compiler data type heap. Re-enter compilation state. An exception is thrown if the current definition already has a stack diagram, or if the stack diagram is invalid.

Note: FLAG is assumed to be TRUE.


)' ( FLAG STACK-DIAGRAM "<spaces>name" -- DEFINITION )

Mark the end of a definition's stack diagram. Store FLAG in STATE. Skip leading space delimiters. Parse name delimited by a space. Find name and return DEFINITION, the latest definition in the dictionary with that name and with exactly the given stack diagram. An exception is thrown if no definition with that name and exactly the given stack diagram is found.


)CAST ( FLAG STACK-DIAGRAM -- )

Mark the end of a stack diagram STACK-DIAGRAM. Restore the compilation state indicated by FLAG. If FLAG is false, change the interpreter data type heap according to the stack effect of STACK-DIAGRAM. If FLAG is true, change the compiler data type heap according to the stack effect of STACK-DIAGRAM. The data stack remains unchanged.

Note: )CAST is an immediate word. It does not compile any execution semantics if used in compilation state. )CAST may corrupt the data type system, because it arbitrarily modifies the contents of the data type heap without performing appropriate changes on the data stack.


)PROCREATES ( FLAG STACK-DIAGRAM "<spaces>name" -- )

Mark the end of a stack diagram STACK-DIAGRAM. Drop FLAG. Skip leading space delimiters. Parse name delimited by a space. Create a definition with name name that identifies a new data type. The new data type is a direct subtype of TOKEN. It is called a qualified token. Create another definition with name EXECUTE, whose stack diagram is a copy of STACK-DIAGRAM, supplemented with the just created qualified token as the last input parameter.

Execution: name ( STACK-DIAGRAM -- 1ST )
When used in a stack diagram, specifies an input or output parameter with the data type of the qualified token.

Execution: EXECUTE ( x0 ... xm name -- y0 ... yn )
Execute the word specified by the qualified token name. The word's stack diagram has to match the stack diagram that was supplied to )PROCREATES.
x0 ... xm are the input parameters of the stack diagram.
y0 ... yn are the output parameters of the stack diagram.


* ( INTEGER UNSIGNED -- 1ST )

Multiply INTEGER by UNSIGNED giving the product 1ST. Note that the multiplicand can be any integer (signed or unsigned), while the multiplicator is unsigned. The result has the same data type as the multiplicand. Since the product of an unsigned number (multiplicand) and a signed number (multiplicator) should be a signed number, the two operands have to be swapped in this case.


* ( SIGNED SIGNED -- 1ST )

Multiply two SIGNED numbers giving the product 1ST. Note that the multiplicand as well as the multiplicator are signed. The result has the same data type as the multiplicand.


* ( INTEGER-DOUBLE UNSIGNED -- 1ST )

Multiply INTEGER-DOUBLE by UNSIGNED giving the double-precision product 1ST. Note that the multiplicand can be any integer (signed or unsigned), while the multiplicator is unsigned.


* ( SIGNED-DOUBLE SIGNED -- 1ST )

Multiply SIGNED-DOUBLE by SIGNED giving the double-precision product 1ST. Note that the multiplicand as well as the multiplicator are signed. The result has the same data type as the multiplicand.


*/ ( UNSIGNED UNSIGNED UNSIGNED -- 1ST )

Multiply the first UNSIGNED by the second UNSIGNED producing an intermediate unsigned double-precision result. Divide the intermediate result by the third UNSIGNED giving the unsigned single-precision quotient 1ST. An ambiguous condition exists if the third UNSIGNED is zero or if the quotient 1ST lies outside the range of an unsigned single-precision number.


*/ ( SIGNED SIGNED SIGNED -- 1ST )

Multiply the first SIGNED by the second SIGNED producing an intermediate signed double-precision result. Divide the intermediate result by the third SIGNED giving the signed single-precision quotient 1ST. An ambiguous condition exists if the third SIGNED is zero or if the quotient 1ST lies outside the range of a signed single-precision number.


*/ ( UNSIGNED-DOUBLE UNSIGNED UNSIGNED -- 1ST )

Multiply UNSIGNED-DOUBLE by the first UNSIGNED producing an intermediate unsigned triple-precision result. Divide the intermediate result by the second UNSIGNED giving the unsigned double-precision quotient 1ST. An ambiguous condition exists if the second UNSIGNED is zero or if the quotient 1ST lies outside of the range of an unsigned double-precision number.


*/ ( SIGNED-DOUBLE SIGNED SIGNED -- 1ST )

Multiply SIGNED-DOUBLE by the first SIGNED producing an intermediate unsigned triple-precision result. Divide the intermediate result by the second SIGNED giving the signed double-precision quotient 1ST. An ambiguous condition exists if the second SIGNED is zero or if the second SIGNED is negative, or if the quotient 1ST lies outside of the range of a signed double-precision number.


*/MOD ( UNSIGNED UNSIGNED UNSIGNED -- 3RD 1ST )

Multiply the first UNSIGNED by the second UNSIGNED producing an intermediate unsigned double-precision result. Divide the intermediate result by the third UNSIGNED giving the unsigned single-precision remainder 3RD and the unsigned single-precision quotient 1ST. An ambiguous condition exists if the third UNSIGNED is zero or if the quotient 1ST lies outside the range of an unsigned single-precision number.


*/MOD ( SIGNED SIGNED SIGNED -- 3RD 1ST )

Multiply the first SIGNED by the second SIGNED producing an intermediate signed double-precision result. Divide the intermediate result by the third SIGNED giving the signed single-precision remainder 3RD and the signed single-precision quotient 1ST. An ambiguous condition exists if the third SIGNED is zero or if the quotient 1ST lies outside the range of a signed single-precision number.


*/MOD ( UNSIGNED-DOUBLE UNSIGNED UNSIGNED -- 3RD 1ST )

Multiply UNSIGNED-DOUBLE by the first UNSIGNED producing an intermediate unsigned triple-precision result. Divide the intermediate result by the second UNSIGNED giving the unsigned single-precision remainder 3RD and the unsigned double-precision quotient 1ST. An ambiguous condition exists if the second UNSIGNED is zero or if the quotient 1ST lies outside of the range of an unsigned double-precision number.


+ ( INTEGER INTEGER -- 1ST )

Add the second INTEGER to the first INTEGER, giving the sum 1ST.


+ ( ADDRESS INTEGER -- 1ST )

Add INTEGER to ADDRESS, giving the sum 1ST.


+ ( ADDRESS -> SINGLE INTEGER -- 1ST )

Add INTEGER to ADDRESS -> SINGLE, giving the sum 1ST. Since ADDRESS points to a cell, INTEGER is automatically multiplied with the number of address units per cell before the actual addition takes place.


+ ( ADDRESS -> DOUBLE INTEGER -- 1ST )

Add INTEGER to ADDRESS -> DOUBLE, giving the sum 1ST. Since ADDRESS points to a double cell, INTEGER is automatically multiplied with the number of address units per double cell before the actual addition takes place.


+ ( CADDRESS INTEGER -- 1ST )

Add INTEGER to address CADDRESS, giving the sum 1ST. Since CADDRESS points to an item of character size, INTEGER is automatically multiplied with the number of address units per character before the actual addition takes place.


+ ( INTEGER-DOUBLE INTEGER-DOUBLE -- 1ST )

Add the second INTEGER-DOUBLE to the first INTEGER-DOUBLE, giving the sum 1ST.


+ ( INTEGER-DOUBLE INTEGER -- 1ST )

Add UNSIGNED with zero extension to INTEGER-DOUBLE, giving the double-precision sum 1ST.


+ ( INTEGER-DOUBLE SIGNED -- 1ST )

Add SIGNED with sign extension to INTEGER-DOUBLE, giving the double-precision sum 1ST.


+! ( INTEGER ADDRESS -> INTEGER -- )

Add INTEGER to the integer at address ADDRESS -> INTEGER.


+! ( INTEGER-DOUBLE ADDRESS -> INTEGER-DOUBLE -- )

Add INTEGER-DOUBLE to the double-precision integer at address ADDRESS -> INTEGER-DOUBLE.


+! ( INTEGER ADDRESS -> INTEGER-DOUBLE -- )

Add INTEGER with zero extension to the double-precision integer at address ADDRESS -> INTEGER-DOUBLE.


+! ( SIGNED ADDRESS -> INTEGER-DOUBLE -- )

Add SIGNED with sign extension to the double-precision integer at address ADDRESS -> INTEGER-DOUBLE.


+! ( INTEGER CADDRESS -> INTEGER -- )

Add INTEGER to the character size integer at address CADDRESS -> INTEGER.


+! ( INTEGER ADDRESS -> ADDRESS -- )

Add INTEGER to the address stored at address ADDRESS -> ADDRESS.


+! ( INTEGER ADDRESS -> ADDRESS -> SINGLE -- )

Add INTEGER to the address stored at address ADDRESS -> ADDRESS -> SINGLE. Since ADDRESS points to a cell, INTEGER is automatically multiplied with the number of address units per cell before the actual addition takes place.


+! ( INTEGER ADDRESS -> ADDRESS -> DOUBLE -- )

Add INTEGER to the address stored at address ADDRESS -> ADDRESS -> DOUBLE. Since ADDRESS points to a double cell, INTEGER is automatically multiplied with the number of address units per double cell before the actual addition takes place.


+! ( INTEGER ADDRESS -> CADDRESS -- )

Add INTEGER to the address stored at address ADDRESS -> CADDRESS. Since CADDRESS points to an item of character size, INTEGER is automatically multiplied with the number of address units per character before the actual addition takes place.


+ATTRIBUTE ( LOGICAL -- )

Set the attibutes specified by LOGICAL in the latest definition. An ambiguous condition exists if one these attributes is already set.


+LOOP ( DO-SYS -- )

Interpretation:
An exception is thrown if +LOOP is interpreted.

Compilation:
Append the runtime semantics given below to the current definition. Resolve both the forward and the backward reference of DO-SYS. Forget the loop index I, which is assumed to be the latest local. Rename the loop index J, if it exists, to I. An exception is thrown if the contents of the compiler data type heap do not exactly match the copy that was saved when DO-SYS was created.

Runtime: ( INTEGER -- ) ( R: loop-sys1 -- | loop-sys2 )
An ambiguous condition exists if the loop control parameters are unavailable. Add INTEGER* to the loop index. If the loop index crosses the boundary between the loop limit minus one and the loop limit, discard the current loop control parameters and continue execution. Otherwise, branch to the beginning of the loop.

* Note: +LOOP takes regard of the data type of the loop index. If the loop index is an address of a single cell, INTEGER is multiplied with the size of a single cell in address units before it is added to the loop index. If the loop index is an address of a double cell, INTEGER is multiplied with the size of a double cell in address units before it is added to the loop index. If the loop index is a character address, INTEGER is multiplied with the size of a character in address units before it is added to the loop index.

+LOOP is an immediate word.


+LOOP, ( DO-SYS TOKEN -- )

If TOKEN is the execution token of NOOP, execute +LOOP. Otherwise, compile TOKEN and execute +LOOP. An ambiguous condition exists if TOKEN is not the execution token of one of the versions of (+STEP-S)


+PARAM ( DEFINITION UNSIGNED -- 1ST 2ND )

Starting at the basic data type with index UNSIGNED, find the beginning of the next compound data type, or the end of the parameter list of DEFINITION. Return this index as 2ND. All indices start with 0. An ambiguous condition exists if UNSIGNED is greater than the length of the parameter list.


, ( SINGLE -- )

Reserve one cell in the data space and store SINGLE in the cell. If the first unused address of the data space is aligned prior to execution of ,, it will remain aligned when , finishes execution. An ambiguous condition exists if the first unused address of the data space is not aligned prior to execution of ,.


, ( DOUBLE -- )

Reserve two cells in the data space and store DOUBLE in the cells. If the first unused address of the dara space is aligned prior to execution of ,, it will remain aligned when , finishes execution. An ambiguous condition exists if the first unused address of the data space is not aligned prior to execution of ,.


- ( INTEGER INTEGER -- 1ST )

Subtract the second INTEGER from the first INTEGER, giving the difference 1ST.


- ( ADDRESS INTEGER -- 1ST )

Subtract INTEGER from ADDRESS, giving the difference 1ST.


- ( ADDRESS -> SINGLE INTEGER -- 1ST )

Subtract INTEGER from ADDRESS -> SINGLE, giving the difference 1ST. Since ADDRESS points to a cell, INTEGER is automatically multiplied with the number of address units per cell before the actual subtraction takes place.


- ( ADDRESS -> DOUBLE INTEGER -- 1ST )

Subtract INTEGER from ADDRESS -> DOUBLE, giving the difference 1ST. Since ADDRESS points to a double cell, INTEGER is automatically multiplied with the number of address units per double cell before the actual subtraction takes place.


- ( CADDRESS INTEGER -- 1ST )

Subtract INTEGER from CADDRESS, giving the difference 1ST. Since CADDRESS points to an item of character size, INTEGER is automatically multiplied with the number of address units per character before the actual subtraction takes place.


- ( INTEGER-DOUBLE INTEGER-DOUBLE -- 1ST )

Subtract the second INTEGER-DOUBLE from the first INTEGER-DOUBLE, giving the difference 1ST.


- ( INTEGER-DOUBLE INTEGER -- 1ST )

Subtract INTEGER with zero extension from INTEGER-DOUBLE, giving the double-precision difference 1ST.


- ( INTEGER-DOUBLE SIGNED -- 1ST )

Subtract SIGNED with sign extension from INTEGER-DOUBLE, giving the double-precision difference 1ST.


- ( ADDRESS 1ST -- SIGNED )

Subtract 1ST from ADDRESS, giving the difference SIGNED.


- ( ADDRESS -> SINGLE 1ST -- SIGNED )

Subtract 1ST from ADDRESS -> SINGLE, giving the intermediate difference n. Since ADDRESS points to a cell, the result SIGNED is equal to n divided by the number of address units per cell.


- ( ADDRESS -> DOUBLE 1ST -- SIGNED )

Subtract 1ST from ADDRESS -> DOUBLE, giving the intermediate difference n. Since ADDRESS points to a double cell, the result SIGNED is equal to n divided by the number of address units per double cell.


- ( CADDRESS 1ST -- SIGNED )

Subtract 1ST from address CADDRESS, giving the intermediate difference n. Since CADDRESS points to an item of character size, the result SIGNED is equal to n divided by the number of address units per character.


-- ( STACK-DIAGRAM -- 1ST )

Remove the input parameter attribute and add the output parameter attribute of STACK-DIAGRAM, giving 1ST.

-- is used in a stack diagram to separate input and output parameters. An exception is thrown if -- is preceded by -> or if it is used more than once within the same stack diagram.


-> ( "<spaces>name" x -- y )

Skip leading space delimiters. Parse name delimited by a space. Convert x to y, where x is any data type and y is a compound data type created by appending the basic data type identified by name to the data type of x. An exception is thrown if name is not the name of a data type.

-> is an immediate word.


-> ( STACK-DIAGRAM -- 1ST )

Add the prefix attribute to STACK-DIAGRAM, giving 1ST. An exception is thrown if STACK-DIAGRAM is a null data type or if it's prefix attribute is already set.

-> is used in a stack diagram to create compound data types as input or output parameters.


-TRAILING ( CADDRESS -> CHARACTER UNSIGNED -- 1ST 3RD )

If UNSIGNED is greater than zero, 3RD is equal to UNSIGNED less the number of spaces at the end of the character string specified by CADDRESS -> CHARACTER UNSIGNED. If UNSIGNED is zero or the entire string consists of spaces, 3RD is zero.


. ( SINGLE -- )

Display SINGLE as an unsigned number in free field format.


. ( SIGNED -- )

Display SIGNED as a signed number in free field format.


. ( DOUBLE -- )

Display DOUBLE as an unsigned double-precision number in free field format.


. ( SIGNED-DOUBLE -- )

Display SIGNED-DOUBLE as a signed double-precision number in free field format.


. ( CHARACTER -- )

If CHARACTER is a graphic character in the ASCII character set, display CHARACTER. The effect of . for all other values of CHARACTER is undefined.


. ( FLAG -- )

Display TRUE and a trailing space if FLAG is true. Display FALSE and a trailing space if FLAG is false.


. ( DATA-TYPE -- )

Display the name of DATA-TYPE as a character string, followed by a space.


. ( DEFINITION -- )

Display the header of DEFINITION, consisting of the definition's name and its stack diagram, plus a trailing space character.


. ( WID -- )

Display the name of the vocabulary that corresponds to the word list identified by WID as a character string, followed by a space. If the word list is invalid or is not associated with a vocabulary, display ??? instead.


." ( -- )

Interpretation: ( "ccc<quote>" -- )
Parse ccc delimited by " (double-quote). Display ccc.

Compilation: ( "ccc<quote>" -- )
Parse ccc delimited by " (double-quote). Append the runtime semantics given below to the current definition.

Runtime: ( -- )
Display ccc.

." is an immediate word.


.( ( -- )

Interpretation: ( "ccc<right-paren>" -- )
Parse ccc delimited by ) (right parenthesis). Display ccc.

Compilation: ( "ccc<right-paren>" -- )
Parse ccc delimited by ) (right parenthesis). Append the runtime semantics given below to the current definition.

Runtime: ( -- )
Display ccc.

.( is an immediate word.


.DIAGRAM ( DEFINITION -- )

Display the stack diagram of DEFINITION in a user-readable format, plus a trailing space character.


.ERROR ( SIGNED -- )

If SIGNED is not equal to zero, display an error message depending on the value of SIGNED.

Display the current line of the input source up to and including the most recently parsed word, plus an error message associated with the error code SIGNED. Display the data types of the items currently on the data stack on a second line.


.R ( DOUBLE INTEGER -- )

Display DOUBLE as an unsigned double-precision number right aligned in a field INTEGER characters wide. INTEGER is assumed to be a signed number. If INTEGER is not positive or the number of characters required to display DOUBLE is greater than INTEGER, all digits are displayed with no leading spaces in a field as wide as necessary.


.R ( SIGNED-DOUBLE INTEGER -- )

Display SIGNED-DOUBLE as a signed double-precision number right aligned in a field INTEGER characters wide. INTEGER is assumed to be a signed number. If INTEGER is not positive or the number of characters required to display SIGNED-DOUBLE is greater than INTEGER, all digits are displayed with no leading spaces in a field as wide as necessary.


.R ( SINGLE INTEGER -- )

Display SINGLE as an unsigned number right aligned in a field INTEGER characters wide. INTEGER is assumed to be a signed number. If INTEGER is not positive or the number of characters required to display SINGLE is greater than INTEGER, all digits are displayed with no leading spaces in a field as wide as necessary.


.R ( SIGNED INTEGER -- )

Display SIGNED as a signed number right aligned in a field INTEGER characters wide. INTEGER is assumed to be a signed number. If INTEGER is not positive or the number of characters required to display SIGNED is greater than INTEGER, all digits are displayed with no leading spaces in a field as wide as necessary.


.S ( -- )

Display the data types on the data type heap. In interpretation state, the interpreter data type heap is used. In compilation state, the compiler data type heap is used.

Unlike ANS Forth, .S does not display the values of the items on the data stack.

.S is an immediate word.


/ ( UNSIGNED UNSIGNED -- 1ST )

Divide the first UNSIGNED by the second UNSIGNED, giving the unsigned quotient 1ST. An ambiguous condition exists if the second UNSIGNED is zero.


/ ( SIGNED SIGNED -- 1ST )

Divide the first SIGNED by the second SIGNED, giving the signed quotient 1ST. An ambiguous condition exists if the second SIGNED is zero. If both operands differ in sign, the result returned will be the same as that returned by the phrase SWAP S>D SWAP SM/REM SWAP DROP.


/ ( UNSIGNED-DOUBLE UNSIGNED -- 1ST )

Divide UNSIGNED-DOUBLE by UNSIGNED, giving the unsigned double-precision quotient 1ST. An ambiguous condition exists if UNSIGNED is zero.


/MOD ( UNSIGNED UNSIGNED -- 2ND 1ST )

Divide the first UNSIGNED by the second UNSIGNED, giving the unsigned remainder 2ND and the unsigned quotient 1ST. An ambiguous condition exists if the second UNSIGNED is zero.


/MOD ( SIGNED SIGNED -- 2ND 1ST )

Divide the first SIGNED by the second SIGNED, giving the signed remainder 2ND and the signed quotient 1ST. An ambiguous condition exists if the second UNSIGNED is zero. If both operands differ in sign, the result returned will be the same as that returned by the phrase SWAP S>D SWAP SM/REM.


/MOD ( UNSIGNED-DOUBLE UNSIGNED -- 2ND 1ST )

Divide UNSIGNED-DOUBLE by UNSIGNED, giving the unsigned single-precision remainder 2ND and the unsigned double-precision quotient 1ST. An ambiguous condition exists if UNSIGNED is zero.


/STRING ( CADDRESS -> CHARACTER UNSIGNED INTEGER -- 1ST 3RD )

Adjust the character string at CADDRESS -> CHARACTER with length UNSIGNED by INTEGER characters. The resulting character string, specified by 1ST 3RD, begins at CADDRESS -> CHARACTER plus INTEGER characters and is UNSIGNED minus INTEGER characters long.


/STRING ( CADDRESS -> CHARACTER UNSIGNED -- 1ST 3RD )

Adjust the character string at CADDRESS -> CHARACTER with length UNSIGNED by one character. The resulting character string, specified by 1ST 3RD, begins at CADDRESS -> CHARACTER plus one character and is UNSIGNED minus one characters long.


0< ( SIGNED -- FLAG )

FLAG is true if and only if SIGNED is less than zero.


0< ( SIGNED-DOUBLE -- FLAG )

FLAG is true if and only if SIGNED-DOUBLE is less than zero.


0<> ( SINGLE -- FLAG )

FLAG is true if and only if SINGLE is not equal to zero.


0<> ( DOUBLE -- FLAG )

FLAG is true if and only if DOUBLE is not equal to zero.


0= ( SINGLE -- FLAG )

FLAG is true if and only if SINGLE is equal to zero.


0= ( DOUBLE -- FLAG )

FLAG is true if and only if DOUBLE is equal to zero.


0> ( SIGNED -- FLAG )

FLAG is true if and only if SIGNED is greater than zero.


0> ( SIGNED-DOUBLE -- FLAG )

FLAG is true if and only if SIGNED-DOUBLE is greater than zero.


1+ ( INTEGER -- 1ST )

Add one (1) to INTEGER giving 1ST.


1+ ( ADDRESS -- 1ST )

Add one (1) to ADDRESS giving 1ST.


1+ ( ADDRESS -> SINGLE -- 1ST )

Add the number of address units per cell to ADDRESS -> SINGLE giving 1ST.


1+ ( ADDRESS -> DOUBLE -- 1ST )

Add the number of address units per double cell to ADDRESS -> DOUBLE giving 1ST.


1+ ( CADDRESS -- 1ST )

Add the number of address units per character to CADDRESS giving 1ST.


1+ ( INTEGER-DOUBLE -- 1ST )

Add one (1) to INTEGER-DOUBLE giving 1ST.


1- ( INTEGER -- 1ST )

Subtract one (1) from INTEGER giving 1ST.


1- ( ADDRESS -- 1ST )

Subtract one (1) from ADDRESS giving 1ST.


1- ( ADDRESS -> SINGLE -- 1ST )

Subtract the number of address units per cell from ADDRESS -> SINGLE giving 1ST.


1- ( ADDRESS -> DOUBLE -- 1ST )

Subtract the number of address units per double cell from ADDRESS -> DOUBLE giving 1ST.


1- ( CADDRESS -- 1ST )

Subtract the number of address units per character from CADDRESS giving 1ST.


1- ( INTEGER-DOUBLE -- 1ST )

Subtract one (1) from INTEGER-DOUBLE giving 1ST.


1ST ( STACK-DIAGRAM -- 1ST )

1ST is used in a stack diagram to specify input or output parameters which should have exactly the same data type as the first data type in the input parameter list of the same definition.

An exception is thrown if the input parameter list is empty.


2* ( INTEGER -- 1ST )

Multiply INTEGER by 2 giving the product 1ST. Note that 2* may only be used on integer values. Use LSHIFT for shifting bits to the left.


2* ( INTEGER-DOUBLE -- 1ST )

Multiply INTEGER-DOUBLE by 2 giving the product 1ST.


2/ ( UNSIGNED -- 1ST )

Divide UNSIGNED by 2 giving the quotient 1ST. Note that 2/ may only be used on unsigned numbers. Use RSHIFT for shifting bits to the right.


2/ ( SIGNED -- 1ST )

Divide SIGNED by 2 giving the quotient 1ST. Note that 2/ may only be used on signed numbers. Use RSHIFT for shifting bits to the right.


2/ ( UNSIGNED-DOUBLE -- 1ST )

Divide UNSIGNED-DOUBLE by 2 giving the quotient 1ST.


2/ ( SIGNED-DOUBLE -- 1ST )

Divide SIGNED-DOUBLE by 2 giving the quotient 1ST.


2DROP-S ( -- )

Change the compiler data type heap according to the stack effect of the word (2DROP-S). An exception is thrown if DROP-S is interpreted, if the compiler data type heap is locked, or if (2DROP-S) can not be found in the dictionary.


2ND ( STACK-DIAGRAM -- 1ST )

2ND is used in a stack diagram to specify input or output parameters which should have exactly the same data type as the second data type in the input parameter list of the same definition. Since the second basic data type of the input parameter list can be a part of the first input parameter, it is possible to build a reference to the tail of a compound data type representing the first input parameter.

An exception is thrown if the input parameter list contains less than two basic data types or if the second basic data type is itself a reference.


3RD ( STACK-DIAGRAM -- 1ST )

3RD is used in a stack diagram to specify input or output parameters which should have exactly the same data type as the third data type in the input parameter list of the same definition. Since the third basic data type of the input parameter list can be a part of the first or second input parameter, it is possible to build a reference to only the tail of a compound data type representing the first or second input parameter.

An exception is thrown if the input parameter list contains less than three basic data types or if the third basic data type is itself a reference.


: ( "<spaces>name" -- COLON-SYS )

Skip leading space delimiters. Parse name delimited by a space. Create a definition for name, called a colon definition. Enter compilation state and initialize the compiler data type heap and the local dictionary. Start the current definition, producing COLON-SYS. Append the initiation semantics given below to the current definition.

The execution semantics of name will be determined by the words compiled into the body of the definition. The current definition can not be found in the dictionary until it is finished or until the execution of DOES>.

Initiation: ( -- ) ( R: -- nest-sys )
Save information nest-sys about the calling definition.

name Execution: ( -- )
Execute the definition name.

Note that the new definition does have no stack effects by default. Stack effects have to be specified separately if they are intended. By using a stack diagram phrase ( ... -- ... ) immediately following : and the definition name, the new definition is modified to incorporate stack effects.


:NONAME ( -- DEFINITION COLON-SYS )

Create a definition DEFINITION, called a colon definition. Enter compilation state and initialize the compiler data type heap and the local dictionary. Start the current definition, producing COLON-SYS. Append the initiation semantics given below to the current definition.

The execution semantics of DEFINITION will be determined by the words compiled into the body of the definition.

Initiation: ( -- ) ( R: -- nest-sys )
Save information nest-sys about the calling definition.

Execution: ( -- )
Execute the definition specified by definition.

Note that the new definition does have no stack effects by default. Stack effects have to be specified separately if they are intended. By using a stack diagram phrase ( ... -- ... ) immediately following :NONAME, the new definition is modified to incorporate stack effects.


; ( COLON-SYS -- )

Interpretation:
An exception is thrown if ; is interpreted.

Compilation:
Append the runtime semantics given below to the current definition. End the current definition and enter interpretation state, consuming COLON-SYS. Re-initialize the local dictionary. Lock the compiler data type heap. An exception is thrown if the contents of the compiler data type heap does not exactly match the output parameters of the current definition.

Runtime: ( -- ) ( R: nest-sys -- )
If the compiler data type heap is not locked, return to the calling definition specified by nest-sys.

; is an immediate word.


; ( DOES-SYS -- )

Interpretation:
An exception is thrown if ; is interpreted.

Compilation:
Append the runtime semantics given below to the current definition. End the current definition and enter interpretation state, consuming DOES-SYS. Re-initialize the local dictionary. Lock the compiler data type heap. An ambiguous condition exists if the current definition has a name field and a link field. An exception is thrown if the contents of the compiler data type heap does not exactly match the output parameters of the current definition.

Runtime: ( -- ) ( R: nest-sys -- )
If the compiler data type heap is not locked, return to the calling definition specified by nest-sys.

; is an immediate word.


< ( INTEGER 1ST -- FLAG )

FLAG is true if and only if INTEGER is less than 1ST.


< ( SIGNED 1ST -- FLAG )

FLAG is true if and only if SIGNED is less than 1ST.


< ( ADDRESS 1ST -- FLAG )

FLAG is true if and only if ADDRESS is less than 1ST.


< ( INTEGER-DOUBLE 1ST -- FLAG )

FLAG is true if and only if INTEGER-DOUBLE is less than 1ST.


< ( SIGNED-DOUBLE 1ST -- FLAG )

FLAG is true if and only if SIGNED-DOUBLE is less than 1ST.


<# ( DOUBLE -- NUMBER-DOUBLE )

Initialize pictured numeric output conversion.


<> ( SINGLE 1ST -- FLAG )

FLAG is true if and only if SINGLE is not bit-for-bit identical with 1ST.


<> ( DOUBLE 1ST -- FLAG )

FLAG is true if and only if DOUBLE is not bit-for-bit identical with 1ST.


<DIAGRAM ( FLAG STACK-DIAGRAM -- 2ND )

Finish the creation of a stack diagram STACK-DIAGRAM and begin processing it. Store FLAG in STATE. An exception is thrown if the stack diagram is invalid.


<LOCALS ( -- )

Open the local dictionary. The local dictionary contains temporary definitions like locals, loop indices and R@.


= ( SINGLE 1ST -- FLAG )

FLAG is true if and only if SINGLE is bit-for-bit identical with 1ST.


= ( DOUBLE 1ST -- FLAG )

FLAG is true if and only if DOUBLE is bit-for-bit identical with 1ST.


> ( INTEGER 1ST -- FLAG )

FLAG is true if and only if INTEGER is greater than 1ST.


> ( SIGNED 1ST -- FLAG )

FLAG is true if and only if SIGNED is greater than 1ST.


> ( ADDRESS 1ST -- FLAG )

FLAG is true if and only if ADDRESS is greater than 1ST.


> ( INTEGER-DOUBLE 1ST -- FLAG )

FLAG is true if and only if INTEGER-DOUBLE is greater than 1ST.


> ( SIGNED-DOUBLE 1ST -- FLAG )

FLAG is true if and only if SIGNED-DOUBLE is greater than 1ST.


>BODY ( DEFINITION -- ADDRESS )

ADDRESS is the address of the data field of DEFINITION.


>DT ( DATA-TYPE -- )

Move the basic data type DATA-TYPE onto the data type heap. In interpretation state, the interpreter data type heap is used. In compilation state, the compiler data type heap is used. An exception is thrown if the data type heap overflows.


>IN ( -- ADDRESS -> UNSIGNED )

ADDRESS -> UNSIGNED is the address of a cell containing the offset in characters from the start of the input buffer to the start of the parse area.


>NUMBER ( INTEGER-DOUBLE CADDRESS -> CHARACTER UNSIGNED -- 1ST 2ND 4 TH )

1ST is the unsigned result of converting the characters within the string specified by CADDRESS -> CHARACTER UNSIGNED into digits, and adding each into INTEGER-DOUBLE after multiplying INTEGER-DOUBLE by the number-conversion radix in BASE. Conversion continues left-to-right until a character that is not convertible, including any + or -, is encountered or the string is entirely converted. 2ND is the location of the first unconverted character or the first character past the end of the string if the string was entirely converted. 4 TH is the number of unconverted characters in the string.


>R ( -- R-SIZE )

Interpretation:
An exception is thrown if >R is interpreted.

Compilation:
Create a local with name R@. Append the runtime semantics given below to the current definition. Return R-SIZE, the size of the local in cells.

Runtime: ( SINGLE -- ) or ( DOUBLE -- )
Store SINGLE or DOUBLE into the local R@.

>R is an immediate word.


>SIGN ( CHARACTER -- SIGNED )

SIGNED is +1 if CHARACTER is equal to '+', and -1 if CHARACTER is equal to '-'. For all other values of CHARACTER, SIGNED is 0.


>T ( TUPLE -> SINGLE 2ND -- 1ST )

Add 2ND to the tuple TUPLE -> SINGLE, increasing the size of TUPLE -> SINGLE by one cell.


>T ( TUPLE -> DOUBLE 2ND -- 1ST )

Add 2ND to the tuple TUPLE -> DOUBLE, increasing the size of TUPLE -> DOUBLE by two cells.


>TOKEN ( DEFINITION -- TOKEN )

TOKEN is the execution token of DEFINITION.


?CHECK-REFERENCES ( DEFINITION UNSIGNED 2ND -- 1ST 2ND 2ND )

Checks the references in the parameter list of DEFINITION. An exception is thrown if one of the parameters starting at the zero-based offset 2ND contains a reference to a parameter starting at the zero-based offset UNSIGNED. The values of the output parameters 1ST, 2ND and 2ND are identical to those of the respective input parameters DEFINITION, UNSIGNED and 2ND.

?CHECK-REFERENCES is used by (DOES) to ensure that the output parameter list of DEFINITION does not contain a reference to the last compound data type of the input parameter list.


?COMPILE ( -- )

Checks if in compilation state. An exception is thrown if the system is in interpretation state.


?CONGRUENT ( DEFINITION ADDRESS -> DATA-TYPE -- )

Checks if the contents of a part of the data type heap, starting at address ADDRESS -> DATA-TYPE and extending to the top of the heap, exactly match the output parameters of DEFINITION. The part is then removed from the data type heap. In compilation state, the compiler data type heap is used. In interpretation state, the interpreter data type heap is used. An exception is thrown if a difference is detected. ?CONGRUENT resolves data type references to the input parameters of DEFINITION.


?DATA-TYPE ( DEFINITION -- DATA-TYPE )

DATA-TYPE is the data type DEFINITION is associated with. If DEFINITION is not associated with any data type, DATA-TYPE is the null data type.


?DEFINITION ( DATA-TYPE -- DEFINITION )

DEFINITION is the definition that is associated with DATA-TYPE in the sense that DEFINITION is used in stack diagrams to specify the data type. If DATA-TYPE is not a data type, return zero as DEFINITION.


?DEFINITION ( WID -- DEFINITION )

DEFINITION is the vocabulary that corresponds to the word list identified by WID. If WID is not a valid word list, DEFINITION is the null definition.


?DO ( -- DO-SYS )

Interpretation:
An exception is thrown if ?DO is interpreted.

Compilation:
Place DO-SYS onto the stack and save a copy of the compiler data type heap. Rename the loop index I into J, if it already exists, and define a new local I as loop index. Append the runtime semantics given below to the current definition. The semantics are incomplete until resolved by a consumer of DO-SYS such as LOOP.

Runtime: ( INTEGER 1ST -- ) ( R: -- loop-sys ) or ( ADDRESS 1ST -- ) ( R: -- loop-sys )
If the limit INTEGER or ADDRESS is equal to the index 1ST, branch to the location given by the consumer of DO-SYS. Otherwise set up loop control parameters with limit INTEGER or ADDRESS and index 1ST, and continue execution.

?DO is an immediate word.


?DT>DT ( CADDRESS -> CHARACTER UNSIGNED -- TOKEN )

Find a definition with the name specified by the character string CADDRESS -> CHARACTER UNSIGNED in the dictionary. Only words are found whose stack diagram matches the compiler data type heap according to the criteria of MATCH. Change the compiler data type heap according to the stack effect of DEFINITION. Return TOKEN, which is the execution token of DEFINITION. An exception is thrown if ?DT>DT is interpreted, if the compiler data type heap is locked, or if no suitable word can be found in the dictionary.


?EXECUTE ( -- )

Checks if in interpretation state. An exception is thrown if the system is in compilation state.


?HAS-INPUT-PARAMS ( DEFINITION -- )

Throws an exception if DEFINITION does not have any input parameters.


?IS-EXECUTE ( DEFINITION -- )

Checks whether the name of DEFINITION is "EXECUTE". An exception is thrown if DEFINITION has a different name.

?IS-EXECUTE is used by ?TOKEN.


?LOOP ( -- ADDRESS -> DATA-TYPE )

Check whether loop control parameters are available and return the address ADDRESS -> DATA-TYPE of the data type of the loop index of the innermost loop. An exception is thrown if ?LOOP is interpreted or if the loop control parameters are unavailable.


?NONAME ( DEFINITION -- )

Checks if DEFINITION has a name and a link field. An exception is thrown if DEFINITION was defined by :NONAME.


?PARAMS ( -- )

If the data type heap is not locked, checks whether the contents of the data type heap exactly matches the output parameters of the latest definition, and then empties the data type heap. In compilation state, the compiler data type heap is used. In interpretation state, the interpreter data type heap is used. An exception is thrown if a difference is detected. ?PARAMS resolves references to the input parameters of the latest definition.

?PARAMS is used by EXIT.


?REFILL ( -- )

When the input source is a text file, re-read the current line from the file to the file input buffer. >IN remains unchanged.

Note: ?REFILL is used by words like INCLUDE, EVALUATE, which restore the input source specification after the file input buffer might have been overwritten.


?SAME-DATA-TYPE ( DATA-TYPE -- )

Remove one basic data type from the data type heap. In interpretation state, the interpreter data type heap is used. In compilation state, the compiler data type heap is used. An exception is thrown if the data type heap is empty, if the data type is the tail of a compound data type, or if the data type is not equal to DATA-TYPE.

?SAME-DATA-TYPE is used by ?TOKEN.


?SIZE ( DATA-TYPE -- UNSIGNED )

UNSIGNED is the size in cells of data type DATA-TYPE. An exception is thrown if the size of DATA-TYPE cannot be determined.


?SUBTOKEN ( DATA-TYPE -- )

Checks whether DATA-TYPE is a direct subtype of TOKEN. An exception is thrown if DATA-TYPE is not a direct subtype of TOKEN.

?SUBTOKEN is used by ?TOKEN.


?TOKEN ( DATA-TYPE "<spaces>name" -- TOKEN )

Skip leading space delimiters. Parse name delimited by a space. Find a definition called name whose stack diagram matches the stack diagram of the qualified token with respect to both input and output parameters, and return the token of this definition as TOKEN. An exception is thrown if DATA-TYPE is not the data type of a qualified token.


?VALUE ( CADDRESS -> CHARACTER UNSIGNED -- DEFINITION )

DEFINITION is the most recent word with the name specified by the character string CADDRESS -> CHARACTER UNSIGNED that was defined by VALUE. An exception is thrown if the dictionary does not contain such a word.


@ ( ADDRESS -> SINGLE -- 2ND )

2ND is the item stored at address ADDRESS -> SINGLE.


@ ( ADDRESS -> DOUBLE -- 2ND )

2ND is the double-cell item stored at address ADDRESS -> DOUBLE.


@ ( CADDRESS -> SINGLE -- 2ND )

2ND is the item stored at address CADDRESS -> SINGLE. Since the item is assumed to have character size, while 2ND has cell size, the value of the item is extended with leading zero bits.


@ ( CADDRESS -> SIGNED -- 2ND )

2ND is the signed number stored at address CADDRESS -> SIGNED. Since the number stored at CADDRESS -> SIGNED is assumed to have the character size, while 2ND has cell size, the number is sign extended.


@ ( CADDRESS -> FLAG -- 2ND )

2ND is the flag stored at address CADDRESS -> FLAG. Since the flag stored at CADDRESS -> FLAG is assumed to have character size, while 2ND has cell size, it is extended to either FALSE or TRUE.


@>DT ( ADDRESS -> DATA-TYPE -- )

Place the compound data type stored at ADDRESS -> DATA-TYPE onto the data type heap. In interpretation state, the interpreter data type heap is used. In compilation state, the compiler data type heap is used. An exception is thrown if there is not enough space on the data type heap.


ABORT ( -- )

Perform the function of -1 THROW.


ABORT" ( "ccc" -- )

Interpretation:
An exception is thrown if ABORT" is interpreted.

Compilation:
Parse ccc delimited by " (double-quote). Append the runtime semantics given below to the current definition.

Runtime: ( SINGLE -- )
Remove SINGLE from the stack.

If any bit of SINGLE is not zero, save CADDRESS -> CHARACTER and UNSIGNED, and then perform the function of -2 THROW.

ABORT" is an immediate word.


ABS ( SIGNED -- 1ST )

1ST is the absolute value of SIGNED.


ABS ( SIGNED-DOUBLE -- 1ST )

1ST is the absolute value of SIGNED-DOUBLE.


ACCEPT ( CADDRESS -> CHARACTER INTEGER -- 3RD )

Receive a character string of at most INTEGER characters at the address CADDRESS -> CHARACTER from the user input device. Display graphic characters as they are received. The usual editing functions that the system performs in order to construct the character string (backspace etc.), may be used.

Input terminates when a carriage return character is received. When input terminates, nothing is appended to the character string. The cursor advances to the beginning of the next line.

3RD is the length of the character string stored at CADDRESS -> CHARACTER.


ADDRESS ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type ADDRESS.


AGAIN ( DEST -- )

Interpretation:
An exception is thrown if AGAIN is interpreted.

Compilation:
Append the runtime semantics given below to the current definition, resolving the backward reference DEST. An exception is thrown if the contents of the compiler data type heap do not exactly match the copy that was saved when DEST was created.

Runtime: ( -- )
Continue execution at the location specified by DEST. If no other control flow words are used, any program code after AGAIN will not be executed.

AGAIN is an immediate word.


AHEAD ( -- ORIG )

Interpretation:
An exception is thrown if AHEAD is interpreted.

Compilation:
Place ORIG onto the stack and save a copy of the compiler data type heap. Append the runtime semantics given below to the current definition. The semantics are incomplete until ORIG is resolved.

Runtime: ( -- )
Continue execution at the location specified by the resolution of ORIG.

AHEAD is an immediate word.


ALIAS ( DEFINITION "<spaces>name1" -- )

Skip leading space delimiters. Parse name1 delimited by a space. Create a definition for name1 with the same execution semantics as DEFINITION. An exception is thrown if ALIAS is executed in compilation state.

ALIAS is typically used in the form ' name2 ALIAS ( ... -- ... ) to define an alias name or an overloaded version for an existing definition. The existing definition can be a colon-definition, a code definition or any other kind of definition. The stack diagrams of the existing definition and the alias definition may be different.


ALIGN ( -- )

If the first unused address of the data space is not aligned, reserve the required number of address units to make it aligned.


ALIGNED ( ADDRESS -- 1ST )

1ST is the lowest aligned address greater than or equal to ADDRESS.


ALL-PARAMS>DT ( DEFINITION UNSIGNED -- 1ST )

Push up to UNSIGNED data types from the input parameter list of DEFINITION onto the data type heap, starting with the first input parameter. Data type references within the input parameter list are being resolved by recursively pushing the referenced data types onto the data type heap. 1ST is equal to DEFINITION. An exception is thrown if the data type heap overflows.


ALLOT ( INTEGER -- )

If INTEGER is greater than zero, reserve INTEGER address units of the data space. If INTEGER is less than zero, release |integer| address units of the data space. If INTEGER is zero, leave the data space unchanged.

If the first unused address of the data space is aligned and INTEGER is a multiple of cell size in address units prior to execution of ALLOT, it will remain aligned when ALLOT finishes execution.

If the first unused address of the data space is character aligned and INTEGER is a multiple of character size in address units prior to execution of ALLOT, it will remain character aligned when ALLOT finishes execution.


ALSO ( -- )

Transform the search order consisting of wid1, wid2, ... widn (where wid1 is searched first) into wid1, wid1, wid2, ... widn. An exception is thrown if the search order is empty, or if there are too many word lists in the search order.


ANCESTOR ( DATA-TYPE -- 1ST )

If DATA-TYPE is the null data type, or has no parent data type, 1ST is equal to DATA-TYPE. Otherwise, 1ST is the data type with no parent, from which DATA-TYPE is a direct or indirect subtype.


AND ( SINGLE LOGICAL -- 1ST )

1ST is the bit-by-bit logical and of SINGLE with LOGICAL.


AND ( DATA-TYPE DATA-TYPE -- 1ST )

1ST is the first DATA-TYPE with attributes that are the bit-by-bit logical and of the attributes of both parameters DATA-TYPE.


ATTRIBUTE-FIELD ( SIGNED DEFINITION SINGLE -- 1ST )

1ST is equal to SIGNED if and only if the attribute field of DEFINITION has at least one of the attributes specified by SINGLE. Otherwise, 1ST is zero.

ATTRIBUTE-FIELD is used as a callback word that implements an additional matching criterion for SEARCH.


ATTRIBUTE? ( DATA-TYPE DATA-TYPE -- FLAG )

FLAG is true if and only if the first DATA-TYPE has at least one of the attributes of the second DATA-TYPE.


BASE ( -- ADDRESS -> UNSIGNED )

ADDRESS -> UNSIGNED is the address of a cell containing the current number-conversion radix (2...36).


BEGIN ( -- DEST )

Interpretation:
An exception is thrown if BEGIN is interpreted.

Compilation:
Place DEST onto the stack and save a copy of the compiler data type heap. Append the runtime semantics given below to the current definition.

Runtime: ( -- )
Continue execution.

BEGIN is an immediate word.


BIN ( FAM -- 1ST )

Modify FAM to additionally select a binary, i.e., not line oriented, file access method, giving 1ST.


BIT ( UNSIGNED -- LOGICAL )

Bit UNSIGNED of LOGICAL is 1. All other bits of LOGICAL are 0.


BL ( -- CHARACTER )

CHARACTER is the space character.


BLANK ( CADDRESS -> CHARACTER UNSIGNED -- )

If UNSIGNED is greater than zero, store the character value for space in UNSIGNED consecutive character positions beginning at CADDRESS -> CHARACTER.


BYE ( -- )

Terminate StrongForth and the ANS Forth host system and return control to the operating system.


C, ( SINGLE -- )

Reserve space for one character in the data space and store SINGLE in the space. If the first unused address of the data space is character aligned prior to execution of C,, it will remain character aligned when C, finishes execution. An ambiguous condition exists if the first unused address of the data space is not character aligned prior to execution of C,. Only the number of low-order bits corresponding to character size are stored in the data space.


CADDRESS ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type CADDRESS.


CASE ( -- CASE-SYS )

Interpretation:
An exception is thrown if CASE is interpreted.

Compilation:
Mark the start of a CASE ... OF ... ENDOF ... ENDCASE structure by putting CASE-SYS onto the stack, and save a copy of the compiler data type heap. Append the runtime semantics given below to the current definition.

CASE is an immediate word.

Runtime: ( -- )
Continue execution.


CASE-SYS ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type CASE-SYS.


CAST ( "<spaces>name" x -- y )

Skip leading space delimiters. Parse name delimited by a space. Convert x to y, where x is any data type and y is the data type identified by name. If x and y have the same size, the actual bit image is not changed. If x and y have different sizes, CAST uses S>D or D>S to adjust the size of y. An exception is thrown if name is not the name of a data type, if x is a tuple and y is not a tuple, or if y is a tuple and y is not a tuple.

CAST is an immediate word.


CATCH ( -- )

Interpretation: ( TOKEN -- SIGNED )
An exception is thrown if TOKEN is not a qualified token, or if the stack diagram associated with the qualified token contains one or more parameters of data type TUPLE or its direct or indirect subtypes. Create an exception frame and then execute the execution token TOKEN in such a way that control can be transferred to a point just after CATCH if THROW is executed during the execution of TOKEN. Adjust the interpreter data type heap according to the stack diagram associated with TOKEN.

If the execution of TOKEN completes normally (i.e., the exception frame created by CATCH is not destroyed by an execution of THROW) destroy the exception frame and return zero as SIGNED on top of the data stack, above whatever stack items would have been returned by executing TOKEN. Otherwise, the remainder of the execution semantics are given by THROW.

Compilation:
An exception is thrown if the top of the compiler data type heap does not contain a qualified token, or if the stack diagram associated with the qualified token contains one or more parameters of data type TUPLE or its direct or indirect subtypes. Adjust the compiler data type heap according to the stack diagram associated with the qualified token. Append the runtime semantics given below to the current definition.

Runtime: ( TOKEN -- SIGNED )
Create an exception frame and then execute the execution token TOKEN in such a way that control can be transferred to a point just after CATCH if THROW is executed during the execution of TOKEN.

If the execution of TOKEN completes normally (i.e., the exception frame created by CATCH is not destroyed by an execution of THROW) pop the exception frame and return zero as SIGNED on top of the data stack, above whatever stack items would have been returned by executing TOKEN. Otherwise, the remainder of the execution semantics are given by THROW.

CATCH is an immediate word.


CELLS ( INTEGER -- 1ST )

1ST is the size in address units of INTEGER cells.


CHAR ( "<spaces>name" -- CHARACTER )

Skip leading space delimiters. Parse name delimited by a space. Put the value of name's first character onto the stack. If the length of the parsed area is zero, put a space character onto the stack.


CHARACTER ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type CHARACTER.


CHARS ( INTEGER -- 1ST )

1ST is the size in address units of INTEGER characters.


CLOSE ( FILE -- SIGNED )

Close the file identified by FILE. SIGNED is the I/O result code.


COLON-SYS ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type COLON-SYS.


COMPARE ( CADDRESS -> CHARACTER UNSIGNED 1ST 3RD -- SIGNED )

Compare the string specified by CADDRESS -> CHARACTER UNSIGNED to the string specified by 1ST 3RD. The strings are compared, beginning at the given addresses, character by character, up to the length of the shorter string or until a difference is found. If the two strings are identical, SIGNED is zero. If the two strings are identical up to the length of the shorter string, SIGNED is -1 if UNSIGNED is less than 3RD, and 1 otherwise. If the two strings are not identical up to the length of the shorter string, SIGNED is -1 if the first non-matching character in the string specified by CADDRESS -> CHARACTER UNSIGNED has a lesser numeric value than the corresponding character in the string specified by 1ST 3RD, and 1 otherwise.


COMPILE, ( DEFINITION -- )

Change the compiler data type heap according to the stack effect of DEFINITION. Append the execution semantics of DEFINITION to the execution semantics of the current definition.


CONSTANT ( SINGLE "<spaces>name" -- )

Skip leading space delimiters. Parse name delimited by a space. Create a definition for name with the execution semantics defined below.

name is referred to as a constant.

Execution: ( -- SINGLE )
Place SINGLE on the stack. SINGLE has the same data type as was supplied to CONSTANT.


CONSTANT ( DOUBLE "<spaces>name" -- )

Skip leading space delimiters. Parse name delimited by a space. Create a definition for name with the execution semantics defined below.

nameis referred to as a constant.

Execution: ( -- DOUBLE )
Place DOUBLE on the stack. DOUBLE has the same data type as was supplied to CONSTANT.


CONTEXT ( -- ADDRESS -> WID )

ADDRESS -> WID is the address of a number of cells that contain the identifiers of the word lists that constititute the search order. The first word list to be searched is the one whose identifier is stored at ADDRESS -> WID.


CONTROL-FLOW ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type CONTROL-FLOW.


CR ( -- )

Cause subsequent output to appear at the beginning of the next line.


CREATE ( "<spaces>name" -- )

Skip leading space delimiters. Parse name delimited by a space. Create a new definition for name with the execution semantics defined below, and make it the latest definition. CREATE does not allocate space in the definition's data field. An exception is thrown if CREATE is executed in compilation state.

name Execution: ( -- )
Execute the definition name. The default execution semantics of the new definition is returning the address of its data field.

Note that the stack diagram of the new definition has to be explicitly specified as ( -- ADDRESS -> data-type ) or ( -- CADDRESS -> data-type ), where data-type is the data type of the item stored in the data field. The execution semantics may be extended by DOES>.


CREATE ( CADDRESS -> CHARACTER UNSIGNED FAM -- FILE SIGNED )

Create the file named in the character string CADDRESS -> CHARACTER UNSIGNED, and open it with file access method FAM. If a file with the same name already exists, recreate it as an empty file. If the file was successfully created and opened, SIGNED is zero, FILE is its identifier, and the file has been positioned to the start of the file. Otherwise, SIGNED is the I/O result code and FILE is undefined.


CREATE-LOCAL ( CADDRESS -> CHARACTER UNSIGNED -- )

Create a new definition for a local with the name specified by the string CADDRESS -> CHARACTER UNSIGNED. CREATE-LOCAL expects the data type of the local to be present on top of the data type heap. An exception is thrown if CREATE-LOCAL is executed in interpretation state.


D>S ( DOUBLE -- SINGLE )

SINGLE is the numeric equivalent of DOUBLE. An ambiguous condition exists if DOUBLE lies outside the range of a single number.


DATA-TYPE ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type DATA-TYPE.


DECIMAL ( -- )

Set the number-conversion radix to 10 (decimal).


DEFER ( "<spaces>name" -- )

Skip leading space delimiters. Parse name delimited by a space. Create a new definition for name with the execution semantics defined below, and make it the latest definition. An exception is thrown if DEFER is executed in compilation state.

name Execution: ( -- )
Execute the definition that is being assigned to name by a succeeding execution of IS. name is called a deferred definition. An ambiguous condition exists if name is executed before it is being assigned an execution semantics by IS.

Note that the new definition does have no stack effects by default. Stack effects have to be specified separately if they are intended. By using a stack diagram phrase ( ... -- ... ) immediately following DEFER and the definition name, the new definition is modified to incorporate stack effects.


DEFERRED ( SIGNED DEFINITION SINGLE -- 1ST )

1ST is equal to SIGNED if and only if DEFINITION is a deferred word and its stack diagram is exactly the same as the stack diagram of DEFINITION. Otherwise, 1ST is zero.

DEFERRED is used as a callback word that implements an additional matching criterion for SEARCH.


DEFINITION ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type DEFINITION.


DEFINITIONS ( -- )

Make the compilation word list the same as the first word list in the search order. Specifies that the names of subsequent definitions will be placed in the compilation word list. Subsequent changes in the search order will not affect the compilation word list.


DELETE ( CADDRESS -> CHARACTER UNSIGNED -- SIGNED )

Delete the file named in the character string CADDRESS -> CHARACTER UNSIGNED. SIGNED is the I/O result code.


DEPTH ( -- UNSIGNED )

UNSIGNED is the number of basic data types on the data type heap. In interpretation state, the interpreter data type heap is used. In compilation state, the compiler data type heap is used.

Note: In interpretation state, UNSIGNED includes the output parameters of the word that is currently being interpreted.

Note: In compilation state, UNSIGNED is zero if the compiler data type heap is locked.


DEPTH-SP ( -- UNSIGNED )

UNSIGNED is the depth of the data stack in cells, calculated from the contents of the data type heap. In interpretation state, the interpreter data type heap is used. In compilation state, the compiler data type heap is used. An exception is thrown if the depth of the data stack cannot be determined.

Note: In interpretation state, UNSIGNED includes the output parameters of the word that is currently being interpreted. UNSIGNED equals the actual number of cells on the data stack only if the data stack and the interpreter data type heap are aligned.

Note: In compilation state, UNSIGNED is zero if the compiler data type heap is locked.


DEST ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type DEST.


DIAGRAM> ( STACK-DIAGRAM -- )

Finish processing a stack diagram STACK-DIAGRAM.


DICT, ( SINGLE -- )

Reserve one cell in the dictionary and store SINGLE in the cell. If the first unused address of the dictionary is aligned prior to execution of ,, it will remain aligned when , finishes execution. An ambiguous condition exists if the first unused address of the dictionary is not aligned prior to execution of ,.


DICT, ( DOUBLE -- )

Reserve two cells in the dictionary and store DOUBLE in the cells. If the first unused address of the dictionary is aligned prior to execution of ,, it will remain aligned when , finishes execution. An ambiguous condition exists if the first unused address of the dictionary is not aligned prior to execution of ,.


DICT-ALIGN ( -- )

If the first unused address of the dictionary is not aligned, reserve the required number of address units to make it aligned.


DICT-ALLOT ( INTEGER -- )

If INTEGER is greater than zero, reserve INTEGER address units of the dictionary. If INTEGER is less than zero, release |integer| address units of the dictionary. If INTEGER is zero, leave the data dictionary unchanged.

If the first unused address of the dictionary is aligned and INTEGER is a multiple of cell size in address units prior to execution of DICT-ALLOT, it will remain aligned when ALLOT finishes execution.

If the first unused address of the dictionary is character aligned and INTEGER is a multiple of character size in address units prior to execution of ALLOT, it will remain character aligned when DICT-ALLOT finishes execution.


DICT-HERE ( -- ADDRESS )

ADDRESS is the first unused address of the dictionary.


DICT-NAME, ( CADDRESS -> CHARACTER UNSIGNED -- )

Reserve space for a counted string with UNSIGNED characters in the dictionary and store the string CADDRESS -> CHARACTER UNSIGNED in the space. If the dictionary is character aligned when DICT-NAME, begins execution, it will remain character aligned when DICT-NAME, finishes execution. An ambiguous condition exists if the first unused address of the dictionary is not character aligned prior to execution of ",. An exception is thrown if UNSIGNED exceeds the maximum length of a counted string, or if the dictionary overflows.


DO ( -- DO-SYS )

Interpretation:
An exception is thrown if DO is interpreted.

Compilation:
Place DO-SYS onto the stack and save a copy of the compiler data type heap. Rename the loop index I into J, if it already exists, and define a new local I as loop index. Append the runtime semantics given below to the current definition. The semantics are incomplete until resolved by a consumer of DO-SYS such as LOOP.

Runtime: ( INTEGER 1ST -- ) ( R: -- loop-sys ) or ( ADDRESS 1ST -- ) ( R: -- loop-sys )
Set up loop control parameters with limit INTEGER or ADDRESS and index 1ST, and continue execution.

DO is an immediate word.


DO-SYS ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type DO-SYS.


DOES-SYS ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type DOES-SYS.


DOES> ( COLON-SYS -- DOES-SYS )

Interpretation:
An exception is thrown if DOES> is interpreted.

Compilation:
Append the runtime semantics given below to the current definition. An exception is thrown if the contents of the compiler data type heap does not exactly match the output parameters of the current definition. Consume COLON-SYS and produce DOES-SYS.

Runtime: ( R: nest-sys1 -- )
Specify the execution semantics of the most recent definition, referred to as name, as given below. Return control to the calling definition specified by nest-sys1.

Initiation: ( -- ADDRESS ) ( R: -- nest-sys2 )
Save information nest-sys2 about the calling definition. Place name's data field address ADDRESS on the stack.

name Execution: ( -- )
Execute the portion of the definition that begins with the initiation semantics appended by the DOES> which modified name.

Note that name does have no stack effects by default. Stack effects have to be specified separately. By using a stack diagram phrase ( ... -- ... ) immediately following DOES>, name is modified to incorporate stack effects. Specifying a stack diagram is mandatory, because at least the data type of name's data field address has to be present. The data field address is always the last input parameter. The stack effect of name is defined by the stack diagram following DOES>, while omitting the data field address.

DOES> is an immediate word.


DOUBLE ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type DOUBLE. DOUBLE is an ancestor data type.


DROP ( SINGLE -- )

Remove SINGLE from the stack.


DROP ( DOUBLE -- )

Remove DOUBLE from the stack.


DROP ( TUPLE -- )

Remove TUPLE from the stack.


DROP-S ( -- )

Change the compiler data type heap according to the stack effect of the word (DROP-S). An exception is thrown if DROP-S is interpreted, if the compiler data type heap is locked, or if (DROP-S) can not be found in the dictionary.


DROP-S' ( -- )

Change the compiler data type heap according to the stack effect of the word (DROP-S'). An exception is thrown if DROP-S is interpreted, if the compiler data type heap is locked, or if (DROP-S') can not be found in the dictionary.


DT ( "<spaces>name" -- DATA-TYPE )

Skip leading space delimiters. Parse name delimited by a space. Find name and return DATA-TYPE, the data type with the name name. An exception is thrown if name is not the name of a data type


DT+ ( ADDRESS -> DATA-TYPE -- 1ST )

1ST is the address of the location immediately succeeding the compound data type starting at ADDRESS -> DATA-TYPE.


DT-INPUT ( -- DATA-TYPE )

DATA-TYPE is a null data type with the input parameter attribute.


DT-OFFSET ( -- DATA-TYPE )

DATA-TYPE is a null data type containing a bit mask for the offset attribute field.


DT-OUTPUT ( -- DATA-TYPE )

DATA-TYPE is a null data type with the output parameter attribute.


DT-PREFIX ( -- DATA-TYPE )

DATA-TYPE is a null data type with the prefix attribute.


DT> ( -- DATA-TYPE FLAG )

Move the topmost basic data type DATA-TYPE of the data type heap onto the stack. In interpretation state, the interpreter data type heap is used. In compilation state, the compiler data type heap is used. FLAG is true if DATA-TYPE is the tail of a compound data type that is still on the data type heap. An exception is thrown if the data type heap is empty prior to the execution of DT>.


DT>DT ( DEFINITION FLAG -- TOKEN )

If FLAG is false, change the interpreter data type heap according to the stack effect of DEFINITION. If FLAG is true, change the compiler data type heap according to the stack effect of DEFINITION. Return TOKEN, which is the execution token of DEFINITION. An exception is thrown if the compiler data type heap is locked.

Note: DT>DT works correctly even if DEFINITION is unfinished.


DTDROP ( -- DATA-TYPE )

Remove the topmost compound data type from the data type heap. In interpretation state, the interpreter data type heap is used. In compilation state, the compiler data type heap is used. DATA-TYPE is the head of the removed compound data type. An exception is thrown if the data type heap is empty prior to the execution of DTDROP.


DTP! ( -- )

In interpretation state, empty the interpreter data type heap. In compilation state, empty and unlock the compiler data type heap.


DTP@ ( -- ADDRESS -> DATA-TYPE )

In interpretation state, ADDRESS -> DATA-TYPE is the interpreter data type heap pointer. In compilation state, ADDRESS -> DATA-TYPE is the compiler data type heap pointer, or zero if the compiler data type heap is locked.


DTP| ( -- )

If in compilation state, lock the compiler data type heap. The compiler data type heap can not be used until it is unlocked by executing DTP!.

Note: DTP| is typically used by AHEAD, AGAIN or EXIT, because these words break the continuous flow of execution.


DUP ( SINGLE -- 1ST 1ST )

Duplicate SINGLE.


DUP ( DOUBLE -- 1ST 1ST )

Duplicate DOUBLE.


ELSE ( ORIG -- 1ST )

Interpretation:
An exception is thrown if ELSE is interpreted.

Compilation:
Place 1ST onto the stack and save a copy of the compiler data type heap. Append the runtime semantics given below to the current definition. The semantics are incomplete until 1ST is resolved (e. g., by THEN). Resolve the forward reference ORIG using the location following the appended runtime semantics. Restore the compiler data type heap to the state that was saved when ORIG was created.

Runtime: ( -- )
Continue execution at the location given by the resolution of 1ST.

ELSE is an immediate word.


EMIT ( INTEGER -- )

If INTEGER is the ASCII code of a graphic character, display this graphic character. The effect of EMIT for all other values of INTEGER is undefined.


ENCLOSE ( CHARACTER CADDRESS -> 1ST UNSIGNED 4 TH -- 2ND 4 TH 4 TH 4 TH )

Parse the character string CADDRESS -> 1ST of length 4 TH starting at offset UNSIGNED. Return the address of the original character string 2ND, the original start offset 4 TH, the offset 4 TH of the character after the last non-delimiter character in sequence and the offset 4 TH of the first character not included in parsing.

CHARACTER is the delimiter.

ENCLOSE is used by PARSE.


ENCLOSE-DIAGRAM ( STACK-DIAGRAM -- 1ST ADDRESS -> DATA-TYPE ADDRESS -> DATA-TYPE )

The first ADDRESS -> DATA-TYPE is the first unused address of the dictionary. The second ADDRESS -> DATA-TYPE is the address of the first basic data type of a stack diagram STACK-DIAGRAM that has been compiled into the dictionary. STACK-DIAGRAM remains unchanged.

ENCLOSE-DIAGRAM is typically used immediately after DIAGRAM>, for calculating the loop limit and the loop index of a DO loop which processes the stack diagram.


ENCLOSE-PARAMS ( DEFINITION UNSIGNED -- 1ST 2ND 2ND )

Scan the parameter list of DEFINITION, starting with the basic data type with index UNSIGNED. indices start with 0. The first 2ND is the maximum of UNSIGNED and the index of the last compound data type in the input parameter list. The second 2ND is the index of the first compound data type of the output parameter list. If the output parameter list is empty, the second 2ND is equal to the length of the parameter list. An ambiguous condition exists if UNSIGNED is greater than the length of the parameter list.


ENCLOSE-WORD ( CADDRESS -> CHARACTER UNSIGNED 3RD -- 1ST 3RD 3RD 3RD )

Parse the character string CADDRESS -> CHARACTER of length 3RD starting at offset UNSIGNED. Return the address of the original character string 1ST, the offset 3RD to the first non-delimiter character which is greater than or equal to UNSIGNED, the offset 3RD of the character after the last non-delimiter character in sequence and the offset 3RD of the first character not included in parsing.

Delimiters are the space character and any character with an ASCII value less than that of a space character.

ENCLOSE-WORD is used by PARSE-WORD.


END-DEF ( -- )

Make the latest definition visible for SEARCH and SEARCH-ALL by linking it to the current compilation word list.


END-DIAGRAM ( STACK-DIAGRAM -- )

Finish the creation of a stack diagram by storing the offset attribute of STACK-DIAGRAM in the attribute field of the latest definition.


ENDCASE ( CASE-SYS -- )

Interpretation:
An exception is thrown if ENDCASE is interpreted.

Compilation:
Mark the end of a CASE ... OF ... ENDOF ... ENDCASE structure. Use CASE-SYS to resolve the entire structure. Compare the current contents of the compiler data type heap with the one that was saved by the first ENDOF. An exception is thrown if a difference is detected. Append the runtime semantics given below to the current definition.

Runtime: ( SINGLE -- )
Discard the case selector SINGLE and continue execution.

ENDCASE is an immediate word.


ENDOF ( CASE-SYS OF-SYS -- 1ST )

Interpretation:
An exception is thrown if ENDOF is interpreted.

Compilation:
Resolve the reference given by OF-SYS. Append the runtime semantics given below to the current definition. If this is the first occurrence of ENDOF within a CASE structure, save the contents of the compiler data type heap. Otherwise, compare the current contents of the compiler data type heap with the one that was saved by the first ENDOF. An exception is thrown if a difference is detected.

Runtime: ( -- )
Continue execution at the location specified by the consumer of 2ND.

ENDOF is an immediate word.


ENVIRONMENT ( -- )

Replace the first word list in the search order with the ENVIRONMENT-WORDLIST word list.

ENVIRONMENT is a vocabulary.


ENVIRONMENT-WORDLIST ( -- WID )

WID is the identifier of the word list that includes all environment query keywords and their corresponding values.


ENVIRONMENT? ( CADDRESS -> CHARACTER UNSIGNED -- ADDRESS FLAG )

CADDRESS -> CHARACTER is the address of a character string and UNSIGNED is the string's character count. UNSIGNED may have a value in the range from zero to 31. The character string should contain an ANS Forth environment query keyword to be checked for correspondence with an attribute of the present environment. If the system treats the attribute as unknown, ADDRESS is undefined and FLAG is FALSE. Otherwise, ADDRESS is address of the attribute value and FLAG is TRUE.


ERASE ( ADDRESS -> SINGLE UNSIGNED -- )

If UNSIGNED is not equal to zero, clear all bits in each of UNSIGNED consecutive cells of memory beginning at ADDRESS -> SINGLE. An ambiguous condition exists if ADDRESS -> SINGLE is not aligned.


ERASE ( ADDRESS -> DOUBLE UNSIGNED -- )

If UNSIGNED is not equal to zero, clear all bits in each of UNSIGNED consecutive double cells of memory beginning at ADDRESS -> DOUBLE. An ambiguous condition exists if ADDRESS -> DOUBLE is not aligned.


ERASE ( CADDRESS -> SINGLE UNSIGNED -- )

If UNSIGNED is not equal to zero, clear all bits in each of UNSIGNED consecutive characters beginning at CADDRESS -> SINGLE. An ambiguous condition exists if ADDRESS -> DOUBLE is not character aligned.


EVALUATE ( CADDRESS -> CHARACTER UNSIGNED -- )

Save the current input source specification. Store STRING-ID in SOURCE-ID. Make the string CADDRESS -> CHARACTER UNSIGNED both the input source and input buffer, set >IN to zero, and interpret. When the parse area is empty, restore the prior input source specification. Other stack effects are due to the words evaluated.


EXIT ( -- )

Interpretation:
An exception is thrown if EXIT is interpreted.

Compilation:
Append the runtime semantics given below to the current definition. An exception is thrown if the contents of the compiler data type heap does not exactly match the output parameters of the current definition.

Runtime: ( -- ) ( R: nest-sys -- )
Return to the calling definition specified by nest-sys.

EXIT is an immediate word.


FALSE ( -- FLAG )

FLAG is a false flag, a single-cell item with all bits set to 0.


FAM ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type FAM.


FIB ( -- CADDRESS -> CHARACTER )

CADDRESS -> CHARACTER is the address of the file input buffer. The file input buffer is 1024 characters long.


FILE ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type FILE.


FILL ( ADDRESS -> SINGLE UNSIGNED 2ND -- )

If UNSIGNED is not equal to zero, store 2ND in each of UNSIGNED consecutive cells of memory beginning at ADDRESS -> SINGLE. An ambiguous condition exists if ADDRESS -> SINGLE is not aligned.


FILL ( ADDRESS -> DOUBLE UNSIGNED 2ND -- )

If UNSIGNED is not equal to zero, store 2ND in each of UNSIGNED consecutive double cells of memory beginning at ADDRESS -> DOUBLE. An ambiguous condition exists if ADDRESS -> DOUBLE is not aligned.


FILL ( CADDRESS -> SINGLE UNSIGNED 2ND -- )

If UNSIGNED is not equal to zero, store 2ND in each of UNSIGNED consecutive characters beginning at CADDRESS -> SINGLE. Only the number of low-order bits corresponding to character size are transferred. An ambiguous condition exists if ADDRESS -> SINGLE is not character aligned.


FIRST ( WID -- DEFINITION )

DEFINITION is the first created definition of the word list identified by WID.


FLAG ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type FLAG.


FLUSH ( FILE -- SIGNED )

Attempt to force any buffered information written to the file referred to by FILE to be written to mass storage, and the size information for the file to be recorded in the storage directory if changed. If the operation is successful, SIGNED is zero. Otherwise, it is the I/O result code.


FM/MOD ( SIGNED-DOUBLE SIGNED -- 2ND SIGNED )

Divide SIGNED-DOUBLE by SIGNED, giving the floored quotient SIGNED and the remainder 2ND. An ambiguous condition exists if SIGNED is zeroor if the quotient lies outside the range of a signed single-precision number.


FORGET-LOCAL ( -- )

Remove the most recently defined local from the local wordset.


FORTH ( -- )

Replace the first word list in the search order with the FORTH-WORDLIST word list.

FORTH is a vocabulary.


FORTH-WORDLIST ( -- WID )

WID is the identifier of the word list that includes all standard words provided by StrongForth. This word list is initially the compilation word list and is part of the initial search order.


FREEZE ( -- CONTROL-FLOW )

Create a structure CONTROL-FLOW, which is a copy of the present compiler data type heap. An exception is thrown if there's not enough memory to create a copy of the compiler data type heap.

Note: CONTROL-FLOW includes information about whether the compiler data type heap is locked.


GET-CURRENT ( -- WID )

WID is the identifier of the compilation word list.

Note: By default, the compilation word list is identical to the FORTH-WORDLIST word list.


GET-ORDER ( -- TUPLE -> WID )

TUPLE -> WID is a tuple containing the identifiers of the word lists in the search order. The first identifier in the tuple identifies the word list that is searched first. The search order is unaffected.


HERE ( -- ADDRESS )

ADDRESS is the first unused address of the data space.


HEX ( -- )

Set the number-conversion radix to 16 (hexadecimal).


HOLD ( CHARACTER -- )

Add CHARACTER to the beginning of the pictured numeric output string. An ambiguous condition exists if HOLD executes outside of a <# ... #> delimited pictured numeric output conversion.


IDENTITY ( SIGNED DEFINITION SINGLE -- 1ST )

1ST is equal to SIGNED if and only if the stack diagram of DEFINITION is exactly the same as the temporary stack diagram stored at the top of the data space. Otherwise, 1ST is zero.

IDENTITY is used as a callback word that implements an additional matching criterion for SEARCH.


IF ( -- ORIG )

Interpretation:
An exception is thrown if IF is interpreted.

Compilation:
Place ORIG onto the stack and save a copy of the compiler data type heap. Append the runtime semantics given below to the current definition. The semantics are incomplete until ORIG is resolved, e. g., by THEN or ELSE.

Runtime: ( SINGLE -- )
If SINGLE is zero, continue execution at the location specified by the resolution of ORIG.

IF is an immediate word.


IMMEDIATE ( -- )

Make the latest definition an immediate word.


IMMEDIATE? ( DEFINITION -- FLAG )

FLAG is true if and only if DEFINITION is an immediate word.


IMPORT ( TOKEN "<spaces>name" -- )

Skip leading space delimiters. Parse name delimited by a space. Create a new definition for name and make it the latest definition. Make the word visible for SEARCH and SEARCH-ALL by linking it to the current compilation word list. Set the immediate attribute in the new definition's attribute field. TOKEN is the execution token of the new definition.

Note that the new definition does have no stack effects by default. Stack effects have to be specified separately if they are intended. By using a stack diagram phrase ( ... -- ... ) immediately following : and the definition name, the new definition is modified to incorporate stack effects.


INCLUDE ( CADDRESS -> CHARACTER UNSIGNED -- )

Remove CADDRESS -> CHARACTER UNSIGNED from the stack. Save the current input source specification, including the value of SOURCE-ID. Open the file specified by CADDRESS -> CHARACTER UNSIGNED, store the resulting file identifier in SOURCE-ID, and make it the input source. Other stack effects are due to the words included.

Repeat until end of file: read a line from the file, fill the input buffer from the contents of that line, set >IN to zero, and interpret. Text interpretation begins at the file position where the next file read would occur. When the end of the file is reached, close the file and restore the input source specification to its saved value. An exception is thrown if the named file can not be opened, if an I/O exception occurs reading the file, or if an I/O exception occurs while closing the file. When an exception is thrown, the status (open or closed) of any files that were being interpreted is undefined.


INCLUDE ( FILE -- )

Remove FILE from the stack. Save the current input source specification, including the value of SOURCE-ID. Store FILE in SOURCE-ID. Make the file specified by FILE the input source. Other stack effects are due to the words included.

Repeat until end of file: read a line from the file, fill the input buffer from the contents of that line, set >IN to zero, and interpret. Text interpretation begins at the file position where the next file read would occur. When the end of the file is reached, close the file and restore the input source specification to its saved value. An exception is thrown if FILE is invalid, if there is an I/O exception reading FILE, or if an I/O exception occurs while closing FILE. When an exception is thrown, the status (open or closed) of any files that were being interpreted is undefined.


INPUT-SOURCE ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type INPUT-SOURCE.


INTEGER ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type INTEGER.


INTEGER-DOUBLE ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type INTEGER-DOUBLE.


INTERPRET ( -- )

Interpret the contents of the parse area.


INVERT ( LOGICAL -- 1ST )

Invert all bits of LOGICAL, giving its logical inverse 1ST.


INVERT ( DATA-TYPE -- 1ST )

1ST is DATA-TYPE with attributes that are the logical inverse of the attributes of DATA-TYPE.


IS ( DEFINITION "<spaces>name" -- )

Skip leading space delimiters. Parse name delimited by a space. Find a deferred definition name whose stack diagram is identical to the one of DEFINITION. Assign the execution semantics of DEFINITION to name. An exception is thrown if no deferred definition with name name exists whose stack diagram is identical to the one of DEFINITION, if DEFINITION is unfinished, or if name is unfinished.

Deferred definitions are words defined by DEFER.


KEY ( -- CHARACTER )

Receive one character CHARACTER from the user input device.

All standard characters can be received. Characters received by KEY are not displayed.


LAST ( WID -- DEFINITION )

DEFINITION is the most recently created definition of the word list identified by WID.


LATEST ( -- DEFINITION )

DEFINITION is the latest compiled definition.


LATEST! ( -- )

Update LATEST after compilation of the name and link fields of a new definition. This makes the new definition the latest definition. An ambiguous condition exists if the data space has changed between the compilation of the name and link fields and the execution of LATEST!.

LATEST! is used by (CREATE) and (CREATE-NONAME).


LEAVE ( -- )

Interpretation:
An exception is thrown if LEAVE is interpreted.

Compilation:
An exception is thrown if the contents of the compiler data type heap do not exactly match the copy that was saved when the current loop control parameters were created. Lock the compiler data type heap. Append the runtime semantics given below to the current definition.

Runtime: ( -- ) ( R: loop-sys -- )
Discard the current loop control parameters. An ambiguous condition exists if they are unavailable. Continue execution immediately following the innermost syntactically enclosing DO ... LOOP or DO ... +LOOP.

LEAVE is an immediate word.


LITERAL ( SINGLE -- )

Interpretation:
An exception is thrown if LITERAL is interpreted.

Compilation:
Append the runtime semantics given below to the current definition.

Runtime: ( -- SINGLE )
Place SINGLE on the stack. SINGLE has the same data type as was supplied at compilation time.

LITERAL is an immediate word.


LITERAL ( DOUBLE -- )

Interpretation:
An exception is thrown if LITERAL is interpreted.

Compilation:
Append the runtime semantics given below to the current definition.

Runtime: ( -- DOUBLE )
Place DOUBLE on the stack. DOUBLE has the same data type as was supplied at compilation time.

LITERAL is an immediate word.


LITERAL, ( SINGLE -- )

Append the runtime semantics given below to the current definition.

Runtime: ( -- SINGLE )
Place SINGLE on the stack.

Note: LITERAL, does not change the compiler data type heap.


LITERAL, ( DOUBLE -- )

Append the runtime semantics given below to the current definition.

Runtime: ( -- DOUBLE )
Place DOUBLE on the stack.

Note: LITERAL, does not change the compiler data type heap.


LOCAL ( -- )

Replace the first word list in the search order with the LOCAL-WORDLIST word list.

LOCAL is a vocabulary.


LOCAL-WORDLIST ( -- WID )

WID is the identifier of the local word list. This word list contains all locals that are temporarily defined during compilation of a word.


LOCAL, ( CADDRESS -> CHARACTER UNSIGNED ADDRESS -> DATA-TYPE -- )

Interpretation:
An exception is thrown if LOCAL, is interpreted.

Compilation:
Append the runtime semantics given below to the current definition. CADDRESS -> CHARACTER UNSIGNED is a character string that contains the name of a local. ADDRESS -> DATA-TYPE is the address of the data type of the local. An exception is thrown if the size of the data type is not equal to 1 or 2 cells.

Runtime: ( -- x )
Push the value of local x onto the data stack.

Note: x can be either SINGLE or DOUBLE.


LOCALS> ( -- )

Close the local dictionary. The local dictionary contains temporary definitions like locals, loop indices and R@.


LOCALS| ( COLON-SYS "<spaces>name1<spaces>name2 ... <spaces>namen |" -- 1ST )

Interpretation:
An exception is thrown if LOCALS| is interpreted.

Compilation:
Create n local identifiers by repeatedly skipping leading spaces, parsing name, and executing (LOCAL). The list of locals to be defined is terminated by |. An exception is thrown if the list of locals is not terminated by |. Append the runtime semantics given below to the current definition.

COLON-SYS is a dummy parameter that prevents LOCALS| to be used within loops, in conditional clauses, or between >R and R>. 1ST is equal to COLON-SYS.

Runtime: ( xn ... x2 x1 -- )
Initialize n local identifiers, each of which takes as its initial value the top stack item, removing it from the stack. Identifier name1 is initialized with x1, identifier name2 with x2, etc. When invoked, each local will return its value. The value of a local may be changed using TO.

Note: xn ... x2 x1 can be either SINGLE or DOUBLE.

LOCALS| is an immediate word.


LOGICAL ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type LOGICAL.


LOOP ( DO-SYS -- )

Interpretation:
An exception is thrown if LOOP is interpreted.

Compilation:
Append the runtime semantics given below to the current definition. Resolve both the forward and the backward reference of DO-SYS. Forget the loop index I, which is assumed to be the latest local. Rename the loop index J, if it exists, to I. An exception is thrown if the contents of the compiler data type heap do not exactly match the copy that was saved when DO-SYS was created.

Runtime: ( -- ) ( R: loop-sys1 -- | loop-sys2 )
An ambiguous condition exists if the loop control parameters are unavailable. Add one* to the loop index. If the loop index is then equal to the loop limit, discard the loop control parameters and continue execution. Otherwise, branch to the beginning of the loop.

* Note: LOOP takes regard of the data type of the loop index. If the loop index is an address of a single cell, the size of a single cell in address units is added to the loop index. If the loop index is an address of a double cell, the size of a double cell in address units is added to the loop index. If the loop index is a character address, the size of a character in address units is added to the loop index.

LOOP is an immediate word.


LOOP, ( DO-SYS TOKEN -- )

If TOKEN is the execution token of NOOP, execute LOOP. Otherwise, compile TOKEN and execute +LOOP. An ambiguous condition exists if TOKEN is not the execution token of one of the versions of (STEP-S)


LSHIFT ( LOGICAL -- 1ST )

Perform a logical left shift of one bit-place on LOGICAL, giving 1ST. Put zero into the least significant bit vacated by the shift.


LSHIFT ( LOGICAL UNSIGNED -- 1ST )

Perform a logical left shift of UNSIGNED bit-places on LOGICAL, giving 1ST. Put zeroes into the least significant bits vacated by the shift.


M* ( UNSIGNED UNSIGNED -- UNSIGNED-DOUBLE )

UNSIGNED-DOUBLE is the product of the first UNSIGNED and the second UNSIGNED. All numbers and arithmetic are unsigned.


M* ( SIGNED SIGNED -- SIGNED-DOUBLE )

SIGNED-DOUBLE is the product of the first SIGNED and the second SIGNED. All numbers and arithmetic are signed.


MARKER ( "<spaces>name" -- )

Skip leading space delimiters. Parse name delimited by a space. Create a definition for name with the execution semantics defined below.

name Execution: ( -- )
Restore all dictionary allocation pointers and word lists to the state they had just prior to the definition of name. Remove the definition of name and all subsequent definitions. Restoration of any structures still existing that could refer to deleted definitions or deallocated memory space is not necessarily provided. No other contextual information such as the number-conversion radix is affected.


MATCH ( SIGNED DEFINITION SINGLE -- 1ST )

1ST is equal to SIGNED if and only if the stack diagram of DEFINITION matches the contents of the contents of data type heap. Otherwise, 1ST is zero. The matching algorithm depends on the value of SINGLE.

SINGLE = 0:
In interpretation state, only words whose input parameters match the data types on the interpreter data type heap can be found. In compilation state, only non-immediate words whose input parameters match the data types on the compiler data type heap, and immediate words whose input parameters match the data types on the interpreter data type heap can be found.

SINGLE = -1:
Only words whose input parameters match the data types on the compiler data type heap can be found. An ambiguous condition exists if executed in interpretation state.

SINGLE = address of a sample definition:
Only words whose input parameters match the data types on the compiler data type heap can be found. Additionally, the output parameter list, after resolving all data type references to the input parameters, has to be identical to the output parameter list of the definition whose address is passed in parameter SINGLE.


MAX ( INTEGER 1ST -- 1ST )

1ST is the unsigned maximum of INTEGER and 1ST.


MAX ( SIGNED 1ST -- 1ST )

1ST is the signed maximum of SIGNED and 1ST.


MAX ( ADDRESS 1ST -- 1ST )

1ST is the unsigned maximum of ADDRESS and 1ST.


MAX ( INTEGER-DOUBLE 1ST -- 1ST )

1ST is the unsigned maximum of INTEGER-DOUBLE and 1ST.


MAX ( SIGNED-DOUBLE 1ST -- 1ST )

1ST is the signed maximum of SIGNED-DOUBLE and 1ST.


MERGE ( SINGLE SINGLE -- DOUBLE )

Merges two single-cell items SINGLE into a double-cell item DOUBLE. The most significant part is expected on top of the stack.


MIN ( INTEGER 1ST -- 1ST )

1ST is the unsigned minimum of INTEGER and 1ST.


MIN ( SIGNED 1ST -- 1ST )

1ST is the signed minimum of SIGNED and 1ST.


MIN ( ADDRESS 1ST -- 1ST )

1ST is the unsigned minimum of ADDRESS and 1ST.


MIN ( INTEGER-DOUBLE 1ST -- 1ST )

1ST is the unsigned minimum of INTEGER-DOUBLE and 1ST.


MIN ( SIGNED-DOUBLE 1ST -- 1ST )

1ST is the signed minimum of SIGNED-DOUBLE and 1ST.


MOD ( UNSIGNED UNSIGNED -- 2ND )

Divide the first UNSIGNED by the second UNSIGNED, giving the remainder 2ND. Note that the result has the same data type as the divisor. An ambiguous condition exists if the second UNSIGNED is zero.


MOD ( SIGNED SIGNED -- 2ND )

Divide the first SIGNED by the second SIGNED, giving the remainder 2ND. Note that the result has the same data type as the divisor. An ambiguous condition exists if the second SIGNED is zero. If the first SIGNED and the second SIGNED differ in sign, the result returned will be the same as that returned by the phrase SWAP S>D SWAP SM/REM DROP or the phrase SWAP S>D SWAP FM/MOD DROP.


MOD ( UNSIGNED-DOUBLE UNSIGNED -- 2ND )

Divide UNSIGNED-DOUBLE by UNSIGNED, giving the single-precision remainder 2ND. An ambiguous condition exists if UNSIGNED is zero.


MOVE ( ADDRESS -> SINGLE ADDRESS -> 2ND UNSIGNED -- )

If UNSIGNED is not equal to zero, copy the contents of UNSIGNED consecutive cells starting at address ADDRESS -> SINGLE to the UNSIGNED consecutive cells starting at address ADDRESS -> 2ND. After MOVE completes, the UNSIGNED consecutive cells starting at address ADDRESS -> 2ND contain exactly what the UNSIGNED consecutive cells starting at address ADDRESS -> SINGLE contained before the move.


MOVE ( ADDRESS -> DOUBLE ADDRESS -> 2ND UNSIGNED -- )

If UNSIGNED is not equal to zero, copy the contents of UNSIGNED consecutive double cells starting at ADDRESS -> DOUBLE to the UNSIGNED consecutive double cells starting at address ADDRESS -> 2ND. After MOVE completes, the UNSIGNED consecutive double cells starting at address ADDRESS -> 2ND contain exactly what the UNSIGNED consecutive double cells starting at address ADDRESS -> DOUBLE contained before the move.


MOVE ( CADDRESS -> SINGLE CADDRESS -> 2ND UNSIGNED -- )

If UNSIGNED is not equal to zero, copy the contents of UNSIGNED consecutive characters starting at address CADDRESS -> SINGLE to the UNSIGNED consecutive characters starting at address CADDRESS -> 2ND. After MOVE completes, the UNSIGNED consecutive characters starting at address CADDRESS -> 2ND contain exactly what the UNSIGNED consecutive characters starting at address CADDRESS -> SINGLE contained before the move.


NAME ( DEFINITION -- CADDRESS -> CHARACTER UNSIGNED )

CADDRESS -> CHARACTER UNSIGNED is a character string containing the name of DEFINITION. An exception is thrown if DEFINITION was defined by :NONAME.


NAME>DEFINITION ( CADDRESS -> UNSIGNED -- DEFINITION )

DEFINITION is the definition whose name field address is CADDRESS -> UNSIGNED. An ambiguous condition exists if CADDRESS -> UNSIGNED is not the address of a definition's name field.


NEGATE ( INTEGER -- 1ST )

Negate INTEGER, giving its arithmetic inverse 1ST.


NEGATE ( INTEGER-DOUBLE -- 1ST )

Negate INTEGER-DOUBLE, giving its arithmetic inverse 1ST.


NEST-DO ( -- CONTROL-FLOW )

An exception is thrown if NEST-DO is interpreted.

Save a copy of the compiler data type heap and place CONTROL-FLOW onto the stack. Rename the loop index I into J, if it already exists, and define a new local I as loop index.

NEST-DO is used by DO and ?DO.


NEST-LOOP ( CONTROL-FLOW -- )

An exception is thrown if NEST-LOOP is interpreted.

An exception is thrown if the contents of the compiler data type heap do not exactly match the copy that was saved when CONTROL-FLOW was created. Forget the loop index I, which is assumed to be the latest local. Rename the loop index J, if it exists, into I.

NEST-LOOP is used by LOOP and +LOOP.


NESTING ( ADDRESS -> DATA-TYPE INTEGER -- )

Change the name of a local, which is identified by the address of its output parameter ADDRESS -> DATA-TYPE, by adding INTEGER to the first character of it's name. If the name consists of more than one character, it remains unchanged.

Note: NESTING is used internally by NEST-DO and NEST-LOOP to rename the loop index I to J and vice versa.


NEW-TUPLE ( -- TUPLE )

TUPLE is an empty tuple.


NEXT ( DEFINITION -- 1ST )

1ST is the successor of DEFINITION in the dictionary. An ambiguous condition exists if DEFINITION is unfinished or if DEFINITION is the latest definition.


NIP ( SINGLE SINGLE -- 2ND )

Remove the first item below the top of the stack.


NIP ( SINGLE DOUBLE -- 2ND )

Remove the first item below the top of the stack.


NIP ( DOUBLE SINGLE -- 2ND )

Remove the first item below the top of the stack.


NIP ( DOUBLE DOUBLE -- 2ND )

Remove the first item below the top of the stack.


NO-PARAMS-DOES> ( COLON-SYS -- DOES-SYS )

Interpretation:
An exception is thrown if NO-PARAMS-DOES> is interpreted.

Compilation:
Append the runtime semantics given below to the current definition. An exception is thrown if the contents of the compiler data type heap does not exactly match the output parameters of the current definition. Consume COLON-SYS and produce DOES-SYS.

Runtime: ( R: nest-sys1 -- )
Specify the execution semantics of the most recent definition, referred to as name, as given below. Return control to the calling definition specified by nest-sys1.

Initiation: ( -- ADDRESS ) ( R: -- nest-sys2 )
Save information nest-sys2 about the calling definition. Place name's data field address ADDRESS on the stack.

name Execution: ( -- )
Execute the portion of the definition that begins with the initiation semantics appended by the NO-PARAMS-DOES> which modified name.

Note that name does have no stack effects by default. Stack effects have to be specified separately after the creation of name. Using a stack diagram phrase ( ... -- ... ) immediately following DOES> does automatically add a stack diagram to name.

NO-PARAMS-DOES> is an immediate word.


NONAME? ( DEFINITION -- FLAG )

FLAG is true if and only if DEFINITION was created by :NONAME.


NOOP ( -- )

Interpretation:
No operation.

Compilation:
No operation.


NULL ( "<spaces>name" -- y )

Skip leading space delimiters. Parse name delimited by a space. Return y, which has the numerical value 0 (all bits are zero) and the data type identified by name. An exception is thrown if name is not the name of a data type. y can be a single-cell or a double-cell item.

NULL is an immediate word.


NULL? ( DATA-TYPE -- FLAG )

FLAG is true if and only if DATA-TYPE is a null data type. A null data type can have one or more attributes.


NUMBER ( CADDRESS -> CHARACTER UNSIGNED -- INTEGER-DOUBLE DATA-TYPE )

Convert the string CADDRESS -> CHARACTER UNSIGNED into an unsigned double-precision number INTEGER-DOUBLE, using the number-conversion radix in BASE. DATA-TYPE is UNSIGNED if the string consists only of digits. If the string is preceded by the character +, DATA-TYPE is SIGNED. If the string is preceded by the character -, DATA-TYPE is SIGNED, and INTEGER-DOUBLE is negated.

The character . may be appended to the character string as described above, resulting in DATA-TYPE being UNSIGNED-DOUBLE if no sign character is present or SIGNED-DOUBLE with a leading sign character.

DATA-TYPE is null if the content of the string does not comply with the representation of a valid single-precision or double-precision number.


NUMBER-DOUBLE ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type NUMBER-DOUBLE.


OF ( CASE-SYS -- 1ST OF-SYS )

Interpretation:
An exception is thrown if OF is interpreted.

Compilation:
Check if the contents of the compiler data type heap matches the one that was saved when CASE-SYS was created. An exception is thrown if a difference is detected. Place OF-SYS onto the stack. Append the runtime semantics given below to the current definition. The semantics are incomplete until resolved by a consumer of OF-SYS such as ENDOF.

Runtime: ( SINGLE 1ST -- | 1ST )
If SINGLE and 1ST are equal, discard both items and continue execution. Otherwise, discard the top value and continue execution at the location specified by the consumer of OF-SYS.

OF is an immediate word.


OF-SYS ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type OF-SYS.


OFFSET ( DATA-TYPE -- UNSIGNED )

UNSIGNED is the numerical value of the offset attribute of DATA-TYPE.


OFFSET+ ( DATA-TYPE INTEGER -- 1ST )

Add INTEGER to the offset attribute of DATA-TYPE. An exception is thrown if the resulting offset attribute is outside the range 0 to 31.


ONLY ( -- )

Set the search order to the minimum search order, which consists only of the FORTH-WORDLIST word list.


ONLY-NAME ( SIGNED DEFINITION SINGLE -- 1ST )

1ST is equal to SIGNED.

ONLY-NAME is used as a callback word that implements an additional matching criterion for SEARCH.


OPEN ( CADDRESS -> CHARACTER UNSIGNED FAM -- FILE SIGNED )

Open the file named in the character string CADDRESS -> CHARACTER UNSIGNED, with file access method FAM. If the file is successfully opened, SIGNED is zero, FILE is its identifier, and the file has been positioned to the start of the file. Otherwise, SIGNED is the I/O result code and FILE is undefined.


OR ( SINGLE LOGICAL -- 1ST )

1ST is the bit-by-bit inclusive-or of SINGLE with LOGICAL.


OR ( DATA-TYPE DATA-TYPE -- 1ST )

1ST is the first DATA-TYPE with attributes that are the bit-by-bit logical or of the attributes of both parameters DATA-TYPE.


ORDER ( -- )

Display the names of the vocabularies that correspnd to the word lists in the search order in their search order sequence, from first searched to last searched. Also display the name of the vocabulary that corresponds to the compilation word list.


ORIG ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type ORIG.


ORIG/DEST ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type ORIG/DEST.


OVER ( SINGLE SINGLE -- 1ST 2ND 1ST )

Place a copy of the first SINGLE on top of the stack.


OVER ( SINGLE DOUBLE -- 1ST 2ND 1ST )

Place a copy of SINGLE on top of the stack.


OVER ( DOUBLE SINGLE -- 1ST 2ND 1ST )

Place a copy of DOUBLE on top of the stack.


OVER ( DOUBLE DOUBLE -- 1ST 2ND 1ST )

Place a copy of the first DOUBLE on top of the stack.


PAD ( -- CADDRESS -> CHARACTER )

CADDRESS -> CHARACTER is the address of a transient area that can be used to hold data for intermediate character string processing.

Note: This transient area is reserved for applications. It will not be used by the system.


PARAM, ( STACK-DIAGRAM DATA-TYPE -- 1ST )

Reserve two cells in the dictionary and store DATA-TYPE in the cells. Add 1 to the offset attribute of STACK-DIAGRAM. An ambiguous condition exists if the first unused address of the dictionary is not aligned prior to execution of PARAM,. An exception is thrown if the dictionary overflows.


PARAM@ ( DEFINITION UNSIGNED -- DATA-TYPE )

DATA-TYPE is the basic data type with index UNSIGNED from the parameter list of DEFINITION. The index is zero based. An ambiguous condition exists if UNSIGNED is greater than or equal to the length of the parameter list.


PARAM@, ( DEFINITION STACK-DIAGRAM UNSIGNED 3RD -- 1ST 2ND )

Read a number of basic data types from the parameter list of DEFINITION, starting at the parameter with index 3RD up to and not including the parameter with index UNSIGNED. indices start with 0. For each data type read, reserve two cells of dictionary, store the data type in the cells, and modify STACK-DIAGRAM by adding 1 to its offset attribute. An ambiguous condition exists if the dictionary is not aligned prior to execution of PARAM@,, or if UNSIGNED is greater than the length of the parameter list. An exception is thrown if the dictionary overflows.


PARAMS ( DEFINITION -- ADDRESS -> DATA-TYPE )

ADDRESS -> DATA-TYPE is the address of the input parameter field of DEFINITION.


PARAMS>DT ( DEFINITION DATA-TYPE -- )

If DATA-TYPE has no offset attribute, push DATA-TYPE onto the data type heap and finish execution. Otherwise, push a compound data type corresponding to an input parameter of DEFINITION onto the data type heap. The offset attribute of DATA-TYPE is the index to the basic data type of the input parameter list of DEFINITION, starting with 1. If the selected compound data type contains a reference to another data type in the parameter list, the tail of the compound data type is recursively substituted by the referenced data type. An exception is thrown if the data type heap overflows.


PARENT ( DATA-TYPE -- 1ST )

1ST is the parent data type of DATA-TYPE. If DATA-TYPE does not have a parent data type, 1ST is the null data type.


PARSE ( CHARACTER "ccc<char>" -- CADDRESS -> CHARACTER UNSIGNED )

Parse ccc delimited by the delimiter CHARACTER.

CADDRESS -> CHARACTER is the address (within the input buffer) and UNSIGNED is the length of the parsed string. If the parse area was empty, the resulting string has a zero length.


PARSE-WORD ( "<spaces>name" -- CADDRESS -> CHARACTER UNSIGNED )

Skip leading spaces. Parse name delimited by a space. An exception is thrown if the length of name is greater than 31.

CADDRESS -> CHARACTER is the address (within the input buffer) and UNSIGNED is the length of name. If the parse area was empty, the resulting string has a zero length.

Delimiters are the space character and any character with an ASCII value less than that of a space character.


POSITION ( FILE -- UNSIGNED-DOUBLE SIGNED )

UNSIGNED-DOUBLE is the current file position for the file identified by FILE. SIGNED is the I/O result code. UNSIGNED-DOUBLE is undefined if SIGNED is non-zero.


POSTPONE ( "<spaces>name" -- )

Interpretation:
An exception is thrown if POSTPONE is interpreted.

Compilation:
Skip leading space delimiters. Parse name delimited by a space. Find name. Append the compilation semantics of name to the current definition. An exception is thrown if name is not found.

POSTPONE is an immediate word.


PREV ( DEFINITION -- 1ST )

1ST is the predecessor of DEFINITION in the dictionary, or null if DEFINITION is the first definition. An exception is thrown if DEFINITION was defined by :NONAME.


PREVIEW-WORD ( "<spaces>name" -- CADDRESS -> CHARACTER UNSIGNED )

Save the current input source specification. Skip leading spaces. Parse name delimited by a space. Restore the input source specification. An exception is thrown if the length of name is greater than 31.

CADDRESS -> CHARACTER is the address (within the input buffer) and UNSIGNED is the length of name. If the parse area was empty, the resulting string has a zero length.

Delimiters are the space character and any character with an ASCII value less than that of a space character.


PREVIOUS ( -- )

Transform the search order consisting of wid1, wid2, ... widn (where wid1 is searched first) into wid2, ... widn. An exception is thrown if the search order was empty before PREVIOUS was executed.


PROCREATES ( DATA-TYPE "<spaces>name" -- )

Skip leading space delimiters. Parse name delimited by a space. Create a definition with name name that identifies a new data type. The new data type is a direct subtype of DATA-TYPE. An exception is thrown if PROCREATES is executed in compilation state.


PROMPT ( -- )

If in interpretation state, display " OK" and cause subsequent output to appear at the beginning of the next line.


QUIT ( -- )

Quit StrongForth. Empty the return stack. Make the user input device the input source. Enter interpretation state and return to the ANS Forth host system's interpretation loop. Do not display a message.


R-SIZE ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type R-SIZE.


R/O ( -- FAM )

FAM is the value for selecting the read only file access method.


R/W ( -- FAM )

FAM is the value for selecting the read/write file access method.


R> ( R-SIZE -- )

Interpretation:
An exception is thrown if R> is interpreted.

Compilation:
Append the runtime semantics given below to the current definition. Consume R-SIZE, the size of the local R@ in cells, and remove the local R@. An exception is thrown if R@ does not exist or if R-SIZE is not equal to 1 or 2.

Runtime: ( -- x )
x is the value of the local R@.

R> is an immediate word.


READ ( CADDRESS -> CHARACTER UNSIGNED FILE -- 3RD SIGNED )

Read UNSIGNED consecutive characters to address CADDRESS -> CHARACTER from the current position of the file identified by FILE. If UNSIGNED characters are read without an exception, SIGNED is zero and 3RD is equal to UNSIGNED. If the end of the file is reached before UNSIGNED characters are read, SIGNED is zero and 3RD is the number of characters actually read. If the operation is initiated when the value returned by POSITION is equal to the value returned by SIZE for the file identified by FILE, SIGNED is zero and 3RD is zero. If the operation fails, SIGNED is the I/O result code, and 3RD is zero. An ambiguous condition exists if the operation is initiated when the value returned by POSITION is greater than the value returned by SIZE for the file identified by FILE, or if the requested operation attempts to read portions of the file not written. At the conclusion of the operation, POSITION returns the next file position after the last character read.


READ-LINE ( CADDRESS -> CHARACTER UNSIGNED FILE -- 3RD FLAG SIGNED )

Read the next line from the file specified by FILE into memory at the address CADDRESS -> CHARACTER. At most UNSIGNED characters are read. Up to two line-terminating characters may be read into memory at the end of the line, but are not included in the count 3RD. The line buffer provided by CADDRESS -> CHARACTER should be at least UNSIGNED+2 characters long. If the operation succeeded, FLAG is true and SIGNED is zero. If a line terminator was received before UNSIGNED characters were read, then 3RD is the number of characters, not including the line terminator, actually read (0 <= 3RD <= UNSIGNED). When UNSIGNED = 3RD, the line terminator has yet to be reached. If the operation is initiated when the value returned by POSITION is equal to the value returned by SIZE for the file identified by FILE, FLAG is false, SIGNED is zero, and 3RD is zero. If SIGNED is non-zero, the operation failed and SIGNED is the I/O result code.

An ambiguous condition exists if the operation is initiated when the value returned by POSITION is greater than the value returned by SIZE for the file identified by FILE, or if the requested operation attempts to read portions of the file not written. At the conclusion of the operation, POSITION returns the next file position after the last character read.


RECURSE ( -- )

Interpretation:
An exception is thrown if RECURSE is interpreted.

Compilation:
Change the compiler data type heap according to the stack effect of the current definition. Append the execution semantics of the current definition to the execution semantics of current definition. An ambiguous condition exists if RECURSE appears in a definition after DOES>.

RECURSE is an immediate word.


REFILL ( -- FLAG )

Attempt to fill the input buffer from the input source, returning a true flag if successful.

When the input source is the user input device, attempt to receive input into the terminal input buffer. If successful, make the result the input buffer, set >IN to zero, and return true. Receipt of a line containing no characters is considered successful. If there is no input available from the current input source, return false.

When the input source is a string from EVALUATE, return false and perform no other action.

When the input source is a text file, attempt to read the next line from the file to the file input buffer. If successful, set >IN to zero, and return TRUE as FLAG. Otherwise return FALSE as FLAG.


RENAME ( CADDRESS -> CHARACTER UNSIGNED CADDRESS -> CHARACTER UNSIGNED -- SIGNED )

Rename the file named by the first character string CADDRESS -> CHARACTER UNSIGNED to the name in the second character string CADDRESS -> CHARACTER UNSIGNED. SIGNED is the I/O result code.


REPEAT ( ORIG DEST -- )

Interpretation:
An exception is thrown if REPEAT is interpreted.

Compilation:
Append the runtime semantics given below to the current definition, resolving the backward reference DEST. An exception is thrown if the contents of the compiler data type heap do not exactly match the copy that was saved when DEST was created. Resolve the forward reference ORIG. Restore the compiler data type heap to the state that was saved when ORIG was created.

Runtime: ( -- )
Continue execution at the location given by DEST.

REPEAT is an immediate word.


REPOSITION ( UNSIGNED-DOUBLE FILE -- SIGNED )

Reposition the file identified by FILE to UNSIGNED-DOUBLE. SIGNED is the I/O result code. At the conclusion of the operation, POSITION returns the value UNSIGNED-DOUBLE.


RESIZE ( UNSIGNED-DOUBLE FILE -- SIGNED )

Set the size of the file identified by FILE to UNSIGNED-DOUBLE. SIGNED is the I/O result code. If the resultant file is larger than the file before the operation, the portion of the file added as a result of the operation is undefined. At the conclusion of the operation, both SIZE and POSITION return the value UNSIGNED-DOUBLE.


RESTORE-INPUT ( INPUT-SOURCE -- FLAG )

Attempt to restore the input source specification to the state described by the tuple INPUT-SOURCE. FLAG is true if the input source specification cannot be restored.

An ambiguous condition exists if the input source represented by the arguments is not the same as the current input source.


ROT ( SINGLE SINGLE SINGLE -- 2ND 3RD 1ST )

Rotate the top three stack items.


ROT ( SINGLE SINGLE DOUBLE -- 2ND 3RD 1ST )

Rotate the top three stack items.


ROT ( SINGLE DOUBLE SINGLE -- 2ND 3RD 1ST )

Rotate the top three stack items.


ROT ( SINGLE DOUBLE DOUBLE -- 2ND 3RD 1ST )

Rotate the top three stack items.


ROT ( DOUBLE SINGLE SINGLE -- 2ND 3RD 1ST )

Rotate the top three stack items.


ROT ( DOUBLE SINGLE DOUBLE -- 2ND 3RD 1ST )

Rotate the top three stack items.


ROT ( DOUBLE DOUBLE SINGLE -- 2ND 3RD 1ST )

Rotate the top three stack items.


ROT ( DOUBLE DOUBLE DOUBLE -- 2ND 3RD 1ST )

Rotate the top three stack items.


RSHIFT ( LOGICAL -- 1ST )

Perform a logical right shift of one bit-place on LOGICAL, giving 1ST. Put zero into the most significant bit vacated by the shift.


RSHIFT ( LOGICAL UNSIGNED -- 1ST )

Perform a logical right shift of UNSIGNED bit-places on LOGICAL, giving 1ST. Put zeroes into the most significant bits vacated by the shift.


S>D ( SINGLE -- DOUBLE )

Convert SINGLE to the unsigned double number DOUBLE with the same numerical value.


S>D ( SIGNED -- SIGNED-DOUBLE )

Convert the signed single number SIGNED to the signed double number SIGNED-DOUBLE with the same numerical value.


SAVE-INPUT ( -- INPUT-SOURCE )

INPUT-SOURCE is a tuple that describes the current state of the input source specification for later use by RESTORE-INPUT.


SEARCH ( CADDRESS -> CHARACTER UNSIGNED 1ST 3RD -- 1ST 3RD FLAG )

Search the string specified by CADDRESS -> CHARACTER UNSIGNED for the sub-string specified by 1ST 3RD. If FLAG is true, a match was found at 1ST with 3RD characters remaining. If FLAG is false there was no match and 1ST is CADDRESS -> CHARACTER and 3RD is UNSIGNED.


SEARCH ( CADDRESS -> CHARACTER UNSIGNED SINGLE SEARCH-CRITERION WID -- DEFINITION SIGNED )

Search word list WID for the definition whose name is given by the character string CADDRESS -> CHARACTER UNSIGNED. If the definition is not found, return zero as DEFINITION and zero as SIGNED. If the definition is found, return it as DEFINITION. If the definition is an immediate word, also return one (+1), otherwise also return minus one (-1) as SIGNED.

SEARCH-CRITERION is the execution token of a word that applies additional matching criteria. If those matching criteria require a parameter, the parameter is passed by SINGLE.

The matching criteria word has the stack diagram ( SIGNED DEFINITION SINGLE -- 1ST ). SIGNED is either one or minus one, depending on whether the definition is an immediate word, SINGLE is the value of the parameter SINGLE of SEARCH, and DEFINITION is the actual definition to be checked. If the definition matches the criterion, 1ST is equal to SIGNED. Otherwise, 1ST is zero.

If UNSIGNED is zero, the definition's name is not considered by SEARCH. In this case, only the matching criteria specified by SINGLE and SEARCH-CRITERION matter.


SEARCH-ALL ( CADDRESS -> CHARACTER UNSIGNED SINGLE SEARCH-CRITERION -- DEFINITION SIGNED )

Search all word lists in the search order for the definition whose name is given by the character string CADDRESS -> CHARACTER UNSIGNED. If the definition is not found, return zero as DEFINITION and zero as SIGNED. If the definition is found, return it as DEFINITION. If the definition is an immediate word, also return one (+1), otherwise also return minus one (-1) as SIGNED.

SEARCH-CRITERION is the execution token of a word that applies additional matching criteria. If those matching criteria require a parameter, the parameter is passed by SINGLE.

The matching criteria word has the stack diagram ( SIGNED DEFINITION SINGLE -- 1ST ). SIGNED is either one or minus one, depending on whether the definition is an immediate word, SINGLE is the value of the parameter SINGLE of SEARCH, and DEFINITION is the actual definition to be checked. If the definition matches the criterion, 1ST is equal to SIGNED. Otherwise, 1ST is zero.

If UNSIGNED is zero, the definition's name is not considered by SEARCH. In this case, only the matching criteria specified by SINGLE and SEARCH-CRITERION matter.


SEARCH-CRITERION ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type SEARCH-CRITERION.


SEARCH-LOCAL ( CADDRESS -> CHARACTER UNSIGNED -- ADDRESS -> DATA-TYPE SIGNED )

Find the local whose name is stored in the character string CADDRESS -> CHARACTER UNSIGNED. If the local is not found, return zero as ADDRESS -> DATA-TYPE and zero as SIGNED. If the local is found, return the address of its output parameter ADDRESS -> DATA-TYPE, and one (1) as SIGNED.


SEARCH-TOKEN ( TOKEN -- DEFINITION SIGNED )

Search the definition whose token is equal to TOKEN. If the definition is not found, return zero as DEFINITION and zero as SIGNED. If the definition is found, return it as DEFINITION. If the definition is immediate, also return one (+1), otherwise also return minus one (-1) as SIGNED.


SET-CURRENT ( WID -- )

Make the word list identified by WID the current compilation word list.

Note: By default, the compilation word list is identical to the FORTH-WORDLIST word list.


SET-ORDER ( -- )

Set the search order to the minimum search order, which consists only of the FORTH-WORDLIST word list.


SET-ORDER ( TUPLE -> WID -- )

Set the search order to the word lists whose identifiers are contained in the tuple TUPLE -> WID. Subsequently, the first word list of the tuple will be searched first. If the tuple is empty, empty the search order. An exception is thrown if the size of the tuple is greater than the maximum number of word lists in the search order.


SIGN ( FLAG -- )

If FLAG is true, add a minus sign to the beginning of the pictured numeric output string.


SIGNED ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type SIGNED.


SIGNED-DOUBLE ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type SIGNED-DOUBLE.


SINGLE ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type SINGLE. SINGLE is an ancestor data type.


SIZE ( DATA-TYPE -- UNSIGNED )

UNSIGNED is the size in cells of data type DATA-TYPE, or zero if the size of DATA-TYPE cannot be determined.


SIZE ( TUPLE -- 1ST UNSIGNED )

UNSIGNED is the size in cells of TUPLE. If TUPLE is empty, UNSIGNED is zero.


SIZE ( FILE -- UNSIGNED-DOUBLE SIGNED )

UNSIGNED-DOUBLE is the size, in characters, of the file identified by FILE. SIGNED is the I/O result code. This operation does not affect the value returned by POSITION. UNSIGNED-DOUBLE is undefined if SIGNED is non-zero.


SLITERAL ( CADDRESS -> CHARACTER UNSIGNED -- )

Interpretation:
An exception is thrown if SLITERAL is interpreted.

Compilation:
Append the runtime semantics given below to the current definition.

Runtime: ( -- CADDRESS -> CHARACTER UNSIGNED )
Return CADDRESS -> CHARACTER as the address and UNSIGNED as the character count of a character string consisting of the characters specified by CADDRESS -> CHARACTER UNSIGNED during compilation. A program shall not alter the returned character string.

SLITERAL is an immediate word.


SM/REM ( SIGNED-DOUBLE SIGNED -- 2ND SIGNED )

Divide SIGNED-DOUBLE by SIGNED, giving the symmetric quotient SIGNED and the remainder 2ND. An ambiguous condition exists if SIGNED is zero or if the quotient lies outside the range of a signed single-precision number.


SOURCE ( -- CADDRESS -> CHARACTER UNSIGNED )

CADDRESS -> CHARACTER is the address of the input buffer. UNSIGNED is the number of characters in the input buffer. If SOURCE-ID is zero, the input buffer is the terminal input buffer. If SOURCE-ID is equal to STRING-ID, the input buffer is the character string identified by SOURCE-SPEC. If the input source is a text file, CADDRESS -> CHARACTER is the address of the file input buffer, and UNSIGNED is the number of characters in the file input buffer.


SOURCE-ID ( -- FILE )

FILE is zero if the user input device is the input source. FILE is equal to STRING-ID if a string is the input source. Otherwise, FILE is the handle of the file that is the current input source.


SOURCE-SPEC ( -- ADDRESS -> DOUBLE )

ADDRESS -> DOUBLE is the address of a double cell. If the current input source is a string, the double cell contains the address and length of the string. If the current input source is a file, the double cell contains the position within the file where the current line begins. Otherwise, the contents of the double cell is undefined.


SPACE ( -- )

Display one space.


SPACES ( INTEGER -- )

If INTEGER is greater than zero, display INTEGER spaces.

Note: INTEGER is assumed to be a signed number.


SPLIT ( DOUBLE -- SINGLE SINGLE )

Splits a double-cell item DOUBLE into two single-cell items SINGLE. The most significant part is on top of the stack.


STACK-DIAGRAM ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type STACK-DIAGRAM.


STATE ( -- ADDRESS -> FLAG )

ADDRESS -> FLAG is the address of a cell indicating compilation state. STATE is true when in compilation state, and false when in interpretation state.


STATE! ( SINGLE -- )

If FLAG is FALSE, enter interpretation state. If FLAG is TRUE, enter compilation state.


STATUS ( CADDRESS -> CHARACTER UNSIGNED -- LOGICAL SIGNED )

Return the status of the file named by the character string CADDRESS -> CHARACTER UNSIGNED. If the file exists, SIGNED is zero; otherwise SIGNED is the I/O result code. LOGICAL contains implementation-defined information about the file.


STR ( -- CADDRESS -> CHARACTER )

CADDRESS -> CHARACTER is the address of the string buffer. The string buffer is 80 characters long.

Note: The string buffer is used by " in interpretation state and by >STR.


STRING-ID ( -- FILE )

FILE is the constant value SOURCE-ID returns if the input source is a string.


SWAP ( SINGLE SINGLE -- 2ND 1ST )

Exchange the two items on top of the stack.


SWAP ( SINGLE DOUBLE -- 2ND 1ST )

Exchange the two items on top of the stack.


SWAP ( DOUBLE SINGLE -- 2ND 1ST )

Exchange the two items on top of the stack.


SWAP ( DOUBLE DOUBLE -- 2ND 1ST )

Exchange the two items on top of the stack.


SYS ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type SYS.


T> ( TUPLE -> SINGLE -- 1ST 2ND )

Extract 2ND from the tuple TUPLE -> SINGLE, decreasing the size of TUPLE -> SINGLE by one cell. An exception is thrown if TUPLE -> SINGLE is empty.


T> ( TUPLE -> DOUBLE -- 1ST 2ND )

Extract 2ND from the tuple TUPLE -> DOUBLE, decreasing the size of TUPLE -> DOUBLE by two cells. An exception is thrown if TUPLE -> DOUBLE is empty.


TH ( STACK-DIAGRAM UNSIGNED -- 1ST )

TH is used in a stack diagram to specify input or output parameters which should have exactly the same data type as the data type at the position UNSIGNED in the input parameter list of the same definition. Since the index refers to the basic data types in the input parameter list, it is possible to build a reference to the tail of a compound data type representing an input parameter.

An exception is thrown if UNSIGNED is 0, if UNSIGNED is greater than the length of the input parameter list, or if the referenced data type is itself a reference.


THAW ( CONTROL-FLOW -- )

If the compiler data type heap that was locked when CONTROL-FLOW was created, lock the compiler data type heap. Otherwise, perform either of the following actions depending on the current status of the compiler data type heap.

  1. If the compiler data type heap is locked, restore the contents of the compiler data type heap that was saved when CONTROL-FLOW was created, and unlock the compiler data type heap.
  2. If the compiler data type heap is not locked, check if the contents of the compiler data type heap exactly matches the one that was saved when CONTROL-FLOW was created. An exception is thrown if a difference is detected.

THEN ( ORIG -- )

Interpretation:
An exception is thrown if THEN is interpreted.

Compilation:
Append the runtime semantics given below to the current definition. Resolve the forward reference ORIG using the current location. An exception is thrown if the contents of the compiler data type heap does not match the copy that was saved when ORIG was created.

Runtime: ( -- )
Continue execution.

THEN is an immediate word.


THROW ( SIGNED -- )

If SIGNED is non-zero, pop the latest exception frame along with everything on the return stack above that frame. Then restore the input source specification in use before the CATCH that pushed that exception frame. Adjust the depth of the data stack so that it is the same as if the corresponding CATCH were executed normally, i. e., without THROW. Put SIGNED on top of the data stack, and transfer control to a point just after the corresponding CATCH.

Unlike in ANS Forth, the depth of the data stack immediately after CATCH does not depend on whether THROW was executed or not. The data stack pointer always has the value it would have if the execution token provided to CATCH were executed normally.


TIB ( -- CADDRESS -> CHARACTER )

CADDRESS -> CHARACTER is the address of the first character of the terminal input buffer.


TO ( "<spaces>name" -- )

Interpretation: ( x "<spaces>name" -- )
Skip leading spaces. Parse name delimited by a space. Store x in name. An exception is thrown if name was not defined by VALUE.

Compilation:
Skip leading spaces. Parse name delimited by a space. Append the runtime semantics given below to the current definition. An exception is thrown if name was not defined by either VALUE or LOCAL,.

Runtime: ( x -- )
Store x in name.

Note: x can be either SINGLE or DOUBLE.

TO is an immediate word.


TOKEN ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type TOKEN.


TOKEN-FIELD ( SIGNED DEFINITION SINGLE -- 1ST )

1ST is equal to SIGNED if and only if the value of token field of DEFINITION is equal to TOKEN. Otherwise, 1ST is zero.

TOKEN-FIELD is used as a callback word that implements an additional matching criterion for SEARCH.


TRUE ( -- FLAG )

FLAG is a true flag, a single-cell item with all bits set to 1.


TUCK ( SINGLE SINGLE -- 2ND 1ST 2ND )

Copy the first (top) stack item below the second stack item.


TUCK ( SINGLE DOUBLE -- 2ND 1ST 2ND )

Copy the first (top) stack item below the second stack item.


TUCK ( DOUBLE SINGLE -- 2ND 1ST 2ND )

Copy the first (top) stack item below the second stack item.


TUCK ( DOUBLE DOUBLE -- 2ND 1ST 2ND )

Copy the first (top) stack item below the second stack item.


TUPLE ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type TUPLE. TUPLE is an ancestor data type.


TYPE ( CADDRESS -> CHARACTER UNSIGNED -- )

If UNSIGNED is not zero, display the character string CADDRESS -> CHARACTER UNSIGNED.


UM/MOD ( UNSIGNED-DOUBLE UNSIGNED -- 2ND UNSIGNED )

Divide UNSIGNED-DOUBLE by UNSIGNED, giving the quotient UNSIGNED and the remainder 2ND. An ambiguous condition exists if UNSIGNED is zero or if the quotient lies outside the range of an unsigned single-precision number.


UNLOOP ( -- )

Interpretation:
An exception is thrown if LEAVE is interpreted.

Compilation:
Append the runtime semantics given below to the current definition. An exception is thrown if the loop control parameters are unavailable.

Runtime: ( -- ) ( R: loop-sys -- )
Discard the loop control parameters for the current nesting level.

UNLOOP is required for each nesting level before the definition may be EXITed.

UNLOOP is an immediate word.


UNSIGNED ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type UNSIGNED.


UNSIGNED-DOUBLE ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type UNSIGNED-DOUBLE.


UNTIL ( DEST -- )

Interpretation:
An exception is thrown if UNTIL is interpreted.

Compilation:
Append the runtime semantics given below to the current definition, resolving the backward reference DEST. An exception is thrown if the contents of the compiler data type heap do not exactly match the copy that was saved when DEST was created.

Runtime: ( SINGLE -- )
If SINGLE is zero, continue execution at the location specified by DEST. SINGLE is not taken into consideration when comparing the contents of the compiler data type heap with the copy that was saved when DEST was created.

UNTIL is an immediate word.


UNUSED ( -- UNSIGNED )

UNSIGNED is the number of address units remaining in the data space, starting at HERE.


VALUE ( SINGLE "<spaces>name" -- )

Skip leading space delimiters. Parse name delimited by a space. Create a definition for name with the execution semantics defined below. Reserve one cell of data space at an aligned address and store SINGLE at the address.

name is referred to as a value.

Execution: ( -- SINGLE )
Place SINGLE on the stack. The value of SINGLE is that given when name was created, until the phrase TO name is executed, causing a new value of SINGLE to be associated with name.

SINGLE has the same data type as was supplied to VALUE.


VALUE ( DOUBLE "<spaces>name" -- )

Skip leading space delimiters. Parse name delimited by a space. Create a definition for name with the execution semantics defined below. Reserve one cell of data space at an aligned address and store SINGLE at the address.

name is referred to as a value.

Execution: ( -- DOUBLE )
Place DOUBLE on the stack. The value of DOUBLE is that given when name was created, until the phrase TO name is executed, causing a new value of DOUBLE to be associated with name.

DOUBLE has the same data type as was supplied to VALUE.


VARIABLE ( SINGLE "<spaces>name" -- )

Skip leading space delimiters. Parse name delimited by a space. Create a definition for name with the execution semantics defined below. Reserve one cell of data space at an aligned address and store SINGLE at the address.

name is referred to as a variable.

Execution: ( -- ADDRESS -> SINGLE )
ADDRESS -> SINGLE is the address of the reserved cell. SINGLE has the same data type as was supplied to VARIABLE.


VARIABLE ( DOUBLE "<spaces>name" -- )

Skip leading space delimiters. Parse name delimited by a space. Create a definition for name with the execution semantics defined below. Reserve two cells of data space at an aligned address and store DOUBLE at the address.

name is referred to as a variable.

Execution: ( -- ADDRESS -> DOUBLE )
ADDRESS -> DOUBLE is the address of the first one of the reserved two cells. DOUBLE has the same data type as was supplied to VARIABLE.


VOCABULARY ( "<spaces>name" -- )

Skip leading space delimiters. Parse name delimited by a space. Create a new empty word list. Create a definition for name with the execution semantics defined below. Store the identifier of the new word list and a link to the previous definition defined by VOCUBULARY in the data field of the new definition.

name Execution: ( -- )

Replace the first word list in the search order with the new word list.

Note: Words defined by VOCABULARY are called vocabularies.


VOC-LINK ( -- ADDRESS -> DEFINITION )

ADDRESS -> DEFINITION is the address of a double cell containing the most recently defined vocabulary.


W/O ( -- FAM )

FAM is the value for selecting the write only file access method.


WHILE ( DEST -- ORIG 1ST )

Interpretation:
An exception is thrown if WHILE is interpreted.

Compilation:
Place ORIG onto the stack, under the existing 1ST. Save a copy of the compiler data type heap. Append the runtime semantics given below to the current definition. The semantics are incomplete untilORIG and 1ST are resolved (e.g., by REPEAT).

Runtime: ( SINGLE -- )
If SINGLE is zero, continue execution at the location specified by the resolution of ORIG.

WHILE is an immediate word.


WID ( STACK-DIAGRAM -- 1ST )

When used in a stack diagram, specifies an input or output parameter with data type WID.


WITHIN ( INTEGER 1ST 1ST -- FLAG )

Perform a comparison of a test value INTEGER with a lower limit 1ST (second parameter) and an upper limit 1ST (third parameter). FLAG is TRUE if and only if either (lower limit < upper limit and (lower limit <= test value and test value < upper limit)) or (lower limit > upper limit and (lower limit <= test value or test value < upper limit)) is true.


WITHIN ( ADDRESS 1ST 1ST -- FLAG )

Perform a comparison of a test value ADDRESS with a lower limit 1ST (second parameter) and an upper limit 1ST (third parameter). FLAG is TRUE if and only if either (lower limit < upper limit and (lower limit <= test value and test value < upper limit)) or (lower limit > upper limit and (lower limit <= test value or test value < upper limit)) is true.


WORDLIST ( -- WID ) 

Create a new empty word list, returning its word list identifier WID.


WRITE ( CADDRESS -> CHARACTER UNSIGNED FILE -- SIGNED )

Write UNSIGNED characters from address CADDRESS -> CHARACTER to the file identified by FILE starting at its current position. SIGNED is the I/O result code. At the conclusion of the operation, POSITION returns the next file position after the last character written to the file, and SIZE returns a value greater than or equal to the value returned by POSITION.


WRITE-LINE ( CADDRESS -> CHARACTER UNSIGNED FILE -- SIGNED )

Write UNSIGNED characters from address CADDRESS -> CHARACTER followed by a line terminator to the file identified by FILE starting at its current position. SIGNED is the I/O result code. At the conclusion of the operation, POSITION returns the next file position after the last character written to the file, and SIZE returns a value greater than or equal to the value returned by POSITION.


XOR ( SINGLE LOGICAL -- 1ST )

1ST is the bit-by-bit exclusive-or of SINGLE with LOGICAL.


XOR ( DATA-TYPE DATA-TYPE -- 1ST )

1ST is the first DATA-TYPE with attributes that are the bit-by-bit exclusive-or of the attributes of both parameters DATA-TYPE.


[ ( -- )

Interpretation:
Stay in interpretation state.

Compilation:
Perform the execution semantics given below.

Execution: ( -- )
Enter interpretation state.

[ is an immediate word.


['] ( "<spaces>name" -- )

Interpretation:
An exception is thrown if ['] is interpreted.

Compilation:
Skip leading space delimiters. Parse name delimited by a space. Find name. Append the runtime semantics given below to the current definition. An exception is thrown if name is not found.

Runtime: ( -- DEFINITION )
Place DEFINITION, the definition identified by name, on the stack.

['] is an immediate word.


[CHAR] ( -- )

Interpretation:
An exception is thrown if [CHAR] is interpreted.

Compilation: ( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. Append the runtime semantics given below to the current definition.

Runtime: ( -- CHARACTER )
Place CHARACTER, the value of the first character of name, on the stack. If the length of name is zero, CHARACTER is the space character.

[CHAR] is an immediate word.


[COMPILE] ( "<spaces>name" -- )

Interpretation:
An exception is thrown if [COMPILE] is interpreted.

Compilation:
Skip leading space delimiters. Parse name delimited by a space. Find name. Change the compiler data type heap according to the stack effect of name. If name has other than default compilation semantics, append them to the current definition. Otherwise append the execution semantics of name. An exception is thrown if name is not found.

[COMPILE] is an immediate word.


[DT] ( "<spaces>name" -- )

Interpretation:
An exception is thrown if [DT] is interpreted.

Compilation:
Skip leading space delimiters. Parse name delimited by a space. Append the runtime semantics given below to the current definition. An exception is thrown if name is not the name of a data type.

Runtime: ( -- DATA-TYPE )
Place DATA-TYPE, the data type identified by name, on the stack.

[DT] is an immediate word.


[LITERAL] ( -- )

Interpretation:
An exception is thrown if [LITERAL] is interpreted.

Compilation:
Append the runtime semantics given below to the current definition.

Runtime: ( x -- )
Compile virtual code to place x on the stack. x has the same data type as was supplied at compilation time.

[LITERAL] is an immediate word.


\ ( "ccc\" -- )

Compilation:
Perform the execution semantics given below.

Execution:
Parse and discard ccc delimited by a \ (backslash), but at most until the end the parse area.

The number of characters in ccc may be zero to the number of characters in the parse area.

\ is an immediate word.


] ( -- )

Enter compilation state.


Dr. Stephan Becher - January 31st, 2009