."  "dot-quote"  CORE

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

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

Run-time: ( -- )
Display ccc.

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

See also: .(



.ELAPSED  "dot-elapsed"  UTILITY

( -- )
Display the time elapsed since the last execution of TIMER-RESET, in the format specified by ELAPSED followed by a space.

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



.NAME  "dot-name"  UTILITY

( dea -- )
Display the name associated with dictionary entry address dea. name is printed on a new line if it does not fit on the line and is followed by two spaces.

See also: .VOCNAME NAME$



?EXIT  UTILITY

Interpretation ( flag -- )
If flag is false, continue, otherwise return control to the calling definition.

Compilation: ( -- )
Append the run-time semantics below to the current definition.

Run-time: ( flag -- ) ( R: nest-sys | -- )
If flag is false, continue. Otherwise return control to the calling definition specified by nest-sys. ?EXIT may not used within do-loops.

See also: EXIT



ANEW  UTILITY

( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. If name is found, execute it. It is assumed that name was defined with ANEW or MARKER.

Create a definition for name with the execution semantics as defined for MARKER.

See also: FORGET



DO-DEBUG  UTILITY

( -- )
Display a picture of the data stack. When an exception is THROWn, display the annotated return stack with .RS.

See also: NO-DEBUG.



DOCS  UTILITY

( -- c-addr )
c-addr is the address of a counted string representing the path to and extension of the Forth help files. If the path begins with ~ (tilde), it is relative to the path given in FORTH-ROOT.



DOES>  "does"  CORE

Interpretation: ( -- )
Append the run-time semantics below to the current definition. Append the initiation semantics given below to the current definition.

Compilation: ( C: colon-sys1 -- colon-sys2 )
Append the run-time semantics below to the current definition. The current definition is not made findable by DOES> . Consume colon-sys1 and produce colon-sys2. Append the initiation semantics given below to the current definition.

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

Initiation: ( i*x -- i*x a-addr ) ( R: -- nest-sys2 )
Save information nest-sys2 about the calling definition. Place name's data field address on the stack. The stack effects i*x represent arguments to name.

name Execution: ( i*x -- j*x )
Execute the portion of the definition that begins with the initiation semantics appended by DOES> which modified name. The stack effects i*x and j*x represent arguments to and results from name, respectively.



EXIT  CORE

Interpretation ( -- )
Return to the calling definition.

Compilation: ( -- )
Append the run-time semantics below to the current definition.

Run-time: ( -- ) ( R: nest-sys )
Return control to the calling definition specified by nest-sys. Before executing EXIT within do-loops, a program shall discard the loop-control parameters by executing UNLOOP.

See also: ?EXIT



FILE?  UTILITY

( c-addr1 u1 -- c-addr2 u2 ior )
Search for the file named in c-addr1 u1. If it exists, ior is zero c-addr2 is c-addr1 and u2 is u1. Otherwise proceed as with LIB?.



FREE-BUF  UTILITY

( -- ior )
Release the buffer allocated by GET-BUF. Restore DTAand LIMIT to their values before the execution of GET-BUF.



GET-BUF  UTILITY

( u -- a-addr )
Allocate a buffer for u characters. a-addr is its address. Place a-addr also in DTA. The value of LIMITis changed.

See also: FREE-BUF.



HTAB  "h-tab"  UTILITY

( u -- )
If u is greater than zero, emit spaces until the cursor is at column u of the current user output device.



INCLUDE  FILE-EXT

( "<spaces>name" -- )
Skip leading white space and parse name delimited by a white space character. Push the address and lenght of the name on the stack and perform the function of INCLUDED.



INFO  UTILITY

( -- )
Display the names of the directories given by FORTH-ROOT, LIBS, DOCS, the name of the current directory, the name of the current program, and the string in MYFILE.



LIB?  UTILITY

( c-addr1 u1 -- c-addr2 u2 ior )
Search the directories in the order given by LIBS for the file named in c-addr1 u1. If the file is found, ior is zero and c-addr2 u2 represent the directory and file name of the matching file. Otherwise ior is -38, and c-addr2 u2 represent the file name given by c-addr1 u1 without the preceding path. If the string pointed to by LIBS has length zero, c-addr2 u2 is c-addr1 u1 and ior is zero.

Directory names in LIBS starting with ~ (tilde) are expanded by EXPAND-PATH for the search process but will be returned unchanged in c-addr2 u2.

See also: BASENAME REQUIRE REQUIRED



LIBS  UTILITY

( -- c-addr )
c-addr is the address of a counted string representing the path to the Forth library files. Multiple directories are separated by ; (semicolon). Path names beginning with ~ (tilde) are relative to the path given by FORTH-ROOT.

See also: INFO LIB? REQUIRED.



MARKER  CORE-EXT

( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. Create a definition for name with the execution semantics defined below.

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

See also: ANEW FORGET



NO-DEBUG  UTILITY

( -- )
Don't display a picture of the data stack.

See also: DO-DEBUG.



RELOAD  UTILITY

( i*x -- j*x )
The file that was loaded as a parameter on the command line or at the terminal may be INCLUDED again without the need of giving its name.

See also: INFO MYFILE



REQUIRE  FILE-EXT

( "<spaces>name" -- )
Skip leading white space and parse name delimited by a white space character. Push the address and length of the name on the stack and perform the function of REQUIRED.



REQUIRED  FILE-EXT

( c-addr u -- )
Find the file described by the string without a preceding path in the list of files loaded with REQUIRE or REQUIRED. If found, continue. Otherwise load the file as with INCLUDED from the current directory or if given, from the preceding path. If the file cannot be found, load the file as with INCLUDED, ignoring TRACE and ECHO, from one of the directories in the order given in LIBS. If the file cannot be found, exception -38 is issued.

See also: LIB? WANT



TABULATE  UTILITY

( -- )
If the cursor is at a screen position less than 16 from the end of a screen line perform CR. Otherwise emit spaces until the cursor is at a column divisable by 16.



THIS  UTILITY

( "<spaces>name" -- xt | u )
Skip leading space delimiters. Parse name delimited by a space. Find name, possibly with a ' (tick) prefix. If name is found, xt is its execution token. Otherwise try to convert name into a single-cell number u. An exception is issued if conversion to a number fails.



TIMER  UTILITY

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

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

See also: .ELAPSED FTIMER INTERPRET



WANT  UTILITY

( "<spaces>name" [..] -- )
Skip leading white space and parse name delimited by a white space character. Push the address and length of name on the stack and perform the function of WANTED. Repeat until the parse area is empty.



WTYPE  "wrap-type"  UTILITY

( c-addr u -- )
If the string described by c-addr u would not fit on the current output line with two trailing spaces, perform CR. Print the the string followed with two spaces.



[DEFINED]  "bracket-defined"  TOOLS-EXT

Compilation: Perform the execution semantics given below.

Execution: ( "<spaces>name ..." -- flag )
Skip leading space delimiters. Parse name delimited by a space. Return a true flag if name is the name of a word that can be found with FIND-NAME; otherwise return a false flag. [DEFINED] is an immediate word.



[ELSE]  "bracket-else"  TOOLS-EXT

Compilation: Perform the execution semantics given below.

Execution: ( "<spaces>name ..." -- )
Skipping leading spaces, parse and discard space-delimited words from the parse area, including nested occurrences of [IF] ... [THEN] and [IF] ... [ELSE] ... [THEN] , until the word [THEN] has been parsed and discarded. If the parse area becomes exhausted, it is refilled as with REFILL. [ELSE] is an immediate word.

Implementation: Exception -58 is issued if the end of the input stream is reached and cannot be refilled before the terminating [THEN] is parsed.



[IF]  "bracket-if"  TOOLS-EXT

Compilation: Perform the execution semantics given below.

Execution: ( flag | flag "<spaces>name ..." -- )
If the flag is true, do nothing. Otherwise skipping leading spaces, parse and discard space-delimited words from the parse area, including nested occurrences of [IF] ... [THEN] and [IF] ... [ELSE] ... [THEN] , until either the word [ELSE] or the word [THEN] has been parsed and discarded. If the parse area becomes exhausted, it is refilled as with REFILL. [IF] is an immediate word.

Implementation: Exception -58 is issued if the end of the input stream is reached and cannot be refilled before the terminating [ELSE] or [THEN] is parsed.



[THEN]  "bracket-then"  TOOLS-EXT

Compilation: Perform the execution semantics given below.

Execution: ( -- )
Does nothing. [THEN] is an immediate word.



[UNDEFINED]  "bracket-undefined"  TOOLS-EXT

Compilation: Perform the execution semantics given below.

Execution: ( "<spaces>name ..." -- flag )
Skip leading space delimiters. Parse name delimited by a space. Return a false flag if name is the name of a word that can be found with FIND-NAME; otherwise return a true flag. [UNDEFINED] is an immediate word.



\H  "backslash-other"  UTILITY

Compilation: Perform the execution semantics given below.

Execution: ( "ccc<eol>" -- )
Add OTHER to the search order. Interpret the remainder of the parse area. Restore the previous search order. \H is an immediate word.