( "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:
( 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.
Interpretation: Perform the function of -14
Compilation: ( x -- ) ( C: colon-sys -- colon-sys )
****
( u1 -- u2 )
u2 is the minimum number of cells needed to store u1 characters.
This word has been replaced with
( -- n )
Environment query.
Maximum number of local variables in a definition.
( u1 -- u2 )
u2 is the minimum number of paragraphs needed to store u1
characters.
This word has been replaced with
( 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
See also:
Interpretation: ( "ccc<quote>" -- ) ( $: -- str )
Perform the function of -14
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:
( -- ) ( $: str1 str2 -- str3 )
Append string str2 to the end of string str1 giving string str3.
All strings reside on the string stack.
( 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:
( -- ) ( $: str -- )
Display the character string str on the string stack and remove
the string from the string stack.
( 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
See also:
( u -- ) ( $: -- str )
Place a string consisting of u characters for space on the string
stack.
( 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:
( 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.
( -- +n ) ( $: strn .. str1 -- strn .. str1 )
+n is the number of strings on the string stack.
( -- ) ( $: str -- )
Remove string str from the string stack.
( -- ) ( $: str -- str str )
Duplicate string str on the string stack.
( -- u ) ( $: str -- str )
u is the number of characters in string str on the string stack.
( a-addr -- )
Delete the string pointed to by a-addr.
See also:
( -- ) ( $: str1 str2 -- str1 str2 str1 )
Place a copy of str1 on the top of the string stack.
( -- ) ( $: str1 str2 str3 -- str2 str3 str1 )
Rotate the top three strings on the string stack.
( -- ) ( $: str1 str2 -- str2 str1 )
Exchange the two top strings on the string stack.
( 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:
( n1 n2 -- )
****
( 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.
( 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
( 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:
( addr -- )
Display data starting from addr.
Interpretation: Perform the function of -14
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
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
( "ccc<eol>" -- )
Display the count of compiled bytes since the last invocation of
( n|u x-addr -- )
Add n|u to the single-cell value at extended address x-addr.
( -- )
Enable checking of the depth of the control flow stack.
See also:
( 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:
( -- )
Reset the counters for use with
( i*x -- )
Remember the values i*x on the stack after
See also:
( -- )
Disable checking of the depth of the control flow stack.
See also:
( 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:
( 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
See also:
( -- )
Display the current date in the format specified by
.DATE is implemented using pictured numeric output words. Its use
will corrupt the transient region identified by
See also:
( -- )
Display the time elapsed in hours, minutes, seconds, and
milliseconds since the last execution of
.HMS is implemented using pictured numeric output words. Its
use will corrupt the transient region identified by
See also:
( n u -- )
Display line n of block u.
( -- )
Display the annotated return stack.
See also:
( -- )
Display the number of clock ticks between
( -- )
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:
( wid -- )
Display the name of the word list identifier wid or the value of wid.
See also:
( -- n )
Environment query.
Maximum size of a counted string, in characters.
( -- n )
Environment query.
Size of the output-string buffer, in characters.
( -- n )
Environment query.
Size of the scratch area pointed to by
( x-addr -- )
Store zero at extended address x-addr.
( ["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
See also:
( 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:
( d|ud a-addr -- )
Add d|ud to the double-cell number at a-addr.
( d|ud x-addr -- )
Add d|ud to the double-cell value at extended address x-addr.
( x1 x2 -- ) ( A: -- x1 x2 )
Transfer cell pair x1 x2 to the auxiliary stack. Semantically
equivalent to >S
.
See also:
( 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:
( "<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
( 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.
Interpretation: Perform the function of -14
Execution: ( -- )
Memoize the current definition ...
Parameter single, result double.
See also:
( 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.
( -- x1 x2 ) ( A: x1 x2 -- )
Transfer the cell pair x1 x2 from the auxiliary stack.
Semantically equivalent to S>
See also:
( -- x1 x2 ) ( A: x1 x2 -- x1 x2 )
Copy cell pair x1 x2 from the auxiliary stack. Semantically
equivalent to
See also:
( 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
( "<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:
( "name" -- )
Create a definition for name with the semantics of
( "name" -- )
Resolve the semantics of the previous defined definition by
( "ccc<eol>" -- )
Complete the current
Interpretation: ( -- )
Append the run-time semantics below to the current definition.
Remain in interpretation state, add the
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
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
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
name Execution: ( i*x -- j*x )
Perform the machine code sequence that was generated following
;CODE
See also:
Interpretation: Perform the function of -14
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
Run-time: ( -- xt )
xt is the execution token of the nested definition.
Locals defined in the nested definition are discarded after ;]
.
See also:
( n1 n2 -- flag )
Flag is true if and only if n1 is less than or equal to n2.
See also:
( n1 n2 -- flag )
Flag is true if and only if n1 is greater than or equal to n2.
See also:
( +n1 +n2 +n3 -- c-addr u )
Convert the date given by day +n1, month +n2 and year +n3 by one
of
>DATE is implemented using pictured numeric output words. Its use
will corrupt the transient region identified by
See also:
( +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:
( +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.
( +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:
( x -- ) ( A: -- x )
Move x to the auxiliary stack.
See also:
( c-addr u -- ) ( $: -- str )
Place the string specified by c-addr u on the string stack.
( +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:
( +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:
( -- u1 u2 )
Return the column u1 and row u2 of the cursor on the screen.
See also:
This word has been replaced with
( "<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:
This word has been replaced with
( "<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:
This word has been replaced with
( a-addr1 a-addr2 -- )
Exchange the contents of the cells at a-addr1 and a-addr2
Interpretation: Perform the function of -14
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.
( x -- )
Store x as element of a sorted array.
See also:
( xd x listid -- )
Append the pair xd and x to the list identified by listid.
x may be looked up in the list by
See also:
( -- n )
Environment query.
Size of one address unit, in bits.
Interpretation: Perform the function of -14
Compilation: ( xt -- ) ( C: colon-sys -- colon-sys )
****
( -- )
Decompile all words in the first word list of the search order,
starting with the first compiled.
See also:
( "<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
When a full screen is displayed the listing halts. Pressing space
continues. Other keys stop.
See also:
( 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
See also:
This word has been replaced with
( 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:
This word has been replaced with
( "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
When a full screen is displayed the listing halts. Pressing space
continues. Other keys stop.
See also:
( +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
See also:
( -- +n )
+n is the number of arguments or argument strings on the command
line that are no part of options.
See also:
( "<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
( -- )
Replace the first word list in the search order with the
ASSEMBLER word list.
Interpretation: Perform the function of -14
Compilation: ( "ccc<)>" -- ) ( C: -- x )
If the value
See also:
( -- x )
A value. All assertions above this value are turned off. Default
value is one.
See also:
Interpretation: Perform the function of -14
Compilation: ( "ccc<)>" -- ) ( C: -- x )
If the value
See also:
Interpretation: Perform the function of -14
Compilation: ( "ccc<)>" -- ) ( C: -- x )
If the value
See also:
Interpretation: Perform the function of -14
Compilation: ( "ccc<)>" -- ) ( C: -- x )
If the value
See also:
Interpretation: Perform the function of -14
Compilation: ( "ccc<)>" -- ) ( C: -- x )
If the value
See also:
( -- n )
Environment query.
Maximum size of the auxiliary stack, in cells.
( "<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
name Execution: ( -- +n )
+n is the size in memory expressed in address units of the data
structure.
See also:
( 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.
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:
( char x-addr -- )
Add char to the character at extended address x-addr.
( 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:
( -- n )
Return the number of characters on an output line.
Note: If blockext.frt is loaded, the value of n may change.
See also:
This word has been replaced with
( x-addr -- )
Store zero at extended character address x-addr.
( c-addr1 c-addr2 -- )
Exchange the contents of the characters at c-addr1 and c-addr2.
( l-addr -- )
Execute the definition starting at list address l-addr.
See also:
( "<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
( "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.
( -- c-addr )
c-addr is the address of a counted string representing the
description of the category to which this file belongs.
See also:
( "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
See also:
( 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:
( "<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:
( -- c-addr u )
Environment query.
c-addr u represent a string containing the name, the processor
type, and version of the CHForth program.
( 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.
( -- )
Do not show a clock on the screen.
( -- )
Display a clock on the right side of the status line.
( "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.
( -- )
If the log file is open, close the log file.
See also:
Note: this is the default action of function key F2
( "<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
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
name Execution: ( i*x -- j*x )
Execute the machine code sequence that was generated following
CODE
See also:
( addr1 addr2 -- -1|0|1 )
Compare data at addr1 and addr2 for equality, less or greater.
( 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:
( -- )
Make the most recent definition a compile-only word. The default
interpreter performs the function of -14
This word has been replaced with
( 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.
( x -- n )
n is the number of bits set to 1 in x.
( -- flag )
Perform
See also:
( -- c-addr )
c-addr is the address of a counted string representing the name
of the creator of this file.
See also:
( char c-addr -- )
Clear the bits at c-addr that correspond with ones in char.
Interpretation: Perform the function of -14
Execution: ( -- )
Redirect the critical error handler of the operating system to a
harmless routine. Temporary use only.
See also:
Interpretation: Perform the function of -14
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.
Interpretation: Perform the function of -14
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.
( char c-addr -- )
Set the bits at c-addr that correspond with ones in char.
( char c-addr -- )
Complement the bits at c-addr that correspond with ones in char.
( d1|ud1 d2|ud2 -- d3|ud3 )
Multiply d1|ud1 by d2|ud2 giving product d3|ud3.
( 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 DM*
(not implemented)
DSM/REM
(not implemented) 2>R DM* 2R> DFM/MOD
(not
implemented) 2SWAP 2DROP
.
( 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
DM*
(not implemented) 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).
( a-addr -- )
Clear all bits of the double-cell value at a-addr.
( x-addr -- )
Store zero in two consecutive cells at extended address x-addr.
( xd -- flag )
flag is true if and only if xd is equal to zero.
( xd1 -- xd2 )
xd2 is the result by shifting xd1 one bit toward the
most-significant bit, filling the vacated least-significant bit
with zero.
( xd1 -- xd2 )
xd2 is the result of shifting xd1 one bit toward the
least-significant bit, leaving the most-significant bit
unchanged.
An alias for
( -- 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:
( xt1 xt2 - )
Set the word xt1 to execute xt2. An ambiguous condition exists if
xt1 is not for a word defined by
See also:
( 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
See also:
( -- )
Hide all the words that are marked with
( "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:
( 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:
( -- )
Reclaim the temporary space where the file loaded with LOADHIGH
was compiled. All the words loaded with
See also:
( 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:
( 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.
( 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.
( d1 d2 -- d3 )
d3 is the greater of d1 and d2.
( d1 d2 -- d3 )
d3 is the lesser of d1 and d2.
( "<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
An ambiguous condition exists if DOC is
See also:
( 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.
( 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.
( d1|ud1 n|u -- d2|ud2 )
Multiply d1|ud1 by n|u giving product d2|ud2.
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:
( ud1 ud2 -- flag )
flag is true if and only if ud1 is less than ud2.
( ud1 ud2 -- flag )
flag is true if and only if ud1 is greater than ud2.
( 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
as hexadecimal numbers and the same characters displayed with
See also:
( x-addr u -- )
Display the contents of u consecutive addresses starting at
extended address x-addr.
See also:
( x -- x ) ( A: -- x )
Copy x to the auxiliary stack. Semantically equivalent to
See also:
( "ccc<eol>" -- )
Parse ccc, the remainder of the parse area. Perform the ECHO
command of the operating system with ccc as parameter list.
( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space.
If name starts with ~ (tilde), or contains . (dot), it is expanded
by
Note: this is the default action of function key F3
See also:
( -- )
Replace the first word list in the search order with the EDITOR
word list.
( -- c-addr )
c-addr is the address of a counted string representing the name
of the editor program.
See also:
( 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.
( n -- x-addr )
a-addr is the extended address of element n of a sorted array.
See also:
( x -- x | c-addr u )
If x is the execution token of
See also:
( -- )
Resolve all assembler labels, terminate the current code
definition and allow its name to be found in the dictionary.
Remove the
See also:
Interpretation: Perform the function of -14
Execution: ( -- )
Restore the redirection of the critical error handler of the
operating system. Use as soon as possible after
( struct-sys +n -- )
Terminate definition of a structure started with
See also:
( -- )
Interpretation: Perform the function of -14
Compilation: ( C: colon-sys -- )
Terminate a definition started with
Run-time: ( -- ) ( R: nest-sys -- )
Return to the calling definition specified by nest-sys.
( n1 "name" -- n2 )
Create
( -- wid )
Return wid, the identifier of a word list containing definitions
that constitute queries for
( 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:
Interpretation: ( "ccc<quote>" -- )
Parse 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: ( -- )
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.
( n1 n2 -- )
Exchange the elements at index n1 and index n2
See also:
( n1 n2 -- )
Exchange the elements at index n1 and index n2
See also:
( n -- )
****
( 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.
( -- )
Display the time elapsed since the last execution of
F.ELAPSED is implemented using pictured numeric output words. Its
use will corrupt the transient region identified by
( c-addr u -- )
Open the file named in the character string specified by c-addr u
with file access method
If the file was successfully opened, and the number of files
opened by
See also:
( -- )
Do not wait between successive executions of
See also:
( -- )
Close the current file opened by
( -- )
Append the line terminating characters to the current file opened
by
See also:
( char -- )
Append char to the current file opened by
See also:
( 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:
( 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:
( -- ior )
Stop finding files with
( 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
See also:
( -- a-addr )
a-addr is the address of cell containing the bitpattern for
file search by
( -- ior )
Find the next file name matching the character string given to
the last execution of
See also:
( -- flag )
Environment query.
True if floored division is the default.
( c-addr u -- )
Create the file named in the character string specified by c-addr
and u, and open it with access method
If the file was successfully created and opened, and the number
of files opened by FOPEN or
See also:
( 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:
( "<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:
( i*x sc1 -- sc2 )
Format string with parameters after %
Allowed: c d n r s t u
( -- x )
x is the attribute of the file found at the last successful
execution of
( -- u1 u2 )
u1 and u2 are the packed modification time and date repectively
of the file found at the last successful execution of
See also:
( -- c-addr u )
c-addr u specify a string representing the name of the file found
at the last successful execution of
( -- ud )
ud is the size in characters of the file found at the last
successful execution of
( -- )
Set the count of lines used by
( "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:
( -- )
Reset the timer for use by
( c-addr u -- )
Append u characters from c-addr to the current file opened by
See also:
( -- wid )
Return wid, the identifier of the first word list in the
search order.
This word has been replaced with
( -- )
This procedure executes the function of
( "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:
( "<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
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:
( -- )
Start the first part of a module. The following definitions
before the use of
See also:
( 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:
( addr tree -- )
Add addr to its place in the tree.
Comparison is done by
( -- )
Start the second part of a module. The following definitions will
not be hidden from the user by the use of
( 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
( 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:
( c-addr u -- )
c-addr u describe and set the name of the logfile.
( wid -- )
Set wid as the wordlist of definitions compiled after
( u1 u2 -- )
Sort an array described by starting index u1 and holding
u2 elements.
See also:
( 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.
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:
( -- u )
Mask for the ALT key, that can be
( -- u )
Mask for the CTRL key, that can be
( -- u )
Mask for the SHIFT key, that can be
( -- n )
Return the number of lines on an output page.
See also:
This word has been replaced with
( l-addr u -- )
Display the contents of u consecutive addresses starting at
list space address l-addr.
See also:
( u -- )
Display block u in an implementation-defined format. Store u in
See also:
( -- )
Display the names of the files loaded with
Note: if loaded, this is the default action of function key F7
See also:
( "<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:
( -- n )
Environment query.
Maximum size of the locals stack, in cells.
Interpretation: Perform the function of -14
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
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
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
( "<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,
See also:
( "<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:
( i*x n "ccc<eol>" -- j*x )
Repeat interpretation of the remainder of the source in the input
buffer for n times.
Use
See also:
( 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.
( "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:
( 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:
( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space.
Create a colon definition for name in the
Compile subsequent words in the parse area representing source code
in assembly language. The process continues, refilling the input
buffer as needed, until
name Execution: ( i*x -- j*x )
Perform the compiled assembly language code generating machine
code into the current definition.
See also:
( 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
See also:
( -- )
Repeat interpretation of the preceding source in the input buffer
until a key is pressed.
See also:
( i*x list xt -- j*x )
For each element in the linked list, perform xt.
See also:
( i*x tree xt -- j*x )
For each leaf in the tree, perform xt.
See also:
( 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:
( 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:
( 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:
( "<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
See also:
( -- )
Display the name of every
Note: if loaded, this is the default action of function key F8
See also:
( -- u )
Environment query.
Maximum value of any character in the implementation-defined
character set.
( -- d )
Environment query.
Largest usable signed double number.
( -- n )
Environment query.
Largest usable signed integer.
( -- u )
Environment query.
Largest usable unsigned integer.
( -- ud )
Environment query.
Largest usable unsigned double number.
Interpretation: Perform the function of -14
Execution: ( -- )
Memoize the current definition ...
Parameter single, result single.
See also:
( -- )
End a module by hiding the definitions in the first part of a
module started by
See also:
( 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:
( nt -- x xt )
x xt represents the compilation semantics of the word nt. The
returned xt has the stack effect ( i*x -- j*x).
See also:
( nt -- xt | 0 )
xt represents the interpretation semantics of the word nt. If nt has no
interpretation semantics, NAME>INTERPRET returns 0.
See also:
( 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:
( x1 .. xn +n -- )
Remove x1 through xn and +n from the stack.
( n-addr u -- )
Display the contents of u consecutive addresses starting at
name space address n-addr.
See also:
( x1 .. xn +n -- x1 .. xn +n x1 .. xn +n )
Duplicate x1 through xn and +n on the stack.
( "<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
This word has been replaced with
( -- )
If the log file is closed, delete the file named in
See also:
Note: this is the default action of function key F2
( -- )
Remove all elements from the array to sort.
See also:
Interpretation: Perform the function of -14
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.
( -- )
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:
Note: this is the default action of function key F2
( -- c-addr u )
c-addr u represent the character string of the last
if they contain spaces; the quotes are not considered part of the
string.
( 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
See also:
( -- c-addr )
c-addr is the address of a counted string containing the allowed
option characters for
See also:
( -- )
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:
( -- 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:
( 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:
( 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:
( +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:
( +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:
( 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:
( "<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
( char u -- )
Write char to port u.
( u -- char )
Read char from port u.
( 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.
( 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.
( x -- n )
n is the number of bits set in x.
( -- )
The next invocation of
( x1 x2 -- flag )
Compare element x1 with element x2 of the array to be sorted.
flag is the result of the comparison.
See also:
( x1 x2 -- flag )
Compare element x1 with element x2 of the array to be sorted.
flag is the result of the comparison.
See also:
( x1 x2 -- flag )
Compare element x1 with element x2 of the array to be sorted.
flag is the result of the comparison.
See also:
( 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:
( x1 x2 -- flag )
Compare element x1 with element x2 of the array to be sorted.
flag is the result of the comparison.
See also:
( "<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
( -- )
Mark the most recent definition as a private word. This word
cannot be found after the execution of
( -- )
Start beginning of a PRIVATES ..
( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space.
Create a definition for name in the
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
name Execution: ( -- a-addr )
a-addr is the start of the machine code sequence that was generated
when name was created.
See also:
( -- 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:
( "<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
( "<spaces>name" -- addr )
Skip leading space delimiters. Parse name delimited by a space.
addr is the storage of the extended address of the
( 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
( 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:
( -- )
Display the name of the current directory.
See also:
( 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.
( -- )
Remove x from the return stack. Semantically equivalent to
This word has been replaced with
( 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,
The file may be buffered or unbuffered.
See also:
( 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
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
See also:
( -- )
Restore the contents of the screen and the position of the cursor
that were saved by
Interpretation: Perform the function of -14
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:
( "<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
( -- )
Start a regression test. Values on the stack are disregarded.
See also:
( -- a-addr )
If
( 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
See also:
( 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:
( 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:
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
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.
( 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,
Implementation: The value of FILE-POSITION is unaffected.
See also:
( -- )
Restore the contents of the screen and the position of the cursor
that were saved by
See also:
( -- n )
Environment query.
Maximum size of the return stack, in cells.
( "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.
( 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.
( c-addr1 u1 -- c-addr2 u2 )
If string c-addr1 u1 representing a path name starts with the
directory given by
( char1 -- char2 )
Convert character char1 to its rot13 equivalent char2
( 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.
( x1 -- ) ( A: x2 -- x1 )
Replace x2 on the auxiliary stack with x1 from the data stack.
See also:
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:
( -- )
Terminate a regression test.
See also:
( -- x ) ( A: x -- )
Move x from the auxiliary stack to the data stack.
See also:
( -- x ) ( A: x -- x )
Copy x from the auxiliary stack to the data stack.
See also:
( -- )
Save the contents of the screen and the cursor position to be
restored by
( "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
When a full screen is displayed the listing halts. Pressing space
continues. Other keys stop.
See also:
( -- a-addr )
a-addr is the address of a cell containing the block number of
the block most recently
( -- ) ( A: x -- )
Remove x from the auxiliary stack. Semantically equivalent to
See also:
( 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
See also:
( 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:
This word has been replaced with
( 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
See also:
( "<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:
( wid -- )
Set the first searched word list in the search order to the
word list identified by wid.
This word has been replaced with
( 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
See also:
( 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.
( "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:
( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space.
If name starts with ~ (tilde), it is expanded by
( "<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:
( 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:
( "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
When a full screen is displayed the listing halts. Pressing space
continues. Other keys stop.
See also:
( -- )
Wait between successive executions of
See also:
( 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:
( a-addr u -- )
Sort an array described by starting address a-addr and holding
u elements.
See also:
( a-addr u -- )
Sort an array described by starting index n1 and holding
u elements.
See also:
( a-addr u )
Sort an array described by starting address a-addr and holding
u elements.
See also:
( -- a-addr )
a-addr is the address of a cell containing a flag allowing
( u -- xu ) ( A: xu .. x0 -- xu .. x0 )
Copy xu from the auxiliary stack to the data stack.
See also:
( 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
See also:
( ud -- u )
Generate the square root u from ud.
( "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:
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:
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:
( -- n )
Environment query.
Maximum size of the data stack, in cells.
( -- 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 :
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:
( xu .. x1 x0 x u -- x .. x1 x0 )
Remove x and u. Replace xu by x.
See also:
( -- 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.
( -- 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.
( +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.
( +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.
( -- x )
When this value is true, inline strings are displayed as with
( c-addr u -- c-addr u )
Convert any upper case characters in the string specified by
c-addr u to their lower case equivalents.
( 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.
( c-addr u -- c-addr u )
Reverse the order of the chararacters in the string specified by
c-addr u in place.
( c-addr u -- c-addr u )
Convert the characters in the string specified by c-addr u with
( c-addr u -- c-addr u )
Sort the characters in the string specified by c-addr u in place
and in ascending order.
( c-addr u -- c-addr u )
Convert any lower case characters in the string specified by
c-addr u to their upper case equivalents.
( 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
See also:
( "<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:
( c-addr u -- )
Execute the operating system command specified by the character
string c-addr u.
See also:
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:
( -- a-addr )
A value. n is the maximum number of stack values displayed while tracing.
( -- x1 ) ( A: x1 x2 -- x1 x2 )
Copy x1 from the auxiliary stack to the data stack.
See also:
( -- flag )
flag is the same value that was returned by the last execution of
( 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.
( 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:
( i*x u1 u2 -- j*x )
( -- )
Start counting clock ticks.
( "<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:
( n -- )
Repeat interpretation of the preceding source in the input buffer
for n times.
See also:
( -- )
Stop counting clock ticks.
( 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 elements added.
See also:
( 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:
( 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:
( "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:
( 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
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
See also:
( -- )
Start a regression test. Do not touch values on the stack.
See also:
( -- x1 ) ( A: x1 x2 x3 -- x1 x2 x3 )
Copy x1 from the auxiliary stack to the data stack.
See also:
( 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.
( u1 u2 -- u3 )
u3 is the greater if u1 and u2
( u1 u2 -- u3 )
u3 is the lesser if u1 and u2
( 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:
( 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:
( 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:
( -- u )
u is the amount of space remaining in the region addressed by
( -- n )
Environment query.
Version of this Forth system.
( "<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.
( 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:
( -- )
Display the word lists that have a name, i.e. those that were
created by
See also:
( "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.
( -- )
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,
Note: this is the default action of function key F4
See also:
( "<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
See also:
( wid -- flag )
flag is true if and only if the word list identifier wid has a
name associated with it.
( 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" ".." "../*.*"
( ["ccc1" ["ccc2"]] -- )
Parse ccc1 and ccc2 delimited by spaces. If ccc1 is empty, list
the words in most wordlists as with
See also:
( 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:
( -- n )
Environment query.
Maximum number of word lists usable in the search order.
( -- )
List the word names in the first word list of the search order.
See also:
( 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,
The file may be buffered or unbuffered.
See also:
Interpretation: ( C: -- nest-sys false )
Create an execution token xt in high memory like
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
See also:
Interpretation: Perform the function of -14
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:
Interpretation: Perform the function of -14
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:
( "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>
Interpretation: Perform the function of -14
Compilation: ( "name1" ... "[[" -- )
Enter postponing state.
( -- )
This vector will contain the help routine of a turnkey program.
( -- )
This vector will contain the main routine of a turnkey program.
( 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
Interpretation: Perform the function of -14
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
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
Methods for name:
+TO ( d|ud -- ) Add d|ud to name CLEAR ( -- ) Store zero in name TO ( xd -- ) Store xd in nameImplementation: Every dlocal after | needs an extra don't care item on the stack.
( 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:
( i*x -- )
Check the values i*x to match with the values remembered by