!!  DOSUTILS

( "ccc<eol>" -- )
Parse ccc, the remainder of the parse area. Pass ccc as a command to the operating system and when the command is finished, return to Forth. If ccc is empty, spawn a command shell that can be terminated by typing EXIT to return to Forth.

See also: SYSTEM



"TYPE  "quote-type"  DUMP

( c-addr u -- )
If u is greater than zero, display the character string specified by c-addr and u. Any " (double-quote) present is displayed twice.



#ADOPT  "number-adopt"  ADOPT

Interpretation: Perform the function of -14 THROW.

Compilation: ( x -- ) ( C: colon-sys -- colon-sys )
****



#CELLS  "number-cells"  RENAMED

( u1 -- u2 )
u2 is the minimum number of cells needed to store u1 characters.

This word has been replaced with CELL/ that differs in behavior.



#LOCALS  ENVIRON

( -- n )
Environment query. Maximum number of local variables in a definition.



#PARAGRAPHS  "number-paragraphs"  RENAMED

( u1 -- u2 )
u2 is the minimum number of paragraphs needed to store u1 characters.

This word has been replaced with >PARAGRAPHS.



$!  STRING4

( c-addr u a-addr -- )
Allocate memory to hold the contents of the string specified by c-addr u and store a pointer to this memory at a-addr. a-addr is typically the address of a VARIABLE. The previous contents of a-addr is deleted by $OFF.

See also: $@ $+!



$"  "string-quote"  STRSTACK

Interpretation: ( "ccc<quote>" -- ) ( $: -- str )
Perform the function of -14 THROW.

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

Run-time: ( $: -- str )
Return string str on the string stack consisting of the characters ccc.

Implementation: A pair of " represent a single " in the resulting string.

See also: S"



$+  "string-plus"  STRSTACK

( -- ) ( $: str1 str2 -- str3 )
Append string str2 to the end of string str1 giving string str3. All strings reside on the string stack.



$+!  STRING4

( c-addr u a-addr -- )
Place the characters of the string specified by c-addr u at the end of the string in memory pointed to by a-addr and add u to the length.

See also: $! $@ $C+



$.  "string-dot"  STRSTACK

( -- ) ( $: str -- )
Display the character string str on the string stack and remove the string from the string stack.



$@  STRING4

( a-addr -- c-addr u )
c-addr u describe the character string pointed to by the value at address a-addr. a-addr is typically the address of a VARIABLE.

See also: $!



$BLANK  "string-blank"  STRSTACK

( u -- ) ( $: -- str )
Place a string consisting of u characters for space on the string stack.



$C+  STRING4

( char a-addr -- )
Add character char to the end of the string in memory pointed to by a-addr and increment the length by one.

See also: $+!)



$CONSTANT  "string-constant"  STRSTACK

( c-addr u "<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 "string constant".

name Execution: ( -- ) ( $: -- str )
Place the characters represented by c-addr u as the string str on the string stack.



$DEPTH  "string-depth"  STRSTACK

( -- +n ) ( $: strn .. str1 -- strn .. str1 )
+n is the number of strings on the string stack.



$DROP  "string-drop"  STRSTACK

( -- ) ( $: str -- )
Remove string str from the string stack.



$DUP  "string-dup"  STRSTACK

( -- ) ( $: str -- str str )
Duplicate string str on the string stack.



$LEN  "string-length"  STRSTACK

( -- u ) ( $: str -- str )
u is the number of characters in string str on the string stack.



$OFF  STRING4

( a-addr -- )
Delete the string pointed to by a-addr.

See also: $! $@



$OVER  "string-over"  STRSTACK

( -- ) ( $: str1 str2 -- str1 str2 str1 )
Place a copy of str1 on the top of the string stack.



$ROT  "string-rote"  STRSTACK

( -- ) ( $: str1 str2 str3 -- str2 str3 str1 )
Rotate the top three strings on the string stack.



$SWAP  "string-swap"  STRSTACK

( -- ) ( $: str1 str2 -- str2 str1 )
Exchange the two top strings on the string stack.



&&  "logical-and"  LOGICALS

( flag -- | false )
Interpretation: Check flag. If flag was false, leave it on the stack and stop interpretation of the current input buffer. Otherwise remove flag and continue.

Execution: Check flag. If flag was false, leave it on the stack and return control to the calling definition specified by nest-sys. Otherwise remove flag and continue.

See also: ||



&EXEC:  

( n1 n2 -- )
****



(LINE)  "paren-line"  BLOCKEXT

( n u1 -- c-addr u2 )
Return the address c-addr in the block buffer and length u2 of the line n of the block u1.



(REF)  "paren-ref"  REF

( addr -- )
Find compiled references in colon definitions of addr in all word lists. Display the words where the references occur and the count of the words where the references are found.

(REF is implemented using pictured numeric output words. Its use will corrupt the transient region identified by #>.



(SEE)  "paren-see"  DECOMPILER

( xt -- )
Decompile the definition that has xt as its execution token.

(SEE) is implemented using pictured numeric output words. Its use will corrupt the transient region identified by #>.

See also: SEE



(VIEW)  "paren-view"  VIEW

( addr -- )
Display data starting from addr.



)  "right-paren"  ASSERT

Interpretation: Perform the function of -14 THROW.

Compilation: ( C: x -- )
Append the execution semantics given below to the current definition. Exception -22 will be issued when x is not the same as was left by ASSERT( or an equivalent word.

Run-time: ( i*x x1 -- i*x | j*x )
If not all bits of x1 are zero, continue. Otherwise display information about the source line that contained ASSERT( and ) and perform the function of -513 THROW.



)-  "right-paren-dash"  DIAGNOSE

( "ccc<eol>" -- )
Display the count of compiled bytes since the last invocation of -(. The remainder of the line is displayed as comment.



+!X  "plus-store-x"  ARRAYS

( n|u x-addr -- )
Add n|u to the single-cell value at extended address x-addr.



+CSP  UNSAFE

( -- )
Enable checking of the depth of the control flow stack.

See also: -CSP ?CSP



+FIELD  "plus-field"  FACILITY-EXT

( n1 n2 "<spaces>name" -- n3 )
Skip leading space delimiters. Parse name delimited by a space. Create a definition for name with the execution semantics defined below. Return n3 = n1 + n2 where n1 is the offset in the data structure before +FIELD executes, and n2 is the size of the data to be added to the data structure. n1 and n2 are in address units.

name Execution: ( addr1 -- addr2 )
Add n1 to addr1 giving addr2.

See also: BEGIN-STRUCTURE CFIELD: END-STRUCTURE FIELD:



-(  "dash-paren"  DIAGNOSE

( -- )
Reset the counters for use with )-.



->  REGRESSI

( i*x -- )
Remember the values i*x on the stack after T{.

See also: }T



-CSP  UNSAFE

( -- )
Disable checking of the depth of the control flow stack.

See also: +CSP ?CSP



-LINKED  LISTS

( a-addr -- )
Make a link from HERE to a-addr. Link in reverse order. Current item is found later than previous linked items.

See also: LINKED



-SPLIT  STRINGEX

( c-addr1 u1 char -- c-addr1 u2 c-addr2 u3 )
Scan the string specified by c-addr1 u1 for character char from right to left. c-addr1 u2 describe the part of the string starting before the first character equal to char. c-addr2 u3 describe the part of the after char. If the string does not contain char or u1 is zero, u2 is zero, c-addr2 is c-addr1 and u3 is u1.

Implementation: The paragraph address of c-addr1 may be modified by >SEG.

See also: SPLIT



.DATE  "dot-date"  DATETIME

( -- )
Display the current date in the format specified by >DATE.

.DATE is implemented using pictured numeric output words. Its use will corrupt the transient region identified by #>.

See also: .TIME DATE



.HMS  "dot-h-m-s"  TIMED

( -- )
Display the time elapsed in hours, minutes, seconds, and milliseconds since the last execution of TIMER-RESET.

.HMS is implemented using pictured numeric output words. Its use will corrupt the transient region identified by #>.

See also: .ELAPSED



.LINE  "dot-line"  BLOCKEXT

( n u -- )
Display line n of block u.



.RS  STACKTRC

( -- )
Display the annotated return stack.

See also: .STACK



.TICKS  TICTOC

( -- )
Display the number of clock ticks between TIC and TOC.



.TIME  "dot-time"  DATETIME

( -- )
Display the current time in the format "hh:mm:ss".

.TIME is implemented using pictured numeric output words. Its use will corrupt the transient region identified by #>.

See also: >TIME .DATE TIME



.VOCNAME  "dot-vocname"  MAPWORDS

( wid -- )
Display the name of the word list identifier wid or the value of wid.

See also: VOCABULARY VOCNAME$



/COUNTED-STRING  ENVIRON

( -- n )
Environment query. Maximum size of a counted string, in characters.



/HOLD  ENVIRON

( -- n )
Environment query. Size of the output-string buffer, in characters.



/PAD  ENVIRON

( -- n )
Environment query. Size of the scratch area pointed to by PAD, in characters.



0!X  "zero-store-x"  ARRAYS

( x-addr -- )
Store zero at extended address x-addr.



1WITH  WITH

( ["ccc1" ["ccc2"]] -- )
Parse ccc1 and ccc2 delimited by spaces. If ccc1 is empty, list the words in the first word list in the search order as with WORDS. Otherwise, the names in this word list containing ccc1 and optional ccc2 as part of the name are listed. Lower case characters are considered equal to their upper case equivalents.

See also: WITH



2!X  "two-store-x"  FAR

( x1 x2 x-addr -- )
Store the cell pair x1 x2 at extended address x-addr with x2 at x-addr and x1 at the next consecutive cell.

See also: 2@X



2+!  "two-plus-store"  TWOPLUSS

( d|ud a-addr -- )
Add d|ud to the double-cell number at a-addr.



2+!X  "two-plus-store-x"  ARRAYS

( d|ud x-addr -- )
Add d|ud to the double-cell value at extended address x-addr.



2>S  "two-to-s"  AUXSTACK

( x1 x2 -- ) ( A: -- x1 x2 )
Transfer cell pair x1 x2 to the auxiliary stack. Semantically equivalent to SWAP >S >S.

See also: 2>R 2S> 2S@



2@X  "two-fetch-x"  FAR

( x-addr -- x1 x2 )
Fetch the cell pair x1 x2 stored at extended address x-addr. x2 is stored at x-addr and x1 at the next consecutive cell.

See also: 2!X



2ARRAY  "two-array"  ARRAYS

( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. Create a definition for name with the execution semantics defined below with no initial data. name is referred to as a "double array". The data space of name is dynamically allocated from the memory managed by the operating system and its size depends on the highest accessed element.

name Execution: ( u -- xd )
Place the value xd of element u of name on the stack. An exception is issued if u does not lie in the range {0..65531}.

Methods for name:

+TO      ( d|ud u -- )   Add d|ud to element u of name
CLEAR    ( u -- )        Store zero in element u of name
RESET    ( -- )          Reduce the storage area of name to zero
TO       ( xd u -- )     Store xd in element u of name


2CONSTANT  "two-constant"  DOUBLE

( x1 x2 "<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 "two-constant".

name Execution: ( -- x1 x2 )
Place cell pair x1 x2 on the stack.



2MEMO  MEMOD

Interpretation: Perform the function of -14 THROW.

Execution: ( -- )
Memoize the current definition ... Parameter single, result double.

See also: MEMO



2ROT  "two-rote"  DOUBLE-EXT

( x1 x2 x3 x4 x5 x6 -- x3 x4 x5 x6 x1 x2 )
Rotate the top three cell pairs on the stack bringing cell pair x1 x2 to the top of the stack.



2S>  "two-s-from"  AUXSTACK

( -- x1 x2 ) ( A: x1 x2 -- )
Transfer the cell pair x1 x2 from the auxiliary stack. Semantically equivalent to S> S> SWAP.

See also: 2>S 2R> 2S@



2S@  "two-s-fetch"  AUXSTACK

( -- x1 x2 ) ( A: x1 x2 -- x1 x2 )
Copy cell pair x1 x2 from the auxiliary stack. Semantically equivalent to T@ S@.

See also: 2>S 2R@ 2S>



2VALUE  "two-value"  DOUBLE-EXT

( x1 x2 "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. Create a definition for name with the execution semantics defined below with an initial value equal of x1 x2.

name is referred to as a "two-value".

name Execution: ( -- x1 x2 )
Place cell pair x1 x2 on the stack. The value of x1 x2 is that given when name was created, until the phrase "x1 x2 TO name" is executed, causing a new cell pair x1 x2 to be assigned to name.

Methods for name:

+TO      ( xd -- )       Add xd to name
CLEAR    ( -- )          Store zero in name
TO       ( xd -- )       Store xd in name


2VARIABLE  "two-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 consecutive cells in data space at an aligned address.

name is referred to as a "two-variable".

name Execution: ( -- a-addr )
a-addr is the address of the first (lowest address) cell of two consecutive reserved cells in data space. A program is responsible for initializing the contents.

See also: VARIABLE



:F  FORWARD

( "name" -- )
Create a definition for name with the semantics of NOOP. The semantics are expected to be set by :R.



:R  FORWARD

( "name" -- )
Resolve the semantics of the previous defined definition by :Fwith the same name by the remaining source terminated by ;



;;  "double-semicolon"  ASSEMBLER

( "ccc<eol>" -- )
Complete the current ASSEMBLER instruction. Parse and discard the remainder of the parse area. If the value of TRACEis true and the disassembler is present, display the assembled instruction.



;CODE  "semicolon-code"  TOOLS-EXT

Interpretation: ( -- )
Append the run-time semantics below to the current definition. Remain in interpretation state, add the ASSEMBLER word list to the search order.

Compilation: ( C: colon-sys -- )
Append the run-time semantics below to the current definition. End the current definition, allow it to be found in the dictionary, and enter interpretation state, consuming colon-sys. Add the ASSEMBLER word list to the search order.

Subsequent characters in the parse area represent source code in assembly language. Those characters are processed, generating machine code. The process continues, refilling the input buffer as needed, until END-CODE is processed.

Run-time: ( -- ) ( R: nest-sys -- )
Replace the execution semantics of the most recent definition with the name execution semantics given below. Return control to the calling definition specified by nest-sys. Code may be damaged if the most recent definition was not defined with CREATE or a user-defined word that calls CREATE.

name Execution: ( i*x -- j*x )
Perform the machine code sequence that was generated following ;CODE

See also: DOES>



;]  "semicolon-bracket"  QUOTATIONS

Interpretation: Perform the function of -14 THROW.

Compilation: ( C: nest-sys flag -- )
Ends the current nested definition. If flag is not zero, resume compilation of the previous current definition. This includes ending the action of DOES> if any. If flag is false, end compilation. Appends the following run-time to the current definition:

Run-time: ( -- xt )
xt is the execution token of the nested definition. Locals defined in the nested definition are discarded after ;].

See also: [:.



<=  "less-or-equal"  LOGICALS

( n1 n2 -- flag )
Flag is true if and only if n1 is less than or equal to n2.

See also: >=



>=  "greater-or-equal"  LOGICALS

( n1 n2 -- flag )
Flag is true if and only if n1 is greater than or equal to n2.

See also: <=



>DATE  "to-date"  DATETIME

( +n1 +n2 +n3 -- c-addr u )
Convert the date given by day +n1, month +n2 and year +n3 by one of >ISODATE, >NLDATE, or >USDATE into the string described by c-addr u.

>DATE is implemented using pictured numeric output words. Its use will corrupt the transient region identified by #>.

See also: .DATE DATE



>ISODATE  "to-i-s-o-date"  DATEFORM

( +n1 +n2 +n3 -- c-addr u )
Convert the date given by day +n1, month +n2 and year +n3 into a string described by c-addr u in the ISO 8601 format "yyyy-mm-dd".

>ISODATE is implemented using pictured numeric output words. Its use will corrupt the transient region identified by #>.

See also: >DATE



>JULIAN  JULIAN

( +n1 +n2 n3 -- d )
d is the Julian Date for day +n1, month +n2 and year n3. n3 may be negative. Add one for a time past noon.



>NLDATE  "to-n-l-date"  DATETIME

( +n1 +n2 +n3 -- c-addr u )
Convert the date given by day +n1, month +n2 and year +n3 into the string described by c-addr u in the Dutch format "dd-mm-jjjj".

>NLDATE is implemented using pictured numeric output words. Its use will corrupt the transient region identified by #>.

See also: >DATE



>S  "to-s"  AUXSTACK

( x -- ) ( A: -- x )
Move x to the auxiliary stack.

See also: 2>S 2S> >R S@ S>



>STR  "to-string"  STRSTACK

( c-addr u -- ) ( $: -- str )
Place the string specified by c-addr u on the string stack.



>TIME  "to-time"  DATETIME

( +n1 +n2 +n3 -- c-addr u )
Convert the time given by second +n1, minute +n2 and hour +n3 into the string described c-addr u in the format "hh:mm:ss".

>TIME is implemented using pictured numeric output words. Its use will corrupt the transient region identified by #>.

See also: .TIME TIME



>USDATE  "to-u-s-date"  DATEFORM

( +n1 +n2 +n3 -- c-addr u )
Convert the date given by day +n1, month +n2 and year +n3 into a string described by c-addr u in the format "Month day, year".

>USDATE is implemented using pictured numeric output words. Its use will corrupt the transient region identified by #>.

See also: >DATE



?AT  "question-at"  RENAMED

( -- u1 u2 )
Return the column u1 and row u2 of the cursor on the screen.

See also: AT-XY

This word has been replaced with GET-XY.



?DEF  "question-defined"  RENAMED

( "<spaces>name" -- flag )
Skip leading space delimiters. Parse name delimited by a space. Find name. flag is true if and only if name is found. Contrary to [DEFINED], ?DEF is not an immediate word.

See also: ?UNDEF [IF]

This word has been replaced with [DEFINED].



?UNDEF  "question-undefined"  RENAMED

( "<spaces>name" -- flag )
Skip leading space delimiters. Parse name delimited by a space. Find name. flag is true if and only if name is not found. Contrary to [UNDEFINED], ?UNDEF is not an immediate word.

See also: ?DEF [IF]

This word has been replaced with [UNDEFINED].



@SWAP  SWAPMEM

( a-addr1 a-addr2 -- )
Exchange the contents of the cells at a-addr1 and a-addr2



ABORT"  "abort-quote"  CORE

Interpretation: Perform the function of -14 THROW.

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

Run-time: ( i*x x1 -- | i*x ) ( R: j*x -- | j*x )
Remove x1 from the stack. If any bit of x1 is not zero, perform the function of -2 THROW, displaying ccc if there is no exception frame on the exception stack.

Implementation: A pair of " represent a single " in the resulting string.



ADD  INSERT

( x -- )
Store x as element of a sorted array.

See also: ELEMENT PRECEDES SORT TOTAL



ADD-2LIST  LISTD

( xd x listid -- )
Append the pair xd and x to the list identified by listid. x may be looked up in the list by IN-2LIST and if successful, xd will be returned.

See also: ADD-LIST IN-LIST NEW-LIST



ADDRESS-UNIT-BITS  ENVIRON

( -- n )
Environment query. Size of one address unit, in bits.



ADOPT  ADOPT

Interpretation: Perform the function of -14 THROW.

Compilation: ( xt -- ) ( C: colon-sys -- colon-sys )
****



ALL  DECOMPILER

( -- )
Decompile all words in the first word list of the search order, starting with the first compiled.

See also: TILL



ANY  SEARCHER

( "<spaces>ccc" -- )
Skip leading space delimiters. Parse ccc delimited by a space. If the length of ccc is zero, display this help text.

Search the files given by DOCS. Display the description of the names that contain ccc.

When a full screen is displayed the listing halts. Pressing space continues. Other keys stop.

See also: HELP



APPEND  RENAMED

( c-addr1 u c-addr2 -- )
Place the characters of the string specified by c-addr1 u at the end of the counted string at c-addr2 and add u to the count at c-addr2. An exception is issued if the length of the resulting string would be greater than the implementation defined maximum length of a counted string.

Implementation: The paragraph address of c-addr1 may be modified by >SEG1. The paragraph address of c-addr2 may be modified by >SEG2.

See also: APPEND-CHAR

This word has been replaced with +PLACE.



APPEND-CHAR  RENAMED

( char c-addr -- )
Place character char at the end of the counted string at c-addr and increment the count at c-addr by one. An exception is issued if the length of the resulting string would be greater than the implementation defined maximum length of a counted string.

See also: APPEND C+PLACE

This word has been replaced with C+PLACE.



APROPOS  HELP

( "ccc<eol>" -- )
Parse ccc, the remainder of the parse area. If the length of ccc is zero, display this help text.

Look up ccc in the files given by DOCS. Repeatedly display the first line of a paragraph containing ccc and the line or lines containing ccc. Case of characters is significant.

When a full screen is displayed the listing halts. Pressing space continues. Other keys stop.

See also: HELP



ARG  "argument"  ARGS

( +n -- c-addr u )
c-addr u represent argument string +n on the command line not counting options and option strings. If +n is zero, c-addr u represent the full path and name of the program. If +n is not less than the value of ARGC, u is zero and c-addr is undefined. Strings may be enclosed with " (double quote) if they contain spaces; the quotes are not considered part of the string.

See also: OPTION



ARGC  "argument-count"  ARGS

( -- +n )
+n is the number of arguments or argument strings on the command line that are no part of options.

See also: ARG



ARRAY  ARRAYS

( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. Create a definition for name with the execution semantics defined below with no initial data. name is referred to as an "array". The data space of name is dynamically allocated from the memory managed by the operating system and its size depends on the highest accessed element.

name Execution: ( u -- x )
Place the value x of element u of name on the stack. An exception is issued if u does not lie in the range {0..65527}.

Methods for name:

+TO      ( n1|u1 u2 -- ) Add n1|u1 to element u2 of name
CLEAR    ( u -- )        Store zero in element u of name
RESET    ( -- )          Reduce the storage area of name to zero
TO       ( x u -- )      Store x in element u of name


ASSEMBLER  TOOLS-EXT

( -- )
Replace the first word list in the search order with the ASSEMBLER word list.



ASSERT(  "assert"  ASSERT

Interpretation: Perform the function of -14 THROW.

Compilation: ( "ccc<)>" -- ) ( C: -- x )
If the value ASSERT-LEVEL is less than one, parse ccc delimited by ) (right parenthesis). Otherwise continue. Leave x for checking by ). An exception will be issued when compiling is not from a text file.

See also: ASSERT0( ASSERT1( ASSERT2( ASSERT3(



ASSERT-LEVEL  ASSERT

( -- x )
A value. All assertions above this value are turned off. Default value is one.

See also: ASSERT(



ASSERT0(  "assert-zero"  ASSERT

Interpretation: Perform the function of -14 THROW.

Compilation: ( "ccc<)>" -- ) ( C: -- x )
If the value ASSERT-LEVEL is less than zero, parse ccc delimited by ) (right parenthesis). Otherwise continue. Leave x for checking by ). An exception will be issued when compiling is not from a text file.

See also: ASSERT(



ASSERT1(  "assert-one"  ASSERT

Interpretation: Perform the function of -14 THROW.

Compilation: ( "ccc<)>" -- ) ( C: -- x )
If the value ASSERT-LEVEL is less than one, parse ccc delimited by ) (right parenthesis). Otherwise continue. Leave x for checking by ). An exception will be issued when compiling is not from a text file.

See also: ASSERT(



ASSERT2(  "assert-two"  ASSERT

Interpretation: Perform the function of -14 THROW.

Compilation: ( "ccc<)>" -- ) ( C: -- x )
If the value ASSERT-LEVEL is less than two, parse ccc delimited by ) (right parenthesis). Otherwise continue. Leave x for checking by ). An exception will be issued when compiling is not from a text file.

See also: ASSERT(



ASSERT3(  "assert-three"  ASSERT

Interpretation: Perform the function of -14 THROW.

Compilation: ( "ccc<)>" -- ) ( C: -- x )
If the value ASSERT-LEVEL is less than three, parse ccc delimited by ) (right parenthesis). Otherwise continue. Leave x for checking by ). An exception will be issued when compiling is not from a text file.

See also: ASSERT(



AUX-STACK-CELLS  ENVIRON

( -- n )
Environment query. Maximum size of the auxiliary stack, in cells.



BEGIN-STRUCTURE  FACILITY-EXT

( "<spaces>name" -- struct-sys 0 )
Skip leading space delimiters. Parse name delimited by a space. Create a definition for name with the execution semantics defined below. Return a struct-sys that will be used by END-STRUCTUREand an initial offset of 0.

name Execution: ( -- +n )
+n is the size in memory expressed in address units of the data structure.

See also: +FIELD



BUFFER:  CORE-EXT

( u "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. Create a definition for name, with the execution semantics defined below. Reserve u address units at an aligned address. Contiguity of this region with any other region is undefined.

name Execution: ( -- a-addr )
a-addr is the address of the space reserved by BUFFER: when it defined name. The program is responsible for initializing the contents.



C"  "c-quote"  CORE-EXT

Interpretation: ( "ccc<quote>" -- c-addr )
Parse ccc delimited by " (double quote). Store ccc as a counted string in a transient buffer c-addr.

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

Run-time: ( -- c-addr )
Return c-addr, a counted string consisting of the characters ccc. A program shall not alter the returned string.

Implementation: A pair of " represent a single " in the resulting string. The maximum length of the string is the maximum length of a character counted string. CHForth allows for the storing of more such strings before new strings start to overwrite a previous string.

See also: S"



C+!X  "c-plus-store-x"  ARRAYS

( char x-addr -- )
Add char to the character at extended address x-addr.



C+PLACE  "c-plus-place"  CPLUSPLC

( char c-addr -- )
Add character char to the end of the counted string at c-addr and increment the count at c-addr by one. An exception is issued if the length of the resulting string would be greater than the implementation defined maximum length of a counted string.

See also: +PLACE PLACE



C/L  "c-per-l"  RENAMED

( -- n )
Return the number of characters on an output line.

Note: If blockext.frt is loaded, the value of n may change.

See also: ROWS

This word has been replaced with COLS.



C0!X  "c-zero-store-x"  ARRAYS

( x-addr -- )
Store zero at extended character address x-addr.



C@SWAP  SWAPMEM

( c-addr1 c-addr2 -- )
Exchange the contents of the characters at c-addr1 and c-addr2.



CALL  EXECUTED

( l-addr -- )
Execute the definition starting at list address l-addr.

See also: EXECUTE.



CARRAY  "c-array"  ARRAYS

( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. Create a definition for name with the execution semantics defined below with no initial data. name is referred to as an "character array". The data space of name is dynamically allocated from the memory managed by the operating system and its size depends on the highest accessed element.

name Execution: ( u -- char )
Place the value char of element u of name on the stack. An exception is issued if u does not lie in the range {0..65519}.

Methods for name:

+TO      ( char u -- )   Add char to element u of name
CLEAR    ( u -- )        Store zero in element u of name
RESET    ( -- )          Reduce the storage area of name to zero
TO       ( char u -- )   Store char in element u of name


CAT  DOSUTILS

( "ccc<eol>" -- )
Parse ccc, the remainder of the parse area. Start Coos Haak's CAT program with ccc as parameter list. When the program has been terminated, return to Forth.



Cat$  "category-string"  PROJECT

( -- c-addr )
c-addr is the address of a counted string representing the description of the category to which this file belongs.

See also: PROJECT



CD  "change-dir"  DOSENVIR

( "ccc" -- )
Skip leading space delimiters. Parse ccc delimited by a space. If the parse area is empty, display the name of the current directory. Otherwise set the current directory to ccc. If ccc begins with ~ (tilde), it is expanded by EXPAND-PATH. If a drive letter and a colon are present at the beginning of ccc or FORTH-ROOT, the default drive may be set too. If ccc is - (minus) switch to the previous directory.

See also: PWD SET-DIRECTORY



CFIELD:  "c-field-colon"  FACILITY-EXT

( n1 "<spaces>name" -- n2 )
Skip leading space delimiters. Parse name delimited by a space. Offset is the first character aligned value greater than or equal to n1. n2 = offset + 1 character. Create a definition for name with the execution semantics defined below.

name Execution: ( a-addr1 -- a-addr2 )
Add the offset calculated during the compile time action to a-addr1 giving the character aligned address a-addr2.

See also: +FIELD BEGIN-STRUCTURE END-STRUCTURE FIELD:



CHAR  "char"  CORE

( "<spaces>name" -- char )
Skip leading space delimiters. Parse name delimited by a space. Put the value of its first character on the stack. Exception -16 is issued if the length of name is zero.

See also: [CHAR]



CHFORTH  ENVIRON

( -- c-addr u )
Environment query. c-addr u represent a string containing the name, the processor type, and version of the CHForth program.



CLEARBIT  BITS

( n addr -- )
Set bit n on addr to zero. If the value of n lies outside the number of bits in a cell, the address is extended to the adjacent memory.



CLOCK-OFF  CLOCK

( -- )
Do not show a clock on the screen.



CLOCK-ON  CLOCK

( -- )
Display a clock on the right side of the status line.



CLONE  DOSUTILS

( "ccc<eol>" -- )
Parse ccc, the remainder of the parse area. Start a new instance of the current Coos Haak's Forth program with ccc as parameter list. When the program has been terminated, return to the previous instance of CHForth.



CLOSE-LOG  LOG

( -- )
If the log file is open, close the log file.

See also: OPEN-LOG

Note: this is the default action of function key F2



CODE  TOOLS-EXT

( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. Create a definition for name, called a "code definition", with the execution semantics defined below. Add the ASSEMBLER word list to the search order.

Subsequent characters in the parse area represent source code in assembly language. Those characters are processed, generating machine code. The process continues, refilling the input buffer as needed, until END-CODE is processed.

name Execution: ( i*x -- j*x )
Execute the machine code sequence that was generated following CODE

See also: MACRO PROC



COMP-LEAF  TREES

( addr1 addr2 -- -1|0|1 )
Compare data at addr1 and addr2 for equality, less or greater.



COMP2  SIGNUM

( n1 n2 -- n3 )
Compare n1 and n2. If n1 is less than n2, n3 is -1, otherwise if n1 is greater than n2, n3 is 1, otherwise n3 is 0.

See also: SIGNUM



COMPILE-ONLY  RENAMED

( -- )
Make the most recent definition a compile-only word. The default interpreter performs the function of -14 THROW when the definition is encountered in interpret state.

This word has been replaced with RESTRICT.



CONSTRAIN  CONSTRAI

( n1 n2 n3 -- n4 )
If n1 is not smaller than n2 and not greater than n3, n4 is n1. If n1 is smaller than n2, n4 is n2. If n1 is greater than n3, n4 is n3.



COUNTBITS  BITS2

( x -- n )
n is the number of bits set to 1 in x.



CR?  "c-r-question"  PAGING

( -- flag )
Perform CR. If the number of lines displayed on the screen is less than the maximum allowed, flag is false. Otherwise display a message and wait for a key press. Flag is false if the key pressed was the space key. Otherwise flag is true.

See also: FRESH TERMINATE?



Creat$  "creator-string"  PROJECT

( -- c-addr )
c-addr is the address of a counted string representing the name of the creator of this file.

See also: PROJECT



CRESET  "c-reset"  BITS

( char c-addr -- )
Clear the bits at c-addr that correspond with ones in char.



CRITICAL  CRITERR

Interpretation: Perform the function of -14 THROW.

Execution: ( -- )
Redirect the critical error handler of the operating system to a harmless routine. Temporary use only.

See also: END-CRITICAL



CS-PICK  

Interpretation: Perform the function of -14 THROW.

Execution: ( C: destu ... orig0|dest0 -- destu ... orig0|dest0 destu ) ( S: u -- )
Remove u. Copy destu to the top of the control-flow stack. An ambiguous condition exists if there are less than u+1 items, each of which shall be an orig or dest, on the control-flow stack before CS-PICK is executed. The control-flow stack in CHForth is implemented on the data stack, u is the topmost item on the data stack.



CS-ROLL  "c-s-roll"  TOOLS-EXT

Interpretation: Perform the function of -14 THROW.

Execution: ( C: origu|destu origu-1|destu-1 ... orig0|dest0 -- origu-1|destu-1 ... orig0|dest0 origu|destu ) ( S: u -- )
Remove u. Rotate u+1 elements on top of the control-flow stack so that origu|destu is on top of the control-flow stack. An ambiguous condition exists if there are less than u+1 items, each of which shall be an orig or dest, on the control-flow stack before CS-ROLL is executed. The control-flow stack in CHForth is implemented on the data stack, u is the topmost item on the data stack.



CSET  "c-set"  BITS

( char c-addr -- )
Set the bits at c-addr that correspond with ones in char.



CTOGGLE  "c-toggle"  BITS

( char c-addr -- )
Complement the bits at c-addr that correspond with ones in char.



D*  "d-star"  DMUL

( d1|ud1 d2|ud2 -- d3|ud3 )
Multiply d1|ud1 by d2|ud2 giving product d3|ud3.



D*/  DMULDIV

( d1 d2 d3 -- d4 d5 )
Multiply d1 by d2 producing the quadruple-cell intermediate result q. Divide q by d3, giving the double-cell quotient d4. Exception -10 is issued if d3 is zero or if the quotient d4 lies outside the range of a double-cell signed integer. If q and d3 differ in sign the result returned will be the same as returned by the phrase 2>R DM* (not implemented)
2R> DSM/REM (not implemented) 2SWAP2DROP. Note that other implementations of the ANSI standard may return the result of the phrase 2>R DM* 2R> DFM/MOD (not implemented) 2SWAP 2DROP.



D*/MOD  DMULDIV

( d1 d2 d3 -- d4 d5 )
Multiply d1 by d2 producing the quadruple-cell intermediate result q. Divide q by d3, giving the double-cell remainder d4 and the double-cell quotient d5. Exception -10 is issued if d3 is zero or if the quotient d5 lies outside the range of a double-cell signed integer. If q and d3 differ in sign the result returned will be the same as returned by the phrase 2>R DM* (not implemented) 2R>DSM/REM (not implemented). Note that other implementations of the ANSI standard may return the result of the phrase 2>R DM*2R> DFM/MOD (not implemented).



D0!  "d-zero-store"  DOUBLES

( a-addr -- )
Clear all bits of the double-cell value at a-addr.



D0!X  "d-zero-store-x"  ARRAYS

( x-addr -- )
Store zero in two consecutive cells at extended address x-addr.



D0=  "d-zero-equals"  DOUBLE

( xd -- flag )
flag is true if and only if xd is equal to zero.



D2*  "d-two-star"  DOUBLE

( xd1 -- xd2 )
xd2 is the result by shifting xd1 one bit toward the most-significant bit, filling the vacated least-significant bit with zero.



D2/  "d-two-slash"  DOUBLE

( xd1 -- xd2 )
xd2 is the result of shifting xd1 one bit toward the least-significant bit, leaving the most-significant bit unchanged.



DARRAY  "d-array"  ARRAYS

An alias for 2ARRAY.



DEBUG  TRACER

( -- a-addr )
A variable used in the tracer. When zero, no trace information is shown on the screen. Else a stack diagram is shown along with the name of the next to be executed word or the word that was executed by the compiler (immediate words).

See also: TRACE



DEFER!  "defer-store"  CORE-EXT

( xt1 xt2 - )
Set the word xt1 to execute xt2. An ambiguous condition exists if xt1 is not for a word defined by DEFER.

See also: ACTION-OF DEFER@ IS



DEFER@  "defer-fetch"  CORE-EXT

( xt1 -- xt2 )
xt2 is the execution token xt1 is set to execute. An ambiguous condition exists if xt1 is not the execution token of a word defined by DEFER, or if xt1 has not been set to execute an xt.

See also: ACTION-OF DEFER! IS



DEPRIVE  PRIVATES

( -- )
Hide all the words that are marked with PRIVATE.



DIR  DOSUTILS

( "ccc<eol>" -- )
Parse ccc, the remainder of the parse area. Perform the DIR command of the operating system with ccc as parameter list.

See also: LS



DIS  "disassemble"  DISASSEMBLER

( addr -- )
Disassemble from address addr. Displays a code line at the time, pressing Esc stops, other keys continue.

DIS is implemented using pictured numeric output words. Its use will corrupt the transient region identified by #>.

See also: DISX SEE



DISPOSE  LOADHIGH

( -- )
Reclaim the temporary space where the file loaded with LOADHIGH was compiled. All the words loaded with LOADHIGH are no longer available to the Forth system. Be sure not to use references to the words in that file.

See also: MARK



DISX  "dis-extended"  DISASSEMBLER

( x-addr -- )
Disassemble from extended address x-addr.

DISX is implemented using pictured numeric output words. Its use will corrupt the transient region identified by #>.

See also: DIS



DLROTATE  "d-l-rotate"  SHIFTS

( xd1 u -- xd2 )
Perform a logical left rotate of u bit-places on xd1, giving xd2. Put the most significant bits that were rotated out into the least significant bits vacated by the rotate.



DLSHIFT  "d-l-shift"  SHIFTS

( xd1 u -- xd2 )
Perform a logical left shift of u bit-places on xd1, giving xd2. Put zeroes in the least significant bits vacated by the shift.



DMAX  "d-max"  DOUBLE

( d1 d2 -- d3 )
d3 is the greater of d1 and d2.



DMIN  "d-min"  DOUBLE

( d1 d2 -- d3 )
d3 is the lesser of d1 and d2.



DOC  DOC

( "<spaces>name ..." -- )
Skipping leading spaces, parse and discard space-delimited words from the parse area, until the word ENDDOC has been parsed and discarded. If the parse area becomes exhausted, it is refilled as with REFILL. An exception is issued if the end of the input stream is reached and cannot be refilled before the terminating ENDDOC is parsed.

An ambiguous condition exists if DOC is POSTPONEd.

See also: (



DRROTATE  "d-r-rotate"  SHIFTS

( xd1 n -- xd2 )
Perform a logical right rotate of u bit-places on xd1, giving xd2. Put the least significant bits that were rotated out into the most significant bits vacated by the rotate.



DRSHIFT  "d-r-shift"  SHIFTS

( xd1 u -- xd2 )
Perform a logical right shift of u bit-places on xd1, giving xd2. Put zeroes in the most significant bits vacated by the shift.



DS*  "d-s-star"  DMUL

( d1|ud1 n|u -- d2|ud2 )
Multiply d1|ud1 by n|u giving product d2|ud2.



DSTACK  DSTACK

Interpretation: ( i*xd "ccc" -- j*xd )
Skip leading space delimiters. Parse "ccc" delimited by a space. Exception -16 is issued if the number of characters in ccc before the required | (bar) is zero. Create temporary definitions for each character in ccc before | and move double-cell values from the stack to the definitions, storing the value on the top of the stack in the rightmost character definition. If the string following | is not empty, return the values stored in the definitions on the stack in the order of the character definitions named in the string following | . Otherwise do not return a value to the stack.

Compilation: ( "ccc" -- )
Skip leading space delimiters. Parse "ccc" delimited by a space. Exception -16 is issued if the number of characters in ccc before the required | (bar) is zero. \G Create temporary definitions for each character in ccc before | . Append the run-time semantics given below to the current definition.

Run-time: ( i*xd -- j*xd )
Move double-cell values from the stack to the definitions above, storing the value on the top of the stack in the rightmost character definition. If string following | was not empty, return the values to the stack in the order of the character named in the string following | . Otherwise do not return a value to the stack.

See also: STACK



DU<  "d-u-less"  DOUBLE-EXT

( ud1 ud2 -- flag )
flag is true if and only if ud1 is less than ud2.



DU>  "d-u-greater"  DOUBLEX2

( ud1 ud2 -- flag )
flag is true if and only if ud1 is greater than ud2.



DUMP  TOOLS

( addr u -- )
Display the contents of u consecutive addresses starting at addr.

DUMP uses pictured numeric output words. Its use will corrupt the transient region identified by #>.

Implementation: At the beginning of the line the extended address is displayed, followed by the contents of groups of four characters, (as many as can fit on the output, depending on COLS)
as hexadecimal numbers and the same characters displayed with .EMIT. Pressing space halts and pressing space again continues the listing. Pressing the escape key issues exception -28. Other keys stop the listing. Lines containing identical values are omitted and marked with * (star).

See also: DUMPX LDUMP NDUMP SPARSE



DUMPX  "dump-extended"  DUMP

( x-addr u -- )
Display the contents of u consecutive addresses starting at extended address x-addr.

See also: DUMP SPARSE



DUP>S  "dupe-to-s"  AUXSTACK

( x -- x ) ( A: -- x )
Copy x to the auxiliary stack. Semantically equivalent to DUP >S.

See also: DUP>R SDROP



ECHO  DOSUTILS

( "ccc<eol>" -- )
Parse ccc, the remainder of the parse area. Perform the ECHO command of the operating system with ccc as parameter list.



EDIT  EDITING

( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. If name starts with ~ (tilde), or contains . (dot), it is expanded by EXPAND-PATH and file name is opened with the editor program with the cursor at the first line. When name is omitted, the last opened file by this command or SHOW, or WHAT is opened. If the file is not found in the current directory, the directories given by LIBS are searched for the file. If the file is still not found, create a new file in the current directory and open the editor. Otherwise name is looked up in the dictionary and its source file is opened at the line of definition.

Note: this is the default action of function key F3

See also: EDITOR-NAME



EDITOR  TOOLS-EXT

( -- )
Replace the first word list in the search order with the EDITOR word list.



EDITOR-NAME  EDITING

( -- c-addr )
c-addr is the address of a counted string representing the name of the editor program.

See also: EDIT



EKEY>FKEY  "e-key-to-f-key"  FACILITY-EXT

( x -- u f )
If the keyboard event x corresponds to a keypress in the implementation-defined special key set, return that key's id u and true. Otherwise return x and false.



ELEMENT  INSERT

( n -- x-addr )
a-addr is the extended address of element n of a sorted array.

See also: ADD TOTAL



ELSE:  FAILED

( x -- x | c-addr u )
If x is the execution token of FAIL, c-addr u is the string describing the most recent parsed name. Otherwise x is returned and the the current definition is left.

See also: ACTION



END-CODE  ASSEMBLER

( -- )
Resolve all assembler labels, terminate the current code definition and allow its name to be found in the dictionary. Remove the ASSEMBLER word list from the search order.

See also: CODE PROC



END-CRITICAL  CRITERR

Interpretation: Perform the function of -14 THROW.

Execution: ( -- )
Restore the redirection of the critical error handler of the operating system. Use as soon as possible after CRITICAL.



END-STRUCTURE  FACILITY-EXT

( struct-sys +n -- )
Terminate definition of a structure started with BEGIN-STRUCTURE

See also: +FIELD BEGIN-STRUCTURE



ENDM  "end-macro"  ASSEMBLER

( -- )
Interpretation: Perform the function of -14 THROW.

Compilation: ( C: colon-sys -- )
Terminate a definition started with MACRO and allow its name to be found in the ASSEMBLER word list. Remove the ASSEMBLER word list from the search order.

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



ENUM  ENUM

( n1 "name" -- n2 )
Create CONSTANT name with value n1. Add one to n1 giving n2.



ENVIRONMENT-WORDLIST  ENVIRON

( -- wid )
Return wid, the identifier of a word list containing definitions that constitute queries for ENVIRONMENT?



ENVIRONMENT?  "environment-query"  CORE

( c-addr u -- false | i*x true )
c-addr is the address of a character string and u is the string's character count. u may have a value in the range from zero up to the implementation defined maximum length of a counted string. The character string should contain a keyword from Environmental Queries or the optional word sets to be checked for correspondence with an attribute of the present environment. If the system treats the attribute as unknown, the returned flag is false; otherwise, the flag is true and i*x returned is of the type specified in the table for the attribute queried.

See also: ENVIRONMENT-WORDLIST GETENV



EVAL"  EVAL

Interpretation: ( "ccc<quote>" -- )
Parse ccc delimited by " (double-quote). EVALUATEthe resulting string.

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

Run-time: ( -- )
EVALUATE ccc.

Implementation: A pair of " represent a single " in the resulting string. The maximum length of the string is the maximum length of a character counted string. CHForth allows for the storing of more such strings before new strings start to overwrite a previous string.



EXCHANGE  ISORT

( n1 n2 -- )
Exchange the elements at index n1 and index n2

See also: ISORT



EXCHANGE  SORTING2

( n1 n2 -- )
Exchange the elements at index n1 and index n2

See also: SORT2



EXEC:  

( n -- )
****



EXPAND-TABS  TABS

( c-addr1 u1 -- c-addr2 u2 )
Copy any non-tab characters in the string specified by c-addr1 u1 to a string described by c-addr2 u2. Tabulation characters are replaced by spaces to positions divisable by 8 relative to c-addr2.



F.ELAPSED  FASTTIME

( -- )
Display the time elapsed since the last execution of FTIMER-RESET, Uses the time stamp counter.

F.ELAPSED is implemented using pictured numeric output words. Its use will corrupt the transient region identified by #>.



FAPPEND  "f-append"  OUTFILE

( c-addr u -- )
Open the file named in the character string specified by c-addr u with file access method W/O DENYALL. If the file name begins with ~ (tilde), it is expanded by EXPAND-PATH. If the file does not exist, create the file with file access method W/O DENYALL .

If the file was successfully opened, and the number of files opened by FOPEN or FAPPEND does not exceed 4, this file is made current. Writing to the file will start at the end of the file. Otherwise an exception is issued.

See also: FCLOSE FCR FEMIT FTYPE



FAST  TRACER

( -- )
Do not wait between successive executions of CR.

See also: SLOW TWAIT



FCLOSE  "f-close"  OUTFILE

( -- )
Close the current file opened by FAPPEND or FOPEN. If there is another file opened by FAPPEND or FOPEN, that file is made current and FCR, FEMIT and FTYPE will write characters to that file. If no file is open, an exception is issued.



FCR  "f-c-r"  OUTFILE

( -- )
Append the line terminating characters to the current file opened by FAPPEND or FOPEN.

See also: FEMIT FTYPE



FEMIT  "f-emit"  OUTFILE

( char -- )
Append char to the current file opened by FAPPEND or FOPEN.

See also: FCR FTYPE



FIELD:  "field-colon"  FACILITY-EXT

( n1 "<spaces>name" -- n2 )
Skip leading space delimiters. Parse name delimited by a space. Offset is the first cell aligned value greater than or equal to n1. n2 = offset + 1 cell. Create a definition for name with the execution semantics defined below.

name Execution: ( a-addr1 -- a-addr2 )
Add the offset calculated during the compile time action to a-addr1 giving the cell aligned address a-addr2.

See also: +FIELD BEGIN-STRUCTURE CFIELD: END-STRUCTURE



FIND  CORE

( c-addr -- c-addr 0 | xt 1 | xt -1 )
Find the definition named in the counted string at c-addr. If the definition is not found after searching all word lists in the search order, return c-addr and zero. If the definition is found, return xt. If the definition is immediate, also return one (1), otherwise return also minus-one (-1).

See also: ' FIND-NAME POSTPONE [']



FIND-CLOSE  DIRFIND

( -- ior )
Stop finding files with FIND-FIRST-FILE and FIND-NEXT-FILE.



FIND-FIRST-FILE  DIRFIND

( c-addr u -- ior )
Find the first file name matching the character string specified by c-addr u. If the string begins with ~ (tilde), the string is expanded by EXPAND-PATH. If no exception occurs and a matching file name is found, ior is zero and the values returned by FOUND-ATTRIBUTE, FOUND-DATE, FOUND-FILE and FOUND-SIZEare valid. Otherwise ior is the I/O result code and the values of FOUND-ATTRIBUTE FOUND-DATE FOUND-FILE and FOUND-ATTRIBUTE are undefined.

See also: FIND-CLOSE FIND-NEXT-FILE



FIND-MASK  DIRFIND

( -- a-addr )
a-addr is the address of cell containing the bitpattern for file search by FIND-FIRST-FILE.



FIND-NEXT-FILE  DIRFIND

( -- ior )
Find the next file name matching the character string given to the last execution of FIND-FIRST-FILE. If no exception occurs and a matching file name is found, ior is zero and the values returned by FOUND-ATTRIBUTE, FOUND-DATE, FOUND-FILEand FOUND-SIZE are valid. If an exception occurs or no matching file name is found, ior is the I/O result code and FOUND-ATTRIBUTE FOUND-DATE FOUND-FILE and FOUND-SIZE return their previous values.

See also: FIND-CLOSE



FLOORED  ENVIRON

( -- flag )
Environment query. True if floored division is the default.



FOPEN  "f-open"  OUTFILE

( c-addr u -- )
Create the file named in the character string specified by c-addr and u, and open it with access method W/ODENYALL. If the file name begins with ~ (tilde), it is expanded by EXPAND-PATH. If a file with the same name already exists, recreate it as an empty file.

If the file was successfully created and opened, and the number of files opened by FOPEN or FAPPEND does not exceed 4, this file is made current. Writing to the file will start at the beginning of the file. Otherwise an exception is issued.

See also: FCLOSE FCR FEMIT FTYPE



FORCE-FILE  FORCE

( fileid1 fileid2 -- ior )
Close the file identified by fileid1. Set the properties of the file identified by fileid1 to the file identified by fileid2. File access using fileid1 is performed by use of fileid2.

See also: CLOSE-FILE REOPEN-FILE



FORGET  TOOLS-EXT

( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. Find name in the compilation word list, then delete name from the dictionary along with all words added to the dictionary after name. Exception -13 is issued if name cannot be found. Exception -15 is issued if FORGET removes a word required for correct execution.

Note: this word is obsolescent and is included as a concession to existing implementations.

Implementation: FORGET does not restore the list-space and string-space pointers, MARKER does.

See also: MARKER



FORMAT  FORMAT

( i*x sc1 -- sc2 )
Format string with parameters after % Allowed: c d n r s t u



FOUND-ATTRIBUTE  DIRFIND

( -- x )
x is the attribute of the file found at the last successful execution of FIND-FIRST-FILE or FIND-NEXT-FILE.



FOUND-DATE  DIRFIND

( -- u1 u2 )
u1 and u2 are the packed modification time and date repectively of the file found at the last successful execution of FIND-FIRST-FILE or FIND-NEXT-FILE.

See also: GET-FILE-TIME UNPACK-DATE UNPACK-TIME.



FOUND-FILE  DIRFIND

( -- c-addr u )
c-addr u specify a string representing the name of the file found at the last successful execution of FIND-FIRST-FILE or FIND-NEXT-FILE.



FOUND-SIZE  DIRFIND

( -- ud )
ud is the size in characters of the file found at the last successful execution of FIND-FIRST-FILE or FIND-NEXT-FILE.



FRESH  PAGING

( -- )
Set the count of lines used by CR? to the maximum on the screen and set the flag returned by TERMINATE? to false.



FTIMER  "f-timer"  FASTTIME

( "ccc" -- )
Start the timer. Interpret the remainder of the parse area. Stop the timer and display the elapsed time on a new line. Uses the time stamp counter

FTIMER is implemented using pictured numeric output words. Its use will corrupt the transient region identified by #>.

See also: F.ELAPSED TIMER



FTIMER-RESET  FASTTIME

( -- )
Reset the timer for use by F.ELAPSED



FTYPE  "f-type"  OUTFILE

( c-addr u -- )
Append u characters from c-addr to the current file opened by FAPPEND or FOPEN.

See also: FCR FEMIT



GET-CONTEXT  RENAMED

( -- wid )
Return wid, the identifier of the first word list in the search order.

This word has been replaced with context @.



GIVE-HELP  ARGS

( -- )
This procedure executes the function of _HELP, displays a copyright message, my e-mail address and terminates the program with returncode zero.



GREP  DOSUTILS

( "ccc<eol>" -- )
Parse ccc, the remainder of the parse area. Start Borland's Grep with ccc as parameter list. When the program has been terminated, return to Forth.

See also: TS



HELP  HELP

( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. If the length of name is zero, display this help text.

Look up name in the files given by DOCS and display the description of name. As a binary search on the sorted file is performed, only one description per file is displayed.

When a full screen is displayed the listing halts. Pressing space continues. Other keys stop.

If no name is found, try to convert name to a number (the prefixes # $ % ' ^ are recognized) and display its type and decimal value and the character if it can be displayed or display the exception message if it is defined for the number.

If no number is found, try to convert name to a string without the starting and closing " (double quote) and display the number of characters in the string.

If name is a compound term described in TERMS.HLP , a space is entered as - (minus sign).

See also: ANY APROPOS ME



IMPLEMENTATION  MODULES

( -- )
Start the first part of a module. The following definitions before the use of INTERFACE or MODULE will be hidden from the user when MODULE is encountered.

See also: IS-MODULE



IN-2LIST  LISTD

( x listid -- x false | xd true )
Search for x in the list identified by listid. If x is found, return the associated value xd and a true flag. Otherwise return x and a false flag.

See also: ADD-2LIST ADD-LIST IN-LIST NEW-LIST



INSERT  TREES

( addr tree -- )
Add addr to its place in the tree. Comparison is done by COMP-LEAF.



INTERFACE  MODULES

( -- )
Start the second part of a module. The following definitions will not be hidden from the user by the use of MODULE. This part can be terminated by MODULE to hide the definitions in the first part started by IMPLEMENTATION or can be followed by IMPLEMENTATION to extend the first part.



INTVEC  "interrupt-vector"  INTVEC

( n "<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 an "interrupt vector".

name Execution: ( -- x-addr )
Place x-addr, the extended address of the current vector assigned to interrupt number n on the stack.

Methods for name:

CLEAR    ( -- )          Reset interupt number n to the default value
PTR      ( -- addr )     Return the address where the default
                         value of interrupt number n is stored
TO       ( a-addr -- )   Set interupt number n to address a-addr
                         in CSEG


IPALINDROME  PALINDRO

( c-addr u -- flag )
flag is true if and only if the string specified by c-addr u is a palindrome. Non-alphabetic characters are ignored and case of characters is not significant.

See also: PALDROME.



IS-LOG  "is-log"  LOG

( c-addr u -- )
c-addr u describe and set the name of the logfile.



IS-MODULE  MODULES

( wid -- )
Set wid as the wordlist of definitions compiled after IMPLEMENTATION. Default OTHER.



ISORT  ISORT

( u1 u2 -- )
Sort an array described by starting index u1 and holding u2 elements.

See also: EXCHANGE PRECEDES



JULIAN>  JULIAN

( d -- +n1 +n2 n3 )
d is the Julian Date for day +n1, month +n2 and year n3. n3 may be negative. Add one for a time past noon.



K  LOOP-EXT

Interpretation: Perform the execution semantics given below.

Execution: ( -- n|u ) ( R: loop-sys1 loop-sys2 loop-sys3 -- loop-sys1 loop-sys2 loop-sys3 )
n|u is a copy of the index of the second next outer loop.

If the loop control parameters of the second next outer loop are unavailable, K copies the fifth element on the return stack to the data stack.

See also: I J



K-ALT-MASK  FACILITY-EXT

( -- u )
Mask for the ALT key, that can be ORed with the key value to produce a value that the sequence EKEY EKEY>FKEYmay produce when the user presses the corresponding key combination.



K-CTRL-MASK  FACILITY-EXT

( -- u )
Mask for the CTRL key, that can be ORed with the key value to produce a value that the sequence EKEY EKEY>FKEYmay produce when the user presses the corresponding key combination.



K-SHIFT-MASK  FACILITY-EXT

( -- u )
Mask for the SHIFT key, that can be ORed with the key value to produce a value that the sequence EKEY EKEY>FKEYmay produce when the user presses the corresponding key combination.



L/SCR  "l-per-s-c-r"  RENAMED

( -- n )
Return the number of lines on an output page.

See also: COLS

This word has been replaced with ROWS.



LDUMP  "list-dump"  DUMP

( l-addr u -- )
Display the contents of u consecutive addresses starting at list space address l-addr.

See also: DUMP DUMPX SPARSE



LIST  BLOCK-EXT

( u -- )
Display block u in an implementation-defined format. Store u in SCR.

See also: BLOCK



LOADED  LOADED

( -- )
Display the names of the files loaded with INCLUDED or REQUIRE e.a.

Note: if loaded, this is the default action of function key F7

See also: MARKERS



LOADHIGH  LOADHIGH

( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. Allocate temporary space at the top of the dictionary and compile the library name in that space. When this word has been executed, the dictionary space pointers have the same value as before the execution, with the difference that the words in the loaded library are known to the Forth system.

See also: DISPOSE MARK



LOCALS-STACK-CELLS  ENVIRON

( -- n )
Environment query. Maximum size of the locals stack, in cells.



LOCALS|  "locals-bar"  LOCAL-EXT

Interpretation: Perform the function of -14 THROW.

Compilation: ( "<spaces>name1" "<spaces>name2" ... "<spaces>namen" "|" -- )
Create up to eight (in CHForth this may be more) local identifiers by repeatedly skipping leading spaces, parsing name, and executing (LOCAL) . The list of locals to be defined is terminated by |. Append the run-time semantics given below to the current definition.

Run-time: ( xn ... x2 x1 -- )
Initialize up to eight (in CHForth this may be more) local identifiers as described in (LOCAL) , each of which takes as the 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, +TO, CLEAR or SET.

Methods for name:

+TO      ( n|u -- )      Add n|u to name
CLEAR    ( -- )          Store zero in name
SET      ( -- )          Store true in name
TO       ( x -- )        Store x in name


See also: { {:


LOCATE  LOCATE

( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. If the length of name is zero, display this help text.

Find name. If name was defined in a block, LIST the block and mark the first line of the definition. If name was defined in a text file, display the name of the file and the first ten lines of the definition of name. A message is issued if name cannot be found, or the source file containing the definition of name cannot be located, or name was compiled at the terminal, or by EVALUATE.

See also: SHOWME WHAT WHICH



LOOK  SEARCHER

( "<spaces>name" "ccc<eol>" -- )
Skip leading space delimiters. Parse name delimited by a space. Parse ccc, the remainder of the parse area. If nothing is given on the input line, display this help text.

Search file name for occurrences of ccc. Display the number of the lines found, the line number and the characters of the line up to the width of the screen.

When a full screen is displayed the listing halts. Pressing space continues. Other keys stop.

See also: SF SL



LOOPS  REPEATED

( i*x n "ccc<eol>" -- j*x )
Repeat interpretation of the remainder of the source in the input buffer for n times. Use I to access the loop index. {n..1}

See also: MANY TIMES



LROTATE  "l-rotate"  SHIFTS

( x1 u -- x2 )
Perform a logical left rotate of u bit-places on x1, giving x2. Put the most significant bits that were rotated out into the least significant bits vacated by the rotate.



LS  DOSUTILS

( "ccc<eol>" -- )
Parse ccc, the remainder of the parse area. Start Coos Haak's LS program with ccc as parameter list. When the program has been terminated, return to Forth.

See also: DIR



M*/MOD  "m-star-slash-mod"  STARSLAS

( d1 n1 +n2 -- n3 d2 )
Multiply d1 by n1 producing the triple-cell intermediate result t. Divide t by +n2, giving the single-cell remainder n3 and the double-cell quotient n4. Exception -10 is issued if +n2 is zero or the quotient lies outside the range of a double-cell signed integer.

See also: */ */MOD M*/



MACRO  ASSEMBLER

( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. Create a colon definition for name in the ASSEMBLER word list, called a "macro". Add the ASSEMBLER word list to the search order and enter compilation state.

Compile subsequent words in the parse area representing source code in assembly language. The process continues, refilling the input buffer as needed, until ENDM is processed.

name Execution: ( i*x -- j*x )
Perform the compiled assembly language code generating machine code into the current definition.

See also: CODE



MAKE-DIRECTORY  DIRECTOR

( c-addr u -- ior )
Create the directory named in the character string specified by c-addr u. If the directory name begins with ~ (tilde), it is expanded by EXPAND-PATH. If no exception occurs, ior is zero. Otherwise ior is the I/O result code.

See also: REMOVE-DIRECTORY SET-DIRECTORY



MANY  REPEATED

( -- )
Repeat interpretation of the preceding source in the input buffer until a key is pressed.

See also: LOOPS STOP? TIMES



MAP-LIST  LISTS

( i*x list xt -- j*x )
For each element in the linked list, perform xt.

See also: MAP-TREE



MAP-TREE  TREES

( i*x tree xt -- j*x )
For each leaf in the tree, perform xt.

See also: MAP-LIST



MAP-VOCS  MAPWORDS

( i*x xt -- j*x )
Remove xt from the stack. Traverse all wordlists that have a name associated with it, executing xt (a user-specified word) once for every word in these wordlists. Display the names of the wordlists.

The invoked xt has the stack diagram ( k*x dea -- l*x ).

See also: MAP-VOCS2 MAP-WORDS WID?



MAP-VOCS2  MAPWORDS

( i*x xt -- j*x )
Remove xt from the stack. Traverse all wordlists that have a name associated with it, executing xt (a user-specified word) once for every word in these wordlists. Do not display the names of the wordlists.

The invoked xt has the stack diagram ( k*x dea -- l*x ).

See also: MAP-VOCS



MAP-WORDS  MAPWORDS

( i*x wid xt -- j*x )
Remove wid and xt from the stack. Traverse the wordlist wid, executing xt (a user-specified word) once for every word in the wordlist.

The invoked xt has the stack diagram ( k*x dea -- l*x ).

See also: MAP-VOCS



MARK  LOADHIGH

( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. Find name. Name is the first word compiled after loading a file with LOADHIGH.

See also: DISPOSE



MARKERS  MARKERS

( -- )
Display the name of every MARKER.

Note: if loaded, this is the default action of function key F8

See also: LOADED



MAX-CHAR  ENVIRON

( -- u )
Environment query. Maximum value of any character in the implementation-defined character set.



MAX-D  ENVIRON

( -- d )
Environment query. Largest usable signed double number.



MAX-N  ENVIRON

( -- n )
Environment query. Largest usable signed integer.



MAX-U  ENVIRON

( -- u )
Environment query. Largest usable unsigned integer.



MAX-UD  ENVIRON

( -- ud )
Environment query. Largest usable unsigned double number.



MEMO  MEMO

Interpretation: Perform the function of -14 THROW.

Execution: ( -- )
Memoize the current definition ... Parameter single, result single.

See also: 2MEMO



MODULE  MODULES

( -- )
End a module by hiding the definitions in the first part of a module started by IMPLEMENTATION. Set the default wordlist of hidden definitions to OTHER

See also: INTERFACE



MS>HMS  TIMED

( ud -- c-addr u )
c-addr u describe a string representing the current time in hours, minutes, seconds, and milliseconds given in milliseconds by ud.

See also: .HMS



NAME>COMPILE  "name-to-compile"  TOOLS-EXT

( nt -- x xt )
x xt represents the compilation semantics of the word nt. The returned xt has the stack effect ( i*x -- j*x). EXECUTEing xt consumes x and performs the compilation semantics of the word represented by nt.

See also: TRAVERSE-WORDLIST



NAME>INTERPRET  "name-to-interpret"  TOOLS-EXT

( nt -- xt | 0 )
xt represents the interpretation semantics of the word nt. If nt has no interpretation semantics, NAME>INTERPRET returns 0.

See also: TRAVERSE-WORDLIST



NAME>STRING  "name-to-string"  TOOLS-EXT

( nt -- c-addr u )
NAME>STRING returns the name of the word nt in the character string c-addr u. The case of characters in the string is implementation-dependent. The buffer containing c-addr u may be transient and valid until the next invocation of NAME>STRING . A program shall not write into the buffer containing the resulting string.

See also: TRAVERSE-WORDLIST



NDROP  MULTIPLE

( x1 .. xn +n -- )
Remove x1 through xn and +n from the stack.



NDUMP  "name-dump"  DUMP

( n-addr u -- )
Display the contents of u consecutive addresses starting at name space address n-addr.

See also: DUMP DUMPX SPARSE



NDUP  MULTIPLE

( x1 .. xn +n -- x1 .. xn +n x1 .. xn +n )
Duplicate x1 through xn and +n on the stack.



NEEDS  RENAMED

( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. Find the file described by name without a preceding path in the list of files loaded with REQUIRE or REQUIRED. If the file cannot be found, exception -38 is issued.

This word has been replaced with REQUIRE.



NEW-LOG  LOG

( -- )
If the log file is closed, delete the file named in IS-LOG.

See also: CLOSE-LOG OPEN-LOG

Note: this is the default action of function key F2



NEWSORT  INSERT

( -- )
Remove all elements from the array to sort.

See also: ELEMENT SORT TOTAL



NOWBUFFER  NOW

Interpretation: Perform the function of -14 THROW.

Execution: ( +n -- a-addr )
Reserve +n address units of contiguous data space, only valid during the execution of the current definition. The data space pointer is unaffected by this operation. The initial content of the allocated space is undefined. a-addr is the aligned starting address of the allocated space.



OPEN-LOG  LOG

( -- )
If the log file is not already open, open the file. Any characters written to the screen are also written at the end of the log file.

See also: CLOSE-LOG NEW-LOG

Note: this is the default action of function key F2



OPTARG  ARGS

( -- c-addr u )
c-addr u represent the character string of the last OPTION. c-addr is undefined and u is zero if the OPTION character was not followed by : (colon) in OPTIONS. # (number sign) need not to be followed by :. Strings may be enclosed with " (double quote)
if they contain spaces; the quotes are not considered part of the string.



OPTION  ARGS

( char -- flag )
If char represents an option on the command line following a - (minus sign) or / (slash) or a previous option character, and char is present in OPTIONS, flag is true. If the matching character in OPTIONS is followed by a : (colon), OPTARG will represent the character string delimited by a space that followed char on the command line, possibly separated by a space. Otherwise OPTARG returns an empty string. # (number sign) for char represent a numeric option if # is present in OPTIONS. flag is false when char is not present in OPTIONS. An option character may follow directly after another option character that has no argument. Case of char is not significant.

See also: ARG



OPTIONS  ARGS

( -- c-addr )
c-addr is the address of a counted string containing the allowed option characters for OPTION. Case of characters is not significant. A character followed by : (colon), expects an argument string following the character on the command line, possibly separated by a space. # (number sign) matches a numeric option and does not have to be followed by :.

See also: OPTARG



ORDER  SEARCH-EXT

( -- )
Display the word lists in the search order in their search order sequence, from the first searched to the last searched. Also display the word list into which new definitions will be placed.

See also: VOCS



ORIGIN  TRACER

( -- x )
A value used in the tracer. When different from zero, numbers less than 1024 higher and greater than -1024 lower than this number are displayed as an offset from the value, assuming these are addresses, with a leading @ (at-sign). Other numbers are displayed as their values.

See also: TRACE



OS-IMPORT  DOSUTILS

( c-addr u "<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: ( "ccc<eol>" -- )
Parse ccc, the remainder of the parse area. Pass the string c-addr u as a command to the operating system with ccc as parameter list. When the command is finished, return to Forth.

See also: !! SYSTEM



PACK  RENAMED

( c-addr1 u c-addr2 -- c-addr2 )
Place the characters of the string specified by c-addr1 u as a counted string at c-addr2. An exception is issued if u is greater than the implementation defined length of a counted string.

See also: PLACE



PACK-DATE  TIMEPACK

( +n1 +n2 +n3 -- u )
Convert date to packed date u. +n1 is the day, +n2 is the month and +n3 is the year. Valid between January 1, 1980 and December 31, 2107.

See also: SET-FILE-TIME UNPACK-DATE



PACK-TIME  TIMEPACK

( +n1 +n2 +n3 -- u )
Convert time to packed time u. +n1 is the second, +n2 is the minute and +u3 is the hour. The second is divided by two.

See also: SET-FILE-TIME UNPACK-TIME



PALINDROME  PALINDRO

( c-addr u -- flag )
flag is true if and only if the string specified by c-addr u is a palindrome. Non-alphabetic characters are ignored and case of characters is significant.

See also: IPALINDROME.



PARSE-WORD  RENAMED

( "<spaces>name" -- c-addr u )
Skip leading spaces and control characters. Parse name delimited by a space or a control character.

c-addr is the address (within the input buffer) and u is the length of the parsed string. If the parse area was empty or contained no characters other than spaces or control characters, the resulting string has zero length.

This word has been replaced with PARSE-NAME.



PC!  "p-c-store"  IO-PORTS

( char u -- )
Write char to port u.



PC@  "p-c-fetch"  IO-PORTS

( u -- char )
Read char from port u.



PFILL  "paragraphs-fill"  PARAGRAPHS

( u1 u2 char -- )
If u2 is greater than zero, store char in each of u2 consecutive paragraphs of characters of memory beginning at paragraph address u1.



PMOVE  "paragraphs-move"  PARAGRAPHS

( u1 u2 u3 -- )
If u3 is greater than zero, copy the contents of u3 consecutive paragraph units at paragraph address u1 to the u3 consecutive paragraph units at paragraph address u2. After MOVEP completes, the u3 consecutive paragraph units at u2 contain exactly what the u3 consecutive paragraph units at x1 contained before the move.



POPCOUNT  POPCOUNT

( x -- n )
n is the number of bits set in x.



POSTFIX  POSTFIX

( -- )
The next invocation of HEADER or a word containing HEADER will use the string specified by c-addr u on the stack as the name of the definition.



PRECEDES  SORTING

( x1 x2 -- flag )
Compare element x1 with element x2 of the array to be sorted. flag is the result of the comparison.

See also: SORT



PRECEDES  ISORT

( x1 x2 -- flag )
Compare element x1 with element x2 of the array to be sorted. flag is the result of the comparison.

See also: SORT



PRECEDES  INSERT

( x1 x2 -- flag )
Compare element x1 with element x2 of the array to be sorted. flag is the result of the comparison.

See also: SORT



PRECEDES2  SORTING2

( n1 n2 -- flag )
Compare the element at index n1 with the element at index n2 of the array to be sorted. flag is the result of the comparison.

See also: SORT2



PRECEDES3  SORTING3

( x1 x2 -- flag )
Compare element x1 with element x2 of the array to be sorted. flag is the result of the comparison.

See also: SORT3



PREFIX  RENAMED

( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. Create a definition for name with the interpretation and compilation semantics defined below. name is referred to as a "prefix".

name Interpretation: ( i*x "name1" -- j*x )
Skip leading space delimiters. Parse name1 delimited by a space. Execute the method action of name1. Exception -32 is issued if this method is not valid for this word or datatype.

name Compilation: ( "name2" -- )
Skip leading space delimiters. Parse name2 delimited by a space. Compile the method action of name1. Exception -32 is issued if this method is not valid for this word or datatype.

This word has been replaced with METHOD.



PRIVATE  PRIVATES

( -- )
Mark the most recent definition as a private word. This word cannot be found after the execution of DEPRIVE.



PRIVATES  PRIVATES

( -- )
Start beginning of a PRIVATES .. DEPRIVE block.



PROC  "procedure"  ASSEMBLER

( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. Create a definition for name in the ASSEMBLER word list, called a "procedure", with the execution semantics defined below. If the data-space pointer is not aligned, reserve enough data space to align it. Add the ASSEMBLER word list to the search order.

Subsequent characters in the parse area represent source code in assembly language. Those characters are processed, generating machine code. The process continues, refilling the input buffer as needed, until END-CODE is processed.

name Execution: ( -- a-addr )
a-addr is the start of the machine code sequence that was generated when name was created.

See also: CODE



Proj$  "project-string"  PROJECT

( -- c-addr )
c-addr is the address of a counted string representing the description of the project for which the file is created.

See also: PROJECT



PROJECT  PROJECT

( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. Create a file with this name. An exception is issued if such a file already exists. Write a header to the file as defined in the strings Proj$, Cat$, and Creat$ and start the editor with the cursor at a place where the programmer can start typing. The header is followed by a ANEW for automatic forgetting of the code when reloading the file.



PTR  INTVEC

( "<spaces>name" -- addr )
Skip leading space delimiters. Parse name delimited by a space. addr is the storage of the extended address of the INTVECdefined by name at the time of creation of name.



PTYPE  "paragraphs-type"  PARAGRAPHS

( u1 u2 -- )
If u2 is greater than zero, display the character string at paragraph address u1 for a total of u2 paragraphs. The characters are displayed as with .EMIT.



PUT  FIELDS1

( c-addr1 u1 c-addr2 u2 -- )
Store at most u2 characters of the string specified by c-addr1 u1 in the location given by c-addr2 and fill the remainder with space characters.

See also: TFIELD:



PWD  "p-w-d"  DOSENVIR

( -- )
Display the name of the current directory.

See also: CD GET-DIRECTORY



QSORT  SORTING2

( n1 n2 xt1 xt2 -- )
Sort the range FIRST to LAST (inclusive) of item compared by the xt COMPARING and exchanged by the xt EXCHANGING. All indices in this range must be proper to pass to the xt's. The xt's are filled in into PRECEDES2 and EXCHANGE and must observe the interface.



R>DROP  

( -- )
Remove x from the return stack. Semantically equivalent to R> DROP.

This word has been replaced with RDROP.



READ-CHAR  CHARIO

( fileid -- char | n )
Read character char from the current position of the file identified by fileid.

If the operation succeeded, char is the value of the character. Otherwise n is -1 (minus one).

At the conclusion of the operation, FILE-POSITIONreturns the file position after the read character.

The file may be buffered or unbuffered.

See also: READ-CHAR3 WRITE-CHAR



READ-CHAR3  CHARIO

( fileid -- char flag ior )
Read character char from the current position of the file identified by fileid.

If the operation succeeded, flag is true and ior is zero.

If the operation is initiated when the value returned by FILE-POSITION is equal to the value returned by FILE-SIZE for the file identified by fileid, ior is zero, flag is false and char is zero. If ior is non-zero, an exception occurred during the operation and ior is the I/O result code.

If the operation is initiated when the value returned by FILE-POSITION is greater than the value returned by FILE-SIZE for the file identified by fileid, or the requested operation attempts to read portions of the file not yet written, ior is zero, flag is false and char is zero.

At the conclusion of the operation, FILE-POSITION returns the file position after the read character.

If the file was not opened by the method R/O or no buffer was allocated for it by BUFFER-FILE, ior is -57.

See also: READ-CHAR WRITE-CHAR



RECOVER-SCREEN  SCREENSV

( -- )
Restore the contents of the screen and the position of the cursor that were saved by SAVE-SCREEN. The data is not discarded to allow multiple restoring before using RESTORE-SCREEN. If no screen was saved, do nothing.



RECURSIVE  RECURSIV

Interpretation: Perform the function of -14 THROW.

Compilation: ( -- )
Makes the current definition available to the system. Normally this happens automatically when executing ; . When the current word is available to the system a reference to its name produces a recursive call to the definition. If RECURSIVE is not executed a reference to that name will result in calling a previous definition with the same name, if one exists.

See also: RECURSE



REF  REF

( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. Find name. Otherwise convert name to a single-cell number which is interpreted as an execution token. Exception -13 is issued if name cannot be found or not converted to a number. Find compiled references in colon definitions of name in all word lists. Display the words where the references occur and the count of the words where the references are found.

REF is implemented using pictured numeric output words. Its use will corrupt the transient region identified by #>.



REGRESS  REGRESSI

( -- )
Start a regression test. Values on the stack are disregarded.

See also: S:



REGRESSION  REGRESSI

( -- a-addr )
If REGRESSION is defined, regression tests are enabled.



REMOVE-DIRECTORY  DIRECTORY

( c-addr u -- ior )
Remove the directory named in the character string specified by c-addr u. If the directory name begins with ~ (tilde), it is expanded by EXPAND-PATH. If no exception occurs, ior is zero. Otherwise ior is the I/O result code.

See also: MAKE-DIRECTORY



REOPEN-FILE  REOPEN

( c-addr u fam fileid1 -- fileid2 ior )
If file access mode fam is read-only, open the file named in the character string specified by c-addr u. Otherwise open the file named in the string if the file exists, else create the file.

If the file was successfully opened or created, fileid2 is its identifier, and the file has been positioned at the end of the file.

Close the file identified by fileid1. Set the properties of the file identified by fileid1 to the file identified by fileid2. File access using fileid1 is performed by use of fileid2.

If an exception occurs, ior is the I/O result code and fileid2 is undefined.

See also: CLOSE-FILE CREATE-FILEFORCE-FILE OPEN-FILE



REPLACES  STRING-EXT

( c-addr1 u1 c-addr2 u2 -- )
Set the string c-addr1 u1 as the text to substitute for the substitution named by c-addr2 u2. If the substitution does not exist it is created. The program may then reuse the buffer c-addr1 u1 without affecting the definition of the substitution. Ambiguous conditions occur as follows: - The substitution cannot be created. - The name of a substitution contains the '%' delimiter character. REPLACES may allot data space and create a definition. This breaks the contiguity of the current region and is not allowed during compilation of a colon definition.

See also: SUBSTITUTE



RESET  ARRAYS

Interpretation: ( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. Reduce the storage area of name to zero. Subsequent use of name or an allowed method does lead to allocation. Exception -32 is issued if name was not defined by 2ARRAY, ARRAY or CARRAY.

Compilation: ( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. Append the run-time semantics given below to the current definition. Exception -32 is issued if name was not defined by 2ARRAY, ARRAY or CARRAY.

Run-time: ( -- )
Reduce the storage area of name to zero. Subsequent use of name or an allowed method does lead to allocation.



RESIZE-FILE  FILE

( ud fileid -- ior )
Set the size of the file identified by fileid to ud. ior 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 might not have been written.

At the conclusion of the operation, FILE-SIZE returns the value ud and FILE-POSITION returns an unspecified value.

Implementation: The value of FILE-POSITION is unaffected.

See also: READ-FILE READ-LINE



RESTORE-SCREEN  SCREENSV

( -- )
Restore the contents of the screen and the position of the cursor that were saved by SAVE-SCREEN and discard the saved data. If no screen was saved, do nothing.

See also: RECOVER-SCREEN



RETURN-STACK-CELLS  ENVIRON

( -- n )
Environment query. Maximum size of the return stack, in cells.



RM  DOSUTILS

( "ccc<eol>" -- )
Parse ccc, the remainder of the parse area. Start Coos Haak's RM program with ccc as parameter list. When the program has been terminated, return to Forth.



ROLL  CORE-EXT

( xu xu-1 .. x0 u -- xu-1 .. x0 xu )
Remove u. Rotate u+1 items on the top of the stack. An ambiguous condition exists if there are less than u+2 items on the stack before ROLL is executed.



ROOT-NAME  ROOTNAME

( c-addr1 u1 -- c-addr2 u2 )
If string c-addr1 u1 representing a path name starts with the directory given by FORTH-ROOT, replace this part by ~ (tilde). Otherwise if u1 is 2 and the string contains only a drive letter and : (colon), with a / (slash) appended. Otherwise c-addr2 is c-addr1 and u2 is u1. c-addr2 u2 represent the resulting string with uppercase characters converted to lower case.



ROT13  STRINGU2

( char1 -- char2 )
Convert character char1 to its rot13 equivalent char2



RROTATE  "r-rotate"  SHIFTS

( x1 u -- x2 )
Perform a logical right rotate of u bit-places on x1, giving x2. Put the least significant bits that were rotated out into the most significant bits vacated by the rotate.



S!  "s-store"  AUXSTACK

( x1 -- ) ( A: x2 -- x1 )
Replace x2 on the auxiliary stack with x1 from the data stack.

See also: S@



S"  "s-quote"  CORE

Interpretation: ( "ccc<quote>" -- c-addr u )
Parse ccc delimited by " (double-quote). Store the resulting string in a transient buffer c-addr u.

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

Run-time: ( -- c-addr u )
Return c-addr and u describing a string consisting of the characters ccc. A program shall not alter the returned string.

Implementation: A pair of " represent a single " in the resulting string. The maximum length of the string is the maximum length of a character counted string. CHForth allows for the storing of more such strings before new strings start to overwrite a previous string.

See also: C" S\"



S:  REGRESSI

( -- )
Terminate a regression test.

See also: REGRESS



S>  "s-from"  AUXSTACK

( -- x ) ( A: x -- )
Move x from the auxiliary stack to the data stack.

See also: 2>S 2S> >S R> S@



S@  "s-fetch"  AUXSTACK

( -- x ) ( A: x -- x )
Copy x from the auxiliary stack to the data stack.

See also: 2>S 2S> >S R@ S! S>SPICK T@ U@



SAVE-SCREEN  SCREENSV

( -- )
Save the contents of the screen and the cursor position to be restored by RECOVER-SCREEN and RESTORE-SCREEN.



SC  "search-comment"  SEARCHER

( "ccc<eol>" -- )
Parse ccc, the remainder of the parse area. If the length of ccc is zero, display this help text.

Search the files with extension "frt" in the current directory. Find ccc in the files where ccc occurs in lines following \G. Display the number of lines found, the name of the file, the line number and the characters of the line up to the width of the screen.

When a full screen is displayed the listing halts. Pressing space continues. Other keys stop.

See also: SF



SCR  "s-c-r"  BLOCK-EXT

( -- a-addr )
a-addr is the address of a cell containing the block number of the block most recently LISTed.



SDROP  "s-drop"  AUXSTACK

( -- ) ( A: x -- )
Remove x from the auxiliary stack. Semantically equivalent to S> DROP.

See also: >S DUP>S RDROP



SEARCH-CONTEXT  RENAMED

( c-addr u -- 0 | xt 1 | xt -1 )
Find the definition specified by the string c-addr u in all word lists in the search order. If the definition is not found, return zero. If the definition is found, return its execution token xt and one (1) if the word is immediate, minus one (-1) otherwise. Case of characters is significant if the value of CASESENSITIVEis not zero.

See also: FIND-NAME SEARCH-WORDLIST



SEARCH-ENVIRONMENT  RENAMED

( c-addr1 u1 -- c-addr2 u2 )
Search the operating system environment for the character string specified by c-addr1 u1, given without a terminating = (equals). The case of the characters is significant. c-addr2 u2 describe a temporary location containing a character string representing the characters in the matching environment string following =. If c-addr1 u1 is not found, u2 is zero and c-addr2 is a temporary location.

See also: ENVIRONMENT?

This word has been replaced with GETENV.



SEARCH-WORDLIST  SEARCH

( c-addr u wid -- 0 | xt 1 | xt -1 )
Find the definition identified by the string c-addr u in the word list identified by wid. If the definition is not found, return zero. If the definition is found, return its execution token xt and one (1) if the word is immediate, minus one (-1) otherwise. Case of characters is significant if the value of CASESENSITIVEis not zero.

See also: FIND FIND-NAME. FIND-NAME-IN.



SEE  TOOLS

( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. Find name. Otherwise convert name to a single-cell number which is interpreted as an execution token. Exception -13 is issued if name cannot be found or not converted to a number. If name is a high level definition, decompile it. Otherwise if the disassembler is present, disassemble starting from the address, displaying the whole definition if name is found, otherwise one line of code at the time, pressing Esc stops, other keys continue.

SEE is implemented using pictured numeric output words. Its use will corrupt the transient region identified by #>.

See also: DIS (SEE)



SET-CONTEXT  RENAMED

( wid -- )
Set the first searched word list in the search order to the word list identified by wid.

This word has been replaced with context !.



SET-FILE-ATTRIBUTE  ATTRIB

( c-addr u x -- ior )
Set the attribute of the file identified by the character string c-addr u to x. If the operation is successful, ior is zero. Otherwise ior is the I/O result code.

Implementation: If the file name begins with ~ (tilde), it is expanded by EXPAND-PATH.

See also: FILE-STATUS



SETBIT  BITS

( n addr -- )
Set bit n on addr to one. If the value of n lies outside the number of bits in a cell, the address is extended to the adjacent memory.



SF  "search-forth"  SEARCHER

( "ccc<eol>" -- )
Parse ccc, the remainder of the parse area. If the length of ccc is zero, display this help text.

Search the files with extension "frt" in the current directory. Find ccc in the files. Display the number of lines found, the name of the file, the line number and the characters of the line up to the width of the screen.

When a full screen is displayed the listing halts. Pressing space continues. Other keys stop.

See also: LOOK SC SL



SHOW  EDITING

( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. If name starts with ~ (tilde), it is expanded by EXPAND-PATH. Open file name with the list program. When name is omitted, the last opened file by this command or EDIT or WHAT is opened. If the file is not found in the current directory, the directories given by LIBS are searched for the file.



SHOWME  LOCATE

( "<spaces>ccc" -- )
Skip leading space delimiters. Parse ccc delimited by a space. If the length of ccc is zero, display this help text.

Find the string ccc in the kernel symbol table (~/meta/kernel.lst)
or the OS symbol list (~/meta/defines.frt). Display matching lines.

See also: LOCATE



SIGNUM  SIGNUM

( n1 -- n2 )
Examine n1. If n1 is less than zero, n2 is -1, otherwise if n1 is greater than zero, n2 is 1, otherwise n2 is 0.

See also: COMP2



SL  "search-libraries"  SEARCHER

( "ccc<eol>" -- )
Parse ccc, the remainder of the parse area. If the length of ccc is zero, display this help text.

Search the files with extension "frt" in the directories given by LIBS. Find ccc in the files. Display the number of lines found, the name of the file, the line number and the characters of the line up to the width of the screen.

When a full screen is displayed the listing halts. Pressing space continues. Other keys stop.

See also: LOOK SF



SLOW  TRACER

( -- )
Wait between successive executions of CR.

See also: FAST TWAIT



SMART-RENAME  SMARTREN

( c-addr1 u1 c-addr2 u2 -- ior )
Rename the file named by the character string c-addr1 u1 to the name in the character string c-addr2 u2 with preserving of time and date. ior is the I/O result code.

See also: RENAME-FILE



SORT  SORTING

( a-addr u -- )
Sort an array described by starting address a-addr and holding u elements.

See also: PRECEDES



SORT2  SORTING2

( a-addr u -- )
Sort an array described by starting index n1 and holding u elements.

See also: EXCHANGE PRECEDES2



SORT3  SORTING3

( a-addr u )
Sort an array described by starting address a-addr and holding u elements.

See also: PRECEDES3



SPARSE  DUMP

( -- a-addr )
a-addr is the address of a cell containing a flag allowing DUMPand variants to skip lines with equal contents.



SPICK  "s-pick"  AUXSTACK

( u -- xu ) ( A: xu .. x0 -- xu .. x0 )
Copy xu from the auxiliary stack to the data stack.

See also: >S S@ S>



SPLIT-TEXT  SEARCHER

( c-addr1 u1 c-addr2 u2 -- c-addr3 u3 c-addr1 u4 )
Search the string specified by c-addr1 u1 for the string specified by c-addr2 u2. If a match was found, c-addr3 u3 describe the part of the string after the match and c-addr1 u4 describe the string before the match. Otherwise or if u1 is zero, u3 is zero and u4 is u1.

Implementation: The paragraph address of c-addr1 may be modified by >SEG1. The paragraph address of c-addr2 may be modified by >SEG2.

See also: SEARCH SPLIT



SQRT  "square-root"  SQRT

( ud -- u )
Generate the square root u from ud.



ST  DOSUTILS

( "ccc<eol>" -- )
Parse ccc, the remainder of the parse area. Start Norton's Text Search with "*.frt" as first parameter to search in Forth files and ccc as the next parameter list. When the program has been terminated, return to Forth.

See also: TS



STACK  STACK

Interpretation: ( i*x "ccc" -- j*x )
Skip leading space delimiters. Parse "ccc" delimited by a space. Exception -16 is issued if the number of characters in ccc before the required | (bar) is zero. Create temporary definitions for each character in ccc before | and move values from the stack to the definitions, storing the value on the top of the stack in the rightmost character definition. If the string following | is not empty, return the values stored in the definitions on the stack in the order of the character definitions named in the string following | . Otherwise do not return a value to the stack.

See also: DSTACK [STACK]

Compilation: ( "ccc" -- )
Skip leading space delimiters. Parse "ccc" delimited by a space. Exception -16 is issued if the number of characters in ccc before the required | (bar) is zero. Create temporary definitions for each character in ccc before | . Append the run-time semantics given below to the current definition.

Run-time: ( i*x -- j*x )
Move values from the stack to the definitions above, storing the value on the top of the stack in the rightmost character definition. If the string following | was not empty, return the values to the stack in the order of the characters named in the string following | . Otherwise do not return a value to the stack.

See also: DSTACK



STACK-CELLS  ENVIRON

( -- n )
Environment query. Maximum size of the data stack, in cells.



STATE  CORE

( -- a-addr )
a-addr is the address of a cell containing the compilation-state flag. STATE is true when in compilation state, false otherwise. Only the following standard words alter the value in STATE : :, ;, ABORT, QUIT, :NONAME, [, ] and ;CODE.

Note: A program shall not directly alter the contents of STATE.

Implementation: STATE is immutable. Its value is a true or a false flag.

See also: COMPILING?



STICK  ROLLING

( xu .. x1 x0 x u -- x .. x1 x0 )
Remove x and u. Replace xu by x.

See also: PICK)



STOP?  "stop-question"  STOPPING

( -- flag )
Flag is false if no key is pressed. Flag is true if the escape key is pressed. Otherwise wait for another key press, returning true if a control or space key is pressed, false otherwise.



STR>  "string"  STRSTACK

( -- c-addr u ) ( $: str -- )
Place c-addr u on the data stack describing the string str on the string stack. Remove str from the string stack.



STRING  STRING1

( +n "name" -- )
Make a structure for name, with space for a most +n characters. Initially, the contents is the empty string.

name Execution: ( -- c-addr u )
Return the stored string.

TO name ( c-addr u -- )
Store the string, truncated to +n characters.

+TO name ( c-addr u -- )
Add string, truncated to +n characters combined.

CLEAR name ( -- )
Make u zero.



STRING  STRING2

( +n "name" -- )
Make a structure for name, with space for a most +n characters. Initially, the contents is the empty string.

name Execution: ( -- c-addr u )
Return the stored string.

TO name ( c-addr u -- )
Store the string, truncated to +n characters.

+TO name ( c-addr u -- )
Add string, truncated to +n characters combined.

CLEAR name ( -- )
Make u zero.



STRINGS?  "strings-question"  VIEW

( -- x )
When this value is true, inline strings are displayed as with DUMP using VIEW.



STRLOWER  STRINGU1

( c-addr u -- c-addr u )
Convert any upper case characters in the string specified by c-addr u to their lower case equivalents.



STRPART  STRING3

( c-addr1 u1 n1 +n2 -- c-addr2 u2 )
c-addr2 u2 describe the part of the string represented by c-addr1 u1 starting at offset n1 and a length of n2 with a maximum of u1. If n1 is negative, the offset is counted from c-addr1 + u1. u2 lies between zero and u1 so there are no characters outside the source string in the destination string. +n2 must be positive.



STRREV  STRINGU1

( c-addr u -- c-addr u )
Reverse the order of the chararacters in the string specified by c-addr u in place.



STRROT13  STRINGU2

( c-addr u -- c-addr u )
Convert the characters in the string specified by c-addr u with ROT13.



STRSORT  STRMORE

( c-addr u -- c-addr u )
Sort the characters in the string specified by c-addr u in place and in ascending order.



STRUPPER  STRINGU1

( c-addr u -- c-addr u )
Convert any lower case characters in the string specified by c-addr u to their upper case equivalents.



SUBSTITUTE  STRING-EXT

( c-addr1 u1 c-addr2 u2 -- c-addr2 u3 n )
Perform substitution on the string c-addr1 u1 placing the result at string c-addr2 u3, where u3 is the length of the resulting string. An error occurs if the resulting string will not fit into c-addr2 u2 or if c-addr2 is the same as c-addr1. The return value n is positive or 0 on success and indicates the number of substitutions made. A negative value for n indicates that an error occurred, leaving c-addr2 u3 undefined. Negative values of n are implementation defined except for values in table 9.1 THROW code assignments. Substitution occurs left to right from the start of c-addr1 in one pass and is non-recursive. When text of a potential substitution name, surrounded by '%' (ASCII $25) delimiters is encountered by SUBSTITUTE, the following occurs: a) If the name is null, a single delimiter character is passed to the output, i.e., %% is replaced by %. The current number of substitutions is not changed. b) If the text is a valid substitution name acceptable to REPLACES, the leading and trailing delimiter characters and the enclosed substitution name are replaced by the substitution text. The current number of substitutions is incremented. c) If the text is not a valid substitution name, the name with leading and trailing delimiters is passed unchanged to the output. The current number of substitutions is not changed. d) Parsing of the input string resumes after the trailing delimiter. If after processing any pairs of delimiters, the residue of the input string contains a single delimiter, the residue is passed unchanged to the output.

See also: UNESCAPE



SYNONYM  TOOLS-EXT

( "<spaces>newname" "<spaces>oldname" -- )
For both strings skip leading space delimiters. Parse newname and oldname delimited by a space. Create a definition for newname with the semantics defined below. newname may be the same as oldname.

newname interpretation: ( i*x -- j*x )
Perform the interpretation semantics of oldname.

newname compilation: ( i*x -- j*x )
Perform the compilation semantics of oldname. newname inherits the flags from oldname.

See also: ALIAS



SYSTEM  DOSENVIR

( c-addr u -- )
Execute the operating system command specified by the character string c-addr u.

See also: !! OS-IMPORT



S\"  "s-slash-quote"  CORE-EXT

Interpretation: ( "ccc<quote>" -- c-addr u )
Parse ccc delimited by " (double-quote), using the translation rules below. Store the resulting string c-addr u in a transient buffer.

Compilation: ( "ccc<quote>" -- )
Parse ccc delimited by " (double-quote), using the translation rules below. Append the run-time semantics given below to the current definition.

Translation rules: Characters are processed one at a time and appended to the compiled string. If the character is a ‘\’ character it is processed by parsing and substituting one or more characters as follows, where the character after the backslash is case sensitive: \a BEL (alert, ASCII 7)
\b BS (backspace, ASCII 8)
\e ESC (escape, ASCII 27)
\f FF (form feed, ASCII 12)
\l LF (line feed, ASCII 10)
\m CR/LF pair (ASCII 13, 10)
\n newline (implementation dependent newline, eg, CR/LF, LF, or LF/CR)
\q double-quote (ASCII 34)
\r CR (carriage return, ASCII 13)
\t HT (horizontal tab, ASCII 9)
\v VT (vertical tab, ASCII 11)
\z NUL (no character, ASCII 0)
\0 NUL (no character, ASCII 0)
\" double-quote (ASCII 34)
\x<hexdigit><hexdigit> The resulting character is the conversion of these two hexadecimal digits. An ambiguous conditions exists if \x is not followed by two hexadecimal characters. \\ backslash itself (ASCII 92)
Any other character is replaced by itself.

Run-time: ( -- c-addr u )
Return c-addr and u describing a string consisting of the translation of the characters ccc. A program shall not alter the returned string.

See also: C" S"



T.SDEPTH  TRACER

( -- a-addr )
A value. n is the maximum number of stack values displayed while tracing.



T@  "t-fetch"  AUXSTACK

( -- x1 ) ( A: x1 x2 -- x1 x2 )
Copy x1 from the auxiliary stack to the data stack.

See also: >S S@ S> U@



TERMINATE?  "terminate-question"  PAGING

( -- flag )
flag is the same value that was returned by the last execution of CR? or false when FRESH was executed, whichever came later.



TESTBIT  BITS

( n addr -- flag )
flag is true if and only if bit n on addr is one. If the value of n lies outside the number of bits in a cell, the address is extended to the adjacent memory.



TFIELD:  FIELDS1

( n1 n2 "<spaces>name" -- n3 n2 )
Skip leading space delimiters. Parse name delimited by a space. Create a definition for name with the execution semantics defined below. Return n3 = n1 + n2 where n1 is the offset in the data structure before TFIELD: executes, and n2 is the size of the data to be added to the data structure. n1 and n2 are in address units.

name Execution: ( addr1 -- addr2 n2 )
Add n1 to addr1 giving addr2. n2 is the size of this element.

See also: FIELD: PUT



THRU  BLOCK-EXT

( i*x u1 u2 -- j*x )
LOAD the mass storage blocks numbered u1 through u2 in sequence. Other stack effects are due to the words LOADed.



TIC  TICTOC

( -- )
Start counting clock ticks.



TILL  DECOMPILER

( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. Find name in the first word list of the search order. Exception -13 is issued if name cannot be found in the first word list in the search order. Otherwise decompile all the words in this word list starting with the last compiled until the definition of name.

See also: ALL



TIMES  REPEATED

( n -- )
Repeat interpretation of the preceding source in the input buffer for n times.

See also: MANY LOOPS



TOC  TICTOC

( -- )
Stop counting clock ticks.



TOGGLEBIT  BITS

( n addr -- )
Set bit n on addr to its complement. If the value of n lies outside the number of bits in a cell, the address is extended to the adjacent memory.



TOTAL  INSERT

Total elements added.

See also: ELEMENT TOTAL



TRAVERSE-REVERSED  TRAVERSE

( i*x xt wid -- j*x )
Remove wid and xt from the stack. Execute xt once for every word in the wordlist wid, passing the name token nt of the word to xt, until the wordlist is exhausted or until xt returns false. The invoked xt has the stack effect ( k*x nt -- l*x flag ). If flag is true, TRAVERSE-REVERSED will continue with the next name, otherwise it will return. TRAVERSE-REVERSED does not put any items other than nt on the stack when calling xt, so that xt can access and modify the rest of the stack. TRAVERSE-REVERSED visits words in historic order, words with the same name are called in the order oldest-to-newest (possibly with other words in between). An ambiguous condition exists if words are added to or deleted from the wordlist wid during the execution of TRAVERSE-REVERSED.

See also: TRAVERSE-WORDLIST



TRAVERSE-WORDLIST  TOOLS-EXT

( i*x xt wid -- j*x )
Remove wid and xt from the stack. Execute xt once for every word in the wordlist wid, passing the name token nt of the word to xt, until the wordlist is exhausted or until xt returns false. The invoked xt has the stack effect ( k*x nt -- l*x flag ). If flag is true, TRAVERSE-WORDLIST will continue with the next name, otherwise it will return. TRAVERSE-WORDLIST does not put any items other than nt on the stack when calling xt, so that xt can access and modify the rest of the stack. TRAVERSE-WORDLIST may visit words in any order, with one exception: words with the same name are called in the order newest-to-oldest (possibly with other words in between). An ambiguous condition exists if words are added to or deleted from the wordlist wid during the execution of TRAVERSE-WORDLIST.

Implementation: TRAVERSE-WORDLIST visits words in newest-to-oldest order.

See also: NAME>STRING NAME>INTERPRET NAME>COMPILETRAVERSE-REVERSED



TS  DOSUTILS

( "ccc<eol>" -- )
Parse ccc, the remainder of the parse area. Start Norton's Text Search with ccc as parameter list. When the program has been terminated, return to Forth.

See also: GREP ST



TURNKEY  TURNKEY

( c-addr u -- )
Write the CHForth program with the name specified by c-addr u as an executable file. name may have a preceding path. Any extension is replaced by ".exe".

The saved program does not contain names, so interpreting words from the input stream by the executable file is not possible; parsing with PARSE-NAME or WORD and interpreting them as numbers or strings is available. The data space and list space are limited to the current values of HERE and LHERE.

When the saved program is executed from the operating system prompt, space is allocated in the data, list and string space according to the values given to RESERVE, RESERVED, LRESERVE and QRESERVE. The characters on the command line following the program name are placed in the input buffer. The execution token of last definition or the value in LATESTXT will be executed. Output is set to STDOUT. When the task has been finished, control will be returned to the operating system. When an exception occurs that is not handled by CATCH in the user program, output is set to STDERR to redirect messages to the screen and the exception is passed to HALT.

See also: SAVE-SYSTEM



T{  REGRESSI

( -- )
Start a regression test. Do not touch values on the stack.

See also: -> }T



U@  "u-fetch"  AUXSTACK

( -- x1 ) ( A: x1 x2 x3 -- x1 x2 x3 )
Copy x1 from the auxiliary stack to the data stack.

See also: S@ S> T@



UCONSTRAIN  "u-constrain"  CONSTRAI

( u1 u2 u3 -- u4 )
If u1 is not smaller than u2 and not greater than u3, u4 is u1. If u1 is smaller than u2, u4 is u2. If u1 is greater than u3, u4 is u3.



UMAX  "u-max"  UMINMAX

( u1 u2 -- u3 )
u3 is the greater if u1 and u2



UMIN  "u-min"  UMINMAX

( u1 u2 -- u3 )
u3 is the lesser if u1 and u2



UNESCAPE  STRING-EXT

( c-addr1 u1 c-addr2 -- c-addr2 u2 )
Replace each '%' character in the input string c-addr1 u1 by two '%' characters. The output is represented by c-addr2 u2. The buffer at c-addr2 shall be big enough to hold the unescaped string. An ambiguous condition occurs if the resulting string will not fit into the destination buffer (c-addr2).

See also: SUBSTITUTE



UNPACK-DATE  TIMEPACK

( u -- +n1 +n2 +n3 )
Convert packed date u to date. +n1 is the day, +n2 is the month, +n3 is the year. The values lie between between January 1, 1980 and December 31, 2107.

See also: GET-FILE-TIME PACK-DATE



UNPACK-TIME  TIMEPACK

( u -- +n1 +n2 +n3 )
Convert packed time u to time. +n1 is the second, +n2 is the minute, +n3 is the hour. The second is a multiple of two.

See also: GET-FILE-TIME PACK-TIME



UNUSED  CORE-EXT

( -- u )
u is the amount of space remaining in the region addressed by HERE, in address units.



VER  ENVIRON

( -- n )
Environment query. Version of this Forth system.



VIEW  VIEW

( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. Find name. Otherwise convert name to a single-cell number which is interpreted as an execution token. Exception -13 is issued if name cannot be found or not converted to a number. Display one data line at the time, pressing Esc stops, other keys continue.



VOCNAME$  MAPWORDS

( wid -- c-addr u )
If the word list identifier wid has a name, c-addr u describe the name. Otherwise c-addr u describe the value of wid as a numeric string.

See also: .VOCNAME



VOCS  MAPWORDS

( -- )
Display the word lists that have a name, i.e. those that were created by VOCABULARY in reversed historical order.

See also: ORDER



WC  DOSUTILS

( "ccc<eol>" -- )
Parse ccc, the remainder of the parse area. Start Coos Haak's WC program with ccc as parameter list. When the program has been terminated, return to Forth.



WHAT  EDITING

( -- )
After an exception was issued during loading of a file, open the file with the editor, display the line where the exception occured and place the cursor after the word. If the exception was issued during loading of a block, LIST the block with the line indicated. If the exception was issued when compiling at the terminal of during EVALUATE, do nothing.

Note: this is the default action of function key F4

See also: EDIT LOCATE WHICH



WHICH  LOCATE

( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. If the length of name is zero, display this help text.

Find name. If name was defined in a block, display the block number and the number of the first line of the definition. If name was defined in a text file, display the name of the file and the number of the first line of the definition. A message is issued if name cannot be found, or the source file containing the definition of name cannot be located, or name was compiled at the terminal, or by EVALUATE.

See also: LOCATE WHAT



WID?  "w-i-d-question"  MAPWORDS

( wid -- flag )
flag is true if and only if the word list identifier wid has a name associated with it.



WILDCARDS  WILDCARD

( c-addr1 u1 -- c-addr2 u2 )
Interpret * (star) and other characters in string c-addr1 u1 giving string c-addr2 u2 by the following rules:

     input string            output string
     ""                      "*.*"
     "xxx/"                  "xxx/*.*"
     "xxx"                   "xxx.*"
     "xxx."                  "xxx.*"
     "xxx;"                  "xxx"
     ".."                    "../*.*"


WITH  WITH

( ["ccc1" ["ccc2"]] -- )
Parse ccc1 and ccc2 delimited by spaces. If ccc1 is empty, list the words in most wordlists as with WORDS. Otherwise, the names in these word lists containing ccc1 and optional ccc2 as part of the name are listed. Lower case characters are considered equal to their upper case equivalents.

See also: 1WITH



WORD  CORE

( char "<chars>ccc<char>" -- c-addr )
Skip leading delimiters. Parse ccc delimited by char. Exception -18 is issued if the length of the parsed string is greater than the implementation defined maximum length of a counted string.

c-addr is the address of a transient region containing the parsed word as a counted string. If the parse area was empty or contained no characters other than the delimiter, the resulting string has zero length. A program may replace characters within the string.

See also: PARSE PARSED PARSE-NAME



WORDLISTS  ENVIRON

( -- n )
Environment query. Maximum number of word lists usable in the search order.



WORDS  TOOLS

( -- )
List the word names in the first word list of the search order.

See also: MAP-VOCS MAP-WORDS WITH



WRITE-CHAR  CHARIO

( char fileid -- ior )
Write character char to the file identified by fileid at its current position. ior is the I/O result code.

At the conclusion of the operation, FILE-POSITIONreturns the next file position after the character written to the file and FILE-SIZE returns a value greater than or equal to the value returned by FILE-POSITION.

The file may be buffered or unbuffered.

See also: BUFFER-FILE READ-CHAR READ-CHAR3



[:  "bracket-colon"  QUOTATIONS

Interpretation: ( C: -- nest-sys false )
Create an execution token xt in high memory like :NONAME.

Compilation: ( C: -- nest-sys true )
Suspends compiling to the current definition, starts a new nested definition, and continue compilation this nested definition. Inside the nested definition RECURSE applies to the nested definition.

See also: ;].



[CHAR]  "bracket-char"  CORE

Interpretation: Perform the function of -14 THROW.

Compilation: ( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. Append the run-time semantics given below to the current definition.

Run-time: ( -- char )
Place char, the value of the first character of name, on the stack.

See also: CHAR



[COMPILE]  "bracket-compile"  CORE-EXT

Interpretation: Perform the function of -14 THROW.

Compilation: ( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. Find name. If name has other than default compilation semantics, append them to the current definition; otherwise append the execution semantics of name. Exception -13 is issued if name is not found.

See also: POSTPONE



\PARSE  "backslash-parse"  ESCAPE

( "ccc<quote>" -- c-addr u )
Parse ccc delimited by " (double-quote). Store the resulting string c-addr u at a temporary location. The ccc may contain the escape character \ (backslash) before another character. The allowed characters are described below. Other characters are included literally. If \ is followed by the letter x and two upper of lower case hexadecimal digits, the corresponding character is included the output string. The maximum length of the temporary buffer is the maximum length of an implementation defined counted string. CHForth allows for the storing of more such strings before new strings start to overwrite a previous string. If ccc runs through the end of the input buffer, a terminating " is not required.

String ccc contains              Substituted in c-addr u by
     \a                          alarm character
     \b                          backspace character
     \e                          escape (27) character
     \f                          formfeed character
     \l                          linefeed character
     \m                          DOS newline characters
     \n                          newline, system dependent
     \q                          double-quote
     \r                          return character
     \t                          tab character
     \v                          vertical tab (11) character
     \xnn                        equivalent character of hex number
     \z                          NUL
     \0                          NUL
     \<char>                     \<char>
     <char>                      <char>


See also: S\"


]]  "double-right-bracket"  POSTPONE

Interpretation: Perform the function of -14 THROW.

Compilation: ( "name1" ... "[[" -- )
Enter postponing state.



_HELP  "underscore-help"  ARGS

( -- )
This vector will contain the help routine of a turnkey program.



_MAIN  "underscore-main"  ARGS

( -- )
This vector will contain the main routine of a turnkey program.



_MOD  "floored-mod"  MODULO

( n1 n2 -- n3 )
Divide n1 by n2, giving the single-cell remainder n3. Exception -10 is issued if n2 is zero. If n1 and n2 differ in sign the result returned will be the same as returned by the phrase >R S>D R> FM/MOD DROP.



{D  "accolade-d"  DLOCALS

Interpretation: Perform the function of -14 THROW.

Compilation: ( "<spaces>name1" .. "<spaces>namei" [ "\"|"|" "<spaces>namej" .. "<spaces>namen" ] [ "--" "ccc" ] "}" -- )
Create local identifiers by repeatedly skipping leading spaces, parsing name, and executing a double cell equivalent of (LOCAL), ignoring \ or |. The list of locals to be defined is terminated by }. Ignore text between -- and }. Append the run-time semantics given below to the current definition.

Run-time: ( xd1 .. xdi -- )
Initialize local identifiers name1 to namei as the double cell equivalent of the description for (LOCAL) , each of which takes as the initial value the stack item identified by its index, removing it from the stack. Initialize local identifiers namej to namen as described in (LOCAL) , each with the value zero. When invoked, each local will return its value. The value of a local may be changed using TO, +TO and CLEAR.

Methods for name:

+TO      ( d|ud -- )     Add d|ud to name
CLEAR    ( -- )          Store zero in name
TO       ( xd -- )       Store xd in name
Implementation: Every dlocal after | needs an extra don't care item on the stack.

See also: {:


||  "logical-or"  LOGICALS

( flag -- | true )
Interpretation: Remove flag. If flag was not false, put true on the stack and stop interpretation of the current input buffer. Otherwise continue.

Execution: Remove flag. If flag was not false, put true on the stack and return control to the calling definition specified by nest-sys. Otherwise continue.

See also: &&



}T  REGRESSI

( i*x -- )
Check the values i*x to match with the values remembered by ->.