System Documents
Here is the information which the ANSI Forth standard requires.
References nos. refer to the Standards Document X3.215-1994
Implementation-Defined Options
Core word set
- aligned address requirements (3.1.3.3 Addresses)
- behavior of 6.1.1320 EMIT for non-graphic characters;
- 0x08 backspaces the cursor.
- 0x09 advances cursor to next tab position, scrolling if necessary; tab positions are at intervals of 8 character positions.
- 0x0A advances cursor to start of a new line, scrolling if necessary.
- Other non-graphic characters cause a space or a browser-dependant default graphic form to be displayed.
- character editing of 6.1.0695 ACCEPT and 6.2.1390 EXPECT;
- Backspace (ASCII 0x08) deletes the trailing character from the entered string and removes it from the display.
- character set (3.1.2 Character types, 6.1.1320 EMIT, 6.1.1750 KEY);
- character-aligned address requirements (3.1.3.3 Addresses);
- character-set-extensions matching characteristics (3.4.2 Finding definition names);
- conditions under which control characters match a space delimiter (3.4.1.1 Delimiters);
- Control characters match a space delimiter when source code is
parsed by the interpreter and when using the words WORD and PARSE.
- format of the control-flow stack (3.2.3.2 Control-flow stack);
- The control-flow stack is implemented using the data stack.
- conversion of digits larger than thirty-five (3.2.1.2 Digit conversion);
- Digits larger than thirty-five are represented by characters whose ASCII value
is fifty-five greater than the value of the digit.
- display after input terminates in 6.1.0695 ACCEPT and 6.2.1390 EXPECT;
- Display of received characters is maintained unaltered.
- exception abort sequence (as in 6.1.0680 ABORT");
- ABORT" is implemented as -2 THROW. If the exception is not caught the string
following ABORT" is displayed.
- input line terminator (3.2.4.1 User input device);
- The Enter key is pressed to indicate the end of an input line.
- maximum size of a counted string, in characters (3.1.3.4 Counted strings, 6.1.2450 WORD);
- No limit other than the availability of memory.
- maximum size of a parsed string (3.4.1 Parsing);
- No limit other than the availaility of memory.
- maximum size of a definition name, in characters (3.3.1.2 Definition names);
- maximum string length for 6.1.1345 ENVIRONMENT?, in characters;
- method of selecting 3.2.4.1 User input device;
- method of selecting 3.2.4.2 User output device;
- methods of dictionary compilation (3.3 The Forth dictionary);
- Code space and data space are combined. Name space is physically separate.
- number of bits in one address unit (3.1.3.3 Addresses);
- number representation and arithmetic (3.2.1.1 Internal number representation);
- ranges for n, +n, u, d, +d, and ud (3.1.3 Single-cell types, 3.1.4 Cell-pair types);
- n -0x8000 0000 to 0x7FFF FFFF
- +n 0x0 to 0x7FFF FFFF
- u 0x0 to 0xFFFF FFFF
- d -0x8000 0000 0000 0000 to 0x7FFF FFFF FFFF FFFF
- +d 0x0 to 0x7FFF FFFF FFFF FFFF
- ud 0x0 to 0xFFFF FFFF FFFF FFFF
- read-only data-space regions (3.3.3 Data space);
- size of buffer at 6.1.2450 WORD (3.3.3.6 Other transient regions);
- The address returned by WORD is HERE. The buffer may extend to occupy all of
unused memory but this overlaps PAD, which starts 80 characters higher, and
the pictured numeric output string buffer, which grows downwards from the
start of PAD.
- size of one cell in address units (3.1.3 Single-cell types);
- size of one character in address units (3.1.2 Character types);
- size of the keyboard terminal input buffer (3.3.3.5 Input buffers);
- size of the pictured numeric output string buffer (3.3.3.6 Other transient regions);
- 80 characters (but see "size of buffer at 6.1.2450 WORD" above).
- size of the scratch area whose address is returned by 6.2.2000 PAD (3.3.3.6 Other transient regions);
- Nominally 84 characters but may extend to occupy all of unused memory.
- system case-sensitivity characteristics (3.4.2 Finding definition names);
- By default names are case-insensitive; character matching can be made
case-sensitive by setting CAPS to non-zero.
- system prompt (3.4 The Forth text interpreter, 6.1.2050 QUIT);
- " OK" followed by new line.
- type of division rounding (3.2.2.1 Integer division, 6.1.0100 */, 6.1.0110 */MOD, 6.1.0230 /, 6.1.0240 /MOD, 6.1.1890 MOD);
- values of 6.1.2250 STATE when true;
- values returned after arithmetic overflow (3.2.2.2 Other integer operations);
- The two's complement result, ignoring any bits that overflowed.
- whether the current definition can be found after 6.1.1250 DOES> (6.1.0450 :).
Block word set
- the format used for display by 7.6.2.1770 LIST;
- 16 lines of 64 characters.
- the length of a line affected by 7.6.2.2535 \.
Exception word set
- Values used in the system by 9.6.1.0875 CATCH and 9.6.1.2275 THROW (9.3.1 THROW values, 9.3.5 Possible actions on an ambiguous condition).
- -9 is used for invalid memory access
- -13 is used for undefined word
- -2 (ABORT") is used for all other system exceptions.
Programming Tools word set
- ending sequence for input following 15.6.2.0470 ;CODE and 15.6.2.0930 CODE;
- manner of processing input following 15.6.2.0470 ;CODE and 15.6.2.0930 CODE;
- search-order capability for 15.6.2.1300 EDITOR and 15.6.2.0740 ASSEMBLER (15.3.3 The Forth dictionary);
- source and format of display by 15.6.1.2194 SEE.
- The source is the compiled code. The display is not formatted.
Ambiguous Conditions
To be completed
Other System Documentation
To be completed