ForthCMP ANS Forth Compliance
Return to The ForthCMP Page
ForthCMP version 2.30s is an ANS Forth System with Environmental
Restrictions. Namely because it is a native-code metacompiler which
creates "headerless" executable programs which do not have a text
interpreter, certain characteristics of an ANS Forth system cannot
apply. To the best of my knowledge, the following description applies to ForthCMP 2.30S.
Note that ForthCMP provides many facilities that are not covered by the Standard -- it is not a minimalist implementation.
Missing Core words include:
ABORT ABORT" ENVIRONMENT? EVALUATE LITERAL POSTPONE QUIT [ ]
Some other Core words have environmental restrictions.
These restrictions are described in the documentation.
All words from the Core Extension word set are included except:
COMPILE, MARKER QUERY RESTORE-INPUT SAVE-INPUT SOURCE-ID [COMPILE]
All words from the Exception word set are included.
All words from the Facility Extensions word set are included.
All words from the Memory Allocation word set are included.
All words from the File Access word set are included except:
( INCLUDE-FILE INCLUDED S" SOURCE-ID
(The Core definitions of ( and S" are included.
The functionality of INCLUDED is provided intrinsically by ForthCMP.)
All words from the Double-Number Extensions word set are included except:
All words from the String word set are included except:
The following words are PROVIDED from the Programming-Tools Extensions word set:
;CODE ASSEMBLER BYE CODE [ELSE] [IF] [THEN]
- Aligned address requirements: none
- Behavior of EMIT for non-graphic characters: handled by operating system, unless direct display output is used, in which case it will print one of 256 characters.
- Character editing of ACCEPT: Control-H deletes last character, Escape deletes entire line.
- Character set: additional characters are operating system dependent.
- Character aligned address requirement: none.
- Character-set-extensions matching characteristics: exact match only.
- Conditions under which control characters match a space delimiter: tab characters (control-I) are mapped into spaces by the compiler.
- Format of control flow stack: in compiler memory space and inaccessible by programs.
- Conversion of digits larger than 35: unsupported.
- Display after input terminates in ACCEPT: cursor is not moved.
- Exception abort sequence: Warning message is printed and compilation continues if possible while compiling. In target program, uncaught exceptions cause program to exit.
- Input line terminator: carriage return (Control-M).
- Maximum size of a counted string: 255 characters
- Maximum size of a parsed string: 255 characters
- Maximum size of a definition name: 31 characters
- Method of selecting user input device: No device while compiling. In target program, can be redirected from command line or by using the FILTER package.
- Method of selecting user output device: PRINTER or CONSOLE can be selected, and console output can be redirected to a file from the command line. In target program, a variable holds output device handle which can be assigned any device handle.
- Methods of dictionary compilation: No dictionary in target program.
- Number of bits in one address unit: 8.
- Number representation and arithmetic: two's complement.
- Range for n: -32768 to 32767
- Range for +n: 0 to 32767
- Range for u: 0 to 65535
- Range for d: -2147483648 to 2147483647
- Range for +d: 0 to 2147483647
- Range for ud: 0 to 4294967295
- Read-only data-space regions: none, except in ROM-ed applications, in which case the code segment is not writable.
- Size of buffer at WORD: 100 , shared with pictured numeric output string buffer, except when multitasking, then is size of free memory space (value returned by UNUSED).
- Size of one cell in address units: 2
- Size of one character in address units: 1
- Size of keyboard terminal input buffer: 128
- Size of pictured numeric output string buffer: 100, shared with WORD buffer, except when multitasking, then is 34.
- Size of scratch area whose address is returned by PAD: size of free memory space (value returned by UNUSED) less 100, except when multitasking, then is 94.
- System case sensitivity characteristics: case sensitive.
- System prompt: none (not interactive).
- Type of division rounding: symmetric.
- Value of STATE when true: STATE not accessible.
- Value returned after numeric overflow: undefined (processor dependent)
- Whether current definition can be found after DOES>: no
- Values used in the system by CATCH and THROW: none (completely under programmer control).
- Encoding of keyboard events (EKEY): Non-ASCII keystrokes are encoded as 256 + the IBM scan code.
- Duration of system clock tick: 54.925 milliseconds.
- Repeatability of MS: dependent on operating system.
- File access methods used: always unmapped binary. Access method ignored in CREATE-FILE.
- File line terminator for READ-LINE: line feed (10), with all carriage returns (13) ignored.
- File name format: follows MS-DOS conventions.
- File system exceptions: handled by DOS unless DOSGOALT.4TH is used, in which case "Critical Errors" can be thrown or can set a flag (and fail the command) under program control.
- DOS Error values: listed in function descriptions in documentation.
- Processing of input following ;CODE: assembler vocabulary used. Definition finished by executing END-CODE.
- A name is neither a valid definition name nor a valid number during text interpretation: print error message, push 0 on stack, and continue.
- A definition name exceeded the maximum length allowed: name is truncated
- Addressing a region not listed as a Forth data space: ignored and continues.
- Argument type incompatible with specified input parameter: ignored and continues.
- Attempting to obtain the execution token with undefined interpretation semantics: action depends on token type, see glossary for ' and FIND.
- Dividing by zero: traps to operating system. Can be caught by program by writing an exception handler (see demo program INTERUPT.4TH or alternate startup code DOSGOALT.4TH).
- Insufficient data-stack space or return-stack space: ignore and continue.
- Insufficient space for loop control parameters: error message during compile.
- Insufficient space in the dictionary: error message during compile, ignore and continue during execution.
- Interpreting a word with undefined interpretation semantics: error message.
- Modifying the contents of an input buffer or string literal: ignored and continues.
- Overflow of a pictured numeric output string: ignored and continues.
- Parsed string overflow: string is truncated.
- Producing a result out of range: ignored and continues.
- Reading from an empty data or return stack: ignored and continues.
- Unexpected end of input buffer: error message generated.
- >IN greater than size of input buffer: ignored and continues.
- RECURSE appears after DOES>: an error message is generated.
- Insufficient stack items for PICK and ROLL: ignored and continues.
- Loop control parameters not available: error message generated.
- Name not defined by VALUE used by TO: error message generated.
- Name not found with ' or [']: error message generated.
- Parameters are not of same type DO ?DO WITHIN: ignored and continues.
- String longer than a counted string returned by WORD: ignored and continues.
- Shift count greater than number of bits in a cell in RSHIFT or LSHIFT: result is 0.
- Word not defined by CREATE in DOES>: error message generated.
- Word not defined by CREATE in >BODY: ignored (>BODY is a no-op).
- Words improperly used outside of <# and #>: ignored and continues.
- d outside of range of n in D>S: ignored and continues.
- AT-XY cannot be performed on output device: cannot occur.
- Attempting to position file outside its boundaries: file is extended if written to.
- Attempting to read from file positions not yet written: returns "garbage" bytes.
- Invalid file handle: DOS error generated.
- Name not defined via CREATE for ;CODE: error message generated.
Other System Documentation
- Nonstandard words using PAD: #IN
- Operator's terminal facilities available: None
- Program data space available: 65280 bytes for code, 65525 bytes for data, using EXE format or ROMABLE, with a separate stack segment. For COM and SYS format, 65280 bytes for code and data combined.
- Return stack space available: adjustable up to 32767 cells, less that allowed for the data stack.
- Data stack space available: adjustable up to 32767 cells, less that allowed for the return stack. (SEPSSEG used)
- System Dictionary space required: none
Return to The ForthCMP Page
Return to my HOME PAGE