6.2.0060 #TIB
number-t-i-b CORE EXT
( -- a-addr )
a-addr is the address of a cell containing the number of characters in the terminal input buffer.
6.2.0200 .(
dot-paren CORE EXT
Compilation: Perform the execution semantics given below.
Execution: ( ccc<paren> -- )
Parse and display ccc delimited by ) (right parenthesis). .( is an immediate word.
See: 3.4.1 Parsing, 6.1.0190 .".
6.2.0210 .R
dot-r CORE EXT
( n1 n2 -- )
Display n1 right aligned in a field n2 characters wide. If the number of characters required to display n1 is greater than n2, all digits are displayed with no leading spaces in a field as wide as necessary.
6.2.0260 0<>
zero-not-equals CORE EXT
( x -- flag )
flag is true if and only if x is not equal to zero.
6.2.0280 0>
zero-greater CORE EXT
( n -- flag )
flag is true if and only if n is greater than zero.
6.2.0340 2>R
two-to-r CORE EXT
Interpretation: Interpretation semantics for this word are undefined.
Execution: ( x1 x2 -- ) ( R: -- x1 x2 )
Transfer cell pair x1 x2 to the return stack. Semantically equivalent to SWAP >R >R.
See: 3.2.3.3 Return stack, 6.1.0580 >R, 6.1.2060 R>, 6.1.2070 R@, 6.2.0410 2R>, 6.2.0415 2R@.
6.2.0410 2R>
two-r-from CORE EXT
Interpretation: Interpretation semantics for this word are undefined.
Execution: ( -- x1 x2 ) ( R: x1 x2 -- )
Transfer cell pair x1 x2 from the return stack. Semantically equivalent to R> R> SWAP.
See: 3.2.3.3 Return stack, 6.1.0580 >R, 6.1.2060 R>, 6.1.2070 R@, 6.2.0340 2>R, 6.2.0415 2R@.
6.2.0415 2R@
two-r-fetch CORE EXT
Interpretation: Interpretation semantics for this word are undefined.
Execution: ( -- x1 x2 ) ( R: x1 x2 -- x1 x2 )
Copy cell pair x1 x2 from the return stack. Semantically equivalent to R> R> 2DUP >R >R SWAP.
See: 3.2.3.3 Return stack, 6.1.0580 >R, 6.1.2060 R>, 6.1.2070 R@, 6-2-0340 2>R, 6.2.0410 2R>.
6.2.0455 :NONAME
colon-no-name CORE EXT
( C: -- colon-sys ) ( S: -- xt )
Create an execution token xt, enter compilation state and start the current definition, producing colon-sys. Append the initiation semantics given below to the current definition.
The execution semantics of xt will be determined by the words compiled into the body of the definition. This definition can be executed later by using xt EXECUTE.
If the control-flow stack is implemented using the data stack, colon-sys shall be the topmost item on the data stack. See 3.2.3.2 Control-flow stack.
Initiation: ( i*x -- i*x ) ( R: -- nest-sys )
Save implementation-dependent information nest-sys about the calling definition. The stack effects i*x represent arguments to xt.
xt Execution: ( i*x -- j*x )
Execute the definition specified by xt. The stack effects i*x and j*x represent arguments to and results from xt, respectively.
6.2.0500 <>
not-equals CORE EXT
( x1 x2 -- flag )
flag is true if and only if x1 is not bit-for-bit the same as x2.
6.2.0620 ?DO
question-do CORE EXT
Interpretation: Interpretation semantics for this word are undefined.
Compilation: ( C: -- do-sys )
Put do-sys onto the control-flow stack. Append the run-time semantics given below to the current definition. The semantics are incomplete until resolved by a consumer of do-sys such as LOOP.
Run-time: ( n1|u1 n2|u2 -- ) ( R: -- | loop-sys )
If n1|u1 is equal to n2|u2, continue execution at the location given by the consumer of do-sys. Otherwise set up loop control parameters with index n2|u2 and limit n1|u1 and continue executing immediately following ?DO. Anything already on the return stack becomes unavailable until the loop control parameters are discarded. An ambiguous condition exists if n1|u1 and n2|u2 are not both of the same type.
See: 3.2.3.2 Control-flow stack, 6.1.0140 +LOOP, 6.1.1240 DO, 6.1.1680 I, 6.1.1760 LEAVE, 6.1.1800 LOOP, 6.1.2380 UNLOOP.
6.2.0700 AGAIN
CORE EXT
Interpretation: Interpretation semantics for this word are undefined.
Compilation: ( C: dest -- )
Append the run-time semantics given below to the current definition, resolving the backward reference dest.
Run-time: ( -- )
Continue execution at the location specified by dest. If no other control flow words are used, any program code after AGAIN will not be executed.
See: 6.1.0760 BEGIN.
6.2.0855 C"
c-quote CORE EXT
Interpretation: Interpretation semantics for this word are undefined.
Compilation: ( ccc<quote> -- )
Parse ccc delimited by " (double-quote) and 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.
See: 3.4.1 Parsing, 6.1.2165 S", 11.6.1.2165 S".
6.2.0873 CASE
CORE EXT
Interpretation: Interpretation semantics for this word are undefined.
Compilation: ( C: -- case-sys )
Mark the start of the CASE ... OF ... ENDOF ... ENDCASE structure. Append the run-time semantics given below to the current definition.
Run-time: ( -- )
Continue execution.
See: 6.2.1342 ENDCASE, 6.2.1343 ENDOF, 6.2.1950 OF.
6.2.0945 COMPILE,
compile-comma CORE EXT
Interpretation: Interpretation semantics for this word are undefined.
Execution: ( xt -- )
Append the execution semantics of the definition represented by xt to the execution semantics of the current definition.
6.2.0970 CONVERT
CORE EXT
( ud1 c-addr1 -- ud2 c-addr2 )
ud2 is the result of converting the characters within the text beginning at the first character after c-addr1 into digits, using the number in BASE, and adding each digit to ud1 after multiplying ud1 by the number in BASE. Conversion continues until a character that is not convertible is encountered. c-addr2 is the location of the first unconverted character. An ambiguous condition exists if ud2 overflows.
Note: This word is obsolescent and is included as a concession to
existing implementations. Its function is superseded by 6.1.0570 >NUMBER.
See: 3.2.1.2 Digit conversion.
6.2.1342 ENDCASE
end-case CORE EXT
Interpretation: Interpretation semantics for this word are undefined.
Compilation: ( C: case-sys -- )
Mark the end of the CASE ... OF ... ENDOF ... ENDCASE structure. Use ase-sys to resolve the entire structure. Append the run-time semantics given below to the current definition.
Run-time: ( x -- )
Discard the case selector x and continue execution.
See: 6.2.0873 CASE, 6.2.1343 ENDOF, 6.2.1950 OF.
6.2.1343 ENDOF
end-of CORE EXT
Interpretation: Interpretation semantics for this word are undefined.
Compilation: ( C: case-sys1 of-sys -- case-sys2 )
Mark the end of the OF ... ENDOF part of the CASE structure. The next location for a transfer of control resolves the reference given by of-sys. Append the run-time semantics given below to the current definition. Replace case-sys1 with case-sys2 on the control-flow stack, to be resolved by ENDCASE.
Run-time: ( -- )
Continue execution at the location specified by the consumer of case-sys2.
See: 6.2.0873 CASE, 6.2.1342 ENDCASE, 6.2.1950 OF.
6.2.1350 ERASE
CORE EXT
( addr u -- )
If u is greater than zero, clear all bits in each of u consecutive address units of memory beginning at addr .
6.2.1390 EXPECT
CORE EXT
( c-addr +n -- )
Receive a string of at most +n characters. Display graphic characters as they are received. A program that depends on the presence or absence of non-graphic characters in the string has an environmental dependency. The editing functions, if any, that the system performs in order to construct the string of characters are implementation-defined.
Input terminates when an implementation-defined line terminator is received or when the string is +n characters long. When input terminates, nothing is appended to the string and the display is maintained in an implementation-defined way.
Store the string at c-addr and its length in SPAN.
6.2.1485 FALSE
CORE EXT
( -- false )
Return a false flag.
See: 3.1.3.1 Flags
6.2.1660 HEX
CORE EXT
( -- )
Set contents of BASE to sixteen.
6.2.1850 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 order 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: 3.4.1 Parsing, 15.6.2.1580 FORGET.
6.2.1930 NIP
CORE EXT
( x1 x2 -- x2 )
Drop the first item below the top of stack.
6.2.1950 OF
CORE EXT
Interpretation: Interpretation semantics for this word are undefined.
Compilation: ( C: -- of-sys )
Put of-sys onto the control flow stack. Append the run-time semantics given below to the current definition. The semantics are incomplete until resolved by a consumer of of-sys such as ENDOF.
Run-time: ( x1 x2 -- | x1 )
If the two values on the stack are not equal, discard the top value and continue execution at the location specified by the consumer of of-sys, e.g., following the next ENDOF. Otherwise, discard both values and continue execution in line.
See: 6.2.0873 CASE, 6.2.1342 ENDCASE, 6.2.1343 ENDOF.
6.2.2000 PAD
CORE EXT
( -- c-addr )
c-addr is the address of a transient region that can be used to hold data for intermediate processing.
See: 3.3.3.6 Other transient regions.
6.2.2008 PARSE
CORE EXT
( char ccc<char> -- c-addr u )
Parse ccc delimited by the delimiter char.
c-addr is the address (within the input buffer) and u is the length of the parsed string. If the parse area was empty, the resulting string has a zero length.
See: 3.4.1 Parsing.
6.2.2030 PICK
CORE EXT
( xu ... x1 x0 u -- xu ... x1 x0 xu )
Remove u. Copy the xu to the top of the stack. An ambiguous condition exists if there are less than u+2 items on the stack before PICK is executed.
6.2.2040 QUERY
CORE EXT
( -- )
Make the user input device the input source. Receive input into the terminal input buffer, replacing any previous contents. Make the result, whose address is returned by TIB, the input buffer. Set >IN to zero.
6.2.2125 REFILL
CORE EXT
( -- flag )
Attempt to fill the input buffer from the input source, returning a true flag if successful.
When the input source is the user input device, attempt to receive input into the terminal input buffer. If successful, make the result the input buffer, set >IN to zero, and return true. Receipt of a line containing no characters is considered successful. If there is no input available from the current input source, return false.
When the input source is a string from EVALUATE, return false and perform no other action.
See: 7.6.2.2125 REFILL, 11.6.2.2125 REFILL.
6.2.2148 RESTORE-INPUT
CORE EXT
( xn ... x1 n -- flag )
Attempt to restore the input source specification to the state described by x1 through xn. flag is true if the input source specification cannot be so restored.
An ambiguous condition exists if the input source represented by the arguments is not the same as the current input source.
6.2.2150 ROLL
CORE EXT
( xu xu-1 ... x0 u -- xu-1 ... x0 xu )
Remove u. Rotate u+1 items on the top of the stack. An ambiguous condition exists if there are less than u+2 items on the stack before ROLL is executed.
6.2.2182 SAVE-INPUT
CORE EXT
( -- xn ... x1 n )
x1 through xn describe the current state of the input source specification for later use by RESTORE-INPUT.
6.2.2218 SOURCE-ID
source-i-d CORE EXT
( -- 0 | -1 )
Identifies the input source as follows:
SOURCE-ID Input source -1 String (via EVALUATE) 0 User input device
6.2.2240 SPAN
CORE EXT
( -- a-addr )
a-addr is the address of a cell containing the count of characters stored by the last execution of EXPECT.
6.2.2290 TIB
t-i-b CORE EXT
( -- c-addr )
c-addr is the address of the terminal input buffer.
Note: This word is obsolescent and is included as a concession to existing implementations.
6.2.2295 TO
CORE EXT
Interpretation: ( x <spaces>name -- )
Skip leading spaces and parse name delimited by a space. Store x in name. An ambiguous condition exists if name was not defined by VALUE.
Compilation: ( <spaces>name -- )
Skip leading spaces and parse name delimited by a space. Append the run-time semantics given below to the current definition. An ambiguous condition exists if name was not defined by VALUE.
Run-time: ( x -- )
Store x in name.
Note: An ambiguous condition exists if either POSTPONE or [COMPILE] is applied to TO.
See: 6.2.2405 VALUE, 13.6.1.2295 TO.
6.2.2298 TRUE
CORE EXT
( -- true )
Return a true flag, a single-cell value with all bits set.
See: 3.1.3.1 Flags.
6.2.2300 TUCK
CORE EXT
( x1 x2 -- x2 x1 x2 )
Copy the first (top) stack item below the second stack item.
6.2.2330 U.R
u-dot-r CORE EXT
( u n -- )
Display u right aligned in a field n characters wide. If the number of characters required to display u is greater than n, all digits are displayed with no leading spaces in a field as wide as necessary.
6.2.2350 U>
u-greater-than CORE EXT
( u1 u2 -- flag )
flag is true if and only if u1 is greater than u2.
See: 6.1.0540 >.
6.2.2395 UNUSED
CORE EXT
( -- u )
u is the amount of space remaining in the region addressed by HERE , in address units.
6.2.2405 VALUE
CORE EXT
( x <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 to x.
name is referred to as a value.
name Execution: ( -- x )
Place x on the stack. The value of x is that given when name was created, until the phrase x TO name is executed, causing a new value of x to be associated with name.
See: 3.4.1 Parsing.
6.2.2440 WITHIN
CORE EXT
( n1|u1 n2|u2 n3|u3 -- flag )
Perform a comparison of a test value n1|u1 with a lower limit n2|u2 and an upper limit n3|u3, returning true if either (n2|u2 < n3|u3 and (n2|u2 <= n1|u1 and n1|u1 < n3|u3)) or (n2|u2 > n3|u3 and (n2|u2 <= n1|u1 or n1|u1 < n3|u3)) is true, returning false otherwise. An ambiguous condition exists if n1|u1, n2|u2, and n3|u3 are not all the same type.
6.2.2530 [COMPILE]
bracket-compile CORE EXT
Intrepretation: Interpretation semantics for this word are undefined.
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. An ambiguous condition exists if name is not found.
See: 3.4.1 Parsing.
6.2.2535 \
backslash CORE EXT
Compilation: Perform the execution semantics given below.
Execution: ( ccc<eol>-- )
Parse and discard the remainder of the parse area. \ is an immediate word.
See: 7.6.2.2535 \.
Table of Contents
Next Section