PFAVR -- Glossary By Source Location

Andrew Sterian
Padnos School of Engineering
Grand Valley State University


Top-Level | Glossary | Compiler Design | Rationale | Notes
Version 1.2

February 28, 2004
Glossary by Language Category | Glossary by Word Name | Glossary by Source Location | Glossary by ANS Word Set

The flags column may contain the letters I or D to indicate immediate or deferred words.

The source definition column is either of the form ID_XXXX to indicate an internal word with the given ID, or is the filename (minus the .ft extension) where the word is defined.

The ANS section column is either pforth to indicate the word is not an ANS standard word, or is the name of an ANS standard word set which describes the word.

The language category column describes the part of the Forth language that the word applies to (e.g., io, loops, math, etc.)

The description column provides a brief reference on the word.


Internal

Word Name Flags Source Definition ANS Section Language Category Description
!   ID_STORE core memory ( n addr -- ) Store 16-bit n at address
#TIB   ID_VAR_NUM_TIB coreext deprecated Deprecated...use SOURCE
'   ID_TICK core lang ( "name" -- XT ) Push ExecToken for subsequent name
(+LOOP)   ID_PLUSLOOP_P pforth compiler Used to implement +LOOP
(2LITERAL)   ID_2LITERAL_P pforth compiler Runtime support for 2LITERAL, pushes next two words on stack
(?DO)   ID_QDO_P pforth compiler Used to implement ?DO
(CREATE)   ID_CREATE_P pforth compiler Runtime support for CREATE
(DO)   ID_DO_P pforth compiler Runtime support for DO
(EMIT)   ID_EMIT_P pforth compiler Same as original EMIT
(HEXNUMBER?)   ID_HEXNUMBERQ_P pforth compiler ( $addr -- 0 | n 1 ) Convert string at address as hex number
(LEAVE)   ID_LEAVE_P pforth compiler Supports LEAVE
(LITERAL)   ID_LITERAL_P pforth compiler Supports LITERAL, pushes next code space word on stack
(LOOP)   ID_LOOP_P pforth compiler Supports loops
(QUIT)   ID_QUIT_P pforth compiler Original implementation of QUIT, calls abort
*   ID_TIMES core math ( n1 n2 -- n1*n2 ) Signed multiplication
+   ID_PLUS core math ( n1 n2 -- n1+n2 ) Signed addition
+!   ID_PLUS_STORE core memory ( n addr -- ) Add n to the 16-bit contents of given address
-   ID_MINUS core math ( n1 n2 -- n1-n2 ) Signed subtraction
.   ID_DOT core io ( n -- ) Display n
.S   ID_DOTS progtools io Display values on the stack
/   ID_DIVIDE core math ( n1 n2 -- n1/n2 ) Signed division
0<   ID_COMP_ZERO_LESSTHAN core logical ( n -- flag ) Set flag if n<0
0<>   ID_COMP_ZERO_NOT_EQUAL coreext logical ( x -- flag ) Return true flag if x is not 0
0=   ID_COMP_ZERO_EQUAL core logical ( n -- flag ) Set flag if n=0
0>   ID_COMP_ZERO_GREATERTHAN coreext logical ( x -- flag ) Return true flag if x>0 (signed)
0BRANCH   ID_ZERO_BRANCH pforth compiler Supports flow control, branch if top-of-stack is 0
2>R   ID_2_TO_R coreext stack ( x1 x2 -- ) (R: -- x1 x2 ) Move two cells from data stack to return stack
2LITERAL I ID_2LITERAL double double ( x1 x2 -- ) At run-time, place x1 and x2 on the stack
2R>   ID_2_R_FROM coreext stack ( -- x1 x2 ) (R: x1 x2 -- ) Move two cells from return stack to data stack
2R@   ID_2_R_FETCH coreext stack ( -- x1 x2 ) (R: x1 x2 -- x1 x2 ) Copy two cells from return stack to data stack
:   ID_COLON core lang Define a new word
; I ID_SEMICOLON core lang End a word definition
<   ID_COMP_LESSTHAN core logical ( n1 n2 -- flag ) Set flag if n1<n2 (signed)
<>   ID_COMP_NOT_EQUAL coreext logical ( x1 x2 -- flag ) Return true flag if x1 != x2
=   ID_COMP_EQUAL core logical ( n1 n2 -- flag ) Set flag if n1=n2
>   ID_COMP_GREATERTHAN core logical ( n1 n2 -- flag ) Set flag if n1>n2 (signed)
>IN   ID_VAR_TO_IN core compiler ( -- addr ) Address of variable storing number of characters from TIB to parse area
>R   ID_TO_R core stack ( x -- ) ( R: -- x ) Move top-of-stack to return stack
?DUP   ID_QDUP core stack ( x -- 0 | x x ) Duplicate TOS if nonzero
?ERROR   ID_ERRORQ_P pforth utility ( flag num -- ) Prints error code num if flag true
@   ID_FETCH core memory ( addr -- x ) Fetch 16-bit value at given address
ACCEPT   ID_ACCEPT core io ( addr n1 -- n2) Input string of at most n1 chars into addr. n2 is length of string.
AND   ID_AND core logical ( x1 x2 -- x1&x2 ) Bitwise AND
ARSHIFT   ID_ARSHIFT pforth logical ( n a -- n>>a ) Arithmetic right shift
BASE   ID_VAR_BASE core lang ( -- addr ) Address of current number base variable
BRANCH   ID_BRANCH pforth compiler Supports flow control, unconditional branch
BYE   ID_BYE progtools utility Terminates interpreter
C!   ID_CSTORE core memory ( x1 addr -- ) Store 8 least-significant bits of x1 at addr
C@   ID_CFETCH core memory ( addr -- x ) Fetch 8-bit character at given address
CMOVE   ID_CMOVE strings memory ( addr1 addr2 u -- ) Copy u characters from addr1 to addr2 (low addresses to high)
CMOVE>   ID_CMOVE_UP strings memory ( addr1 addr2 u -- ) Copy u characters from addr1 to addr2 (high addresses to low)
CODE-BASE   ID_VAR_CODE_BASE pforth dictionary ( -- addr ) Get address of start of code area
CODE-LIMIT   ID_VAR_CODE_LIMIT pforth dictionary ( -- addr ) Get address just beyond end of code area
COMPARE   ID_COMPARE strings string ( addr1 u1 addr2 u2 -- n ) Compare two strings, n is 0 if the same, else -1 or +1
CONTEXT   ID_VAR_CONTEXT pforth dictionary ( -- addr ) Get address of last dictionary definition name
CR   ID_CR core io Print carriage return
CREATE   ID_CREATE core compiler Create a new word in the dictionary
D+   ID_D_PLUS double double ( d1 d2 -- d1+d2 ) Double-word addition
D-   ID_D_MINUS double double ( d1 d2 -- d1-d2 ) Double-word subtraction
D<   ID_D_LESSTHAN double double ( d1 d2 -- flag ) Set flag true if double-word d1<d2
DEFER   ID_DEFER pforth lang Create deferred word
DEPTH   ID_DEPTH core stack ( -- n ) Number of items pushed on stack (prior to calling DEPTH)
DP   ID_VAR_DP pforth dictionary ( -- addr ) Get address of next code location to write to
DROP   ID_DROP core stack ( x -- ) Drops the top-of-stack
DU<   ID_D_ULESSTHAN double double ( ud1 ud2 -- flag ) Set flag true if unsigned double-word ud1<ud2
DUMP   ID_DUMP progtools io ( addr u -- ) Dump memory for u bytes at addr
DUP   ID_DUP core stack ( x -- x x ) Duplicate top-of-stack
ECHO   ID_VAR_ECHO pforth io ( -- addr ) Get address of variable controlling echo mode
EMIT D ID_EMIT_P core io ( x -- ) Display character with ASCII code x
EOL   ID_EOL pforth io ( -- '\n' ) Pushes newline character onto stack
EXECUTE   ID_EXECUTE core lang ( i*x XT -- j*x ) Execute the given token
EXIT   ID_EXIT core lang ( R: sys -- ) Return from the current word
FILL   ID_FILL core memory ( addr num val -- ) Fill num bytes starting at addr with 8-bit val
FIND   ID_FIND core lang ( addr -- addr 0 | addr 1 | addr -1 ) Find counted string at addr in dictionary
FINDNFA   ID_FINDNFA pforth dictionary ( <name> -- addr 0 | nfa +-1 ) Find name in dictionary
FM/MOD   ID_FM_S_MOD core math ( d1 n1 -- d1%n1 d1/n1 ) Floored quotient and remainder (d1 is 32 bits)
GDB-BREAK I ID_GDB_BREAK pforth compiler Empty routine for setting GDB debugger breakpoints
HEADERS-BASE   ID_VAR_HEADERS_BASE pforth dictionary ( -- addr ) Get address of start of dictionary
HEADERS-LIMIT   ID_VAR_HEADERS_LIMIT pforth dictionary ( -- addr ) Get address just beyond end of dictionary area
HEADERS-PTR   ID_VAR_HEADERS_PTR pforth dictionary ( -- addr ) Get address of next dictionary entry to write
HERE   ID_HERE core dictionary ( -- x ) Push next location in exec area to be written to
I   ID_I core flow ( -- n ) Pushes innermost loop index in a definite loop
J   ID_J core flow ( -- n ) Pushes next-innermost loop index in a definite loop
KEY   ID_KEY core io ( -- n ) Pushes next key from terminal (waits for it)
KEY?   ID_QTERMINAL facility io ( -- flag ) Returns true if key is available from terminal
LITERAL I ID_LITERAL core lang ( x -- ) At run-time, push x on the stack
LSHIFT   ID_LSHIFT core logical ( n u -- n<<u ) Logical left shift
M*   ID_D_MTIMES core math ( n1 n2 -- n1*n2 ) Signed multiplication, result is 32 bits
MAX   ID_MAX core math ( n1 n2 -- max(n1,n2) ) Maximum function
MIN   ID_MIN core math ( n1 n2 -- min(n1,n2) ) Minimum function
MU/MOD   ID_D_MUSMOD pforth double ( AL AH B -- REM QL QH ) 32/16 unsigned divide, 32-bit result
NAME>   ID_NAME_TO_TOKEN pforth dictionary ( nfa -- xt ) Converts address of dict name to its XT
NO;CHECK   ID_NO_SEMI_CHECK pforth compiler Suppresses next check for : ; stack level agreement
NUMBER? D ID_HEXNUMBERQ_P pforth compiler Deferred word, initially set to (HEXNUMBER?), then overwritten with (NUMBER?)
OR   ID_OR core logical ( x1 x2 -- x1|x2 ) Logical OR
OUT   ID_VAR_OUT pforth io ( -- addr ) Get address of variable with current output column
OVER   ID_OVER core stack ( x1 x2 -- x1 x2 x1 )
PICK   ID_PICK coreext stack ( xu...x1 x0 u -- xu...x1 x0 xu ) Copy STACK[u] to TOS
PREVNAME   ID_NAME_TO_PREVIOUS pforth dictionary ( nfa -- nfa ) Converts address of dict name to previous name's address
R>   ID_R_FROM core stack ( -- x ) (R: x -- ) Pop value from return stack and push to data stack
R@   ID_R_FETCH core stack ( -- x ) (R: x -- x) Copy value from return stack and push to data stack
RDROP   ID_R_DROP pforth stack Drop from return stack
REFILL   ID_REFILL coreext io ( -- flag ) Get another line of input. Flag is true if successful.
RETURN-CODE   ID_VAR_RETURN_CODE pforth compiler ( -- addr ) Get address of variable with return code
ROLL   ID_ROLL coreext stack ( xu xu-1 ... x0 u -- xu-1 ... x0 xu ). Size-u rotation of stack.
ROT   ID_ROT core stack ( x1 x2 x3 -- x2 x3 x1 ) Rotate top three stack elements
RP!   ID_RP_STORE pforth stack ( rp -- ) Make address the top of the return stack
RP@   ID_RP_FETCH pforth stack ( -- rp ) Address of top of return stack prior to RP@
RSHIFT   ID_RSHIFT core logical ( x1 u -- x1>>u ) Logical right shift (NOTE: Not arithmetic right shift)
SCAN   ID_SCAN pforth string ( addr cnt char -- addr' cnt' ) Find character in string
SET-SOURCE   ID_SOURCE_SET pforth compiler ( caddr num -- ) Set parsing source to given address
SKIP   ID_SKIP pforth string ( addr cnt char -- addr' cnt' ) Skip over char in string
SM/REM   ID_SM_S_REM core math ( d1 n1 -- d1%n1 d1/n1 ) Signed symmetric quotient/remainder
SOURCE   ID_SOURCE core compiler ( -- caddr num ) Return address and length of input buffer
SP!   ID_SP_STORE pforth stack ( sp -- ) Set address of top of stack
SP@   ID_SP_FETCH pforth stack ( -- sp ) Get address of top of stack
STATE   ID_VAR_STATE core compiler ( -- addr ) Address of compilation state variable
SWAP   ID_SWAP core stack ( x1 x2 -- x2 x1 ) Swap two top stack elements
TRACE-FLAGS   ID_VAR_TRACE_FLAGS pforth utility ( -- addr ) Get address of variable with trace flags
TRACE-LEVEL   ID_VAR_TRACE_LEVEL pforth utility ( -- addr ) Get address of variable with trace level
TRACE-STACK   ID_VAR_TRACE_STACK pforth utility ( -- addr ) Get address of variable with trace stack setting
TYPE   ID_TYPE core io ( caddr u -- ) Display u bytes of string at caddr to terminal
U<   ID_COMP_U_LESSTHAN core logical ( u1 u2 -- flag ) Sets flag if u1<u2 (unsigned)
U>   ID_COMP_U_GREATERTHAN coreext logical ( u1 u2 -- flag ) Sets flag true only if unsigned u1>u2
UM*   ID_D_UMTIMES core math ( u1 u2 -- u1*u2 ) Compute 32-bit unsigned product
UM/MOD   ID_D_UMSMOD core math ( ud u1 -- ud%u1 ud/u1 ) Divide 32-bit ud by 16-bit u1 (unsigned) giving quotient/remainder
WORD   ID_WORD core lang ( char "<char>sss<char>" -- caddr ) Parse by given delimiter, return address
XOR   ID_XOR core logical ( x1 x2 -- x1^x2 ) Exclusive-OR


Not Implemented

Word Name Flags Source Definition ANS Section Language Category Description
;CODE   progtools compiler Add assembly language (NOT IMPLEMENTED in pForth)
ASSEMBLER   progtools compiler Swap wordlists with the assembler wordlist (NOT IMPLEMENTED in pForth)
CODE   progtools compiler Assembly language (NOT IMPLEMENTED in pForth)
CS-PICK   progtools stack NOT IMPLEMENTED in pForth
CS-ROLL   progtools stack NOT IMPLEMENTED in pForth
EDITOR   progtools utility Swap wordlists with the editor wordlist (NOT IMPLEMENTED in pForth)
ENVIRONMENT?   core compiler NOT IMPLEMENTED
RESTORE-INPUT   coreext compiler NOT IMPLEMENTED
SAVE-INPUT   coreext compiler NOT IMPLEMENTED


core

Word Name Flags Source Definition ANS Section Language Category Description
",   core pforth compiler ( addr len -- ) Places string into code space
#   core core io Part of formatted number I/O
#>   core core io Part of formatted number I/O
#S   core core io Part of formatted number I/O
( I core core lang Comment up to next )
((NUMBER?))   core pforth compiler Used to implement NUMBER?
(.")   core pforth compiler Used to implement ."
(ABORT")   core pforth compiler ( flag $message -- ) Calls ABORT if flag is true
(C")   core pforth compiler Used to implement C"
(COMPILE)   core pforth compiler Used by COMPILE
(DOES>)   core pforth compiler Used to implement DOES>
(IS)   core pforth compiler Used to implement IS
(NUMBER?)   core pforth compiler Used to implement NUMBER?
(RANGEOF?)   core pforth compiler Used to implement CASE
(S")   core pforth compiler Used to implement S"
(WHAT'S)   core pforth compiler Used to implement WHAT'S
*/   core core math ( n1 n2 n3 -- n1*n2/n3 ) Product n1*n2 is 32-bit, result is 16-bit
*/MOD   core core math ( n1 n2 n3 -- (n1*n2)%n3 n1*n2/n3 ) Product n1*n2 is 32-bit, quotent/remainder are 16-bit
+LOOP I core core flow ( n -- ) Add n to loop counter, continue looping if not done
,   core core dictionary ( x -- ) Store x in exec area and advance exec pointer
,"   core pforth compiler ( "string" -- ) Parses string and stores in code space
-1   core pforth compiler Equal to -1, saves one cell
." I core core io ( "chars" -- ) Display string at run time
.( I core coreext string Parse and display string delimited by ending )
/MOD   core core math ( n1 n2 -- n1%n2 n1/n2 ) Signed remainder and division
/STRING   core strings string ( addr u1 n -- addr2 u2 ) Chop n characters from the front of the given string
0STACKP   core pforth utility ( stack -- ) Flush user stack
0USP   core pforth compiler Clear loop stack
1+   core core math ( n -- n+1 )
1-   core core math ( n -- n-1 )
2!   core core memory ( LSB MSB addr -- ) 32-bit store: store MSB at addr, LSB at addr+1
2*   core core math ( n -- n<<1 ) Arithmetic left shift
2/   core core math ( n -- n>>1 ) Arithmetic right shift
2@   core core memory ( addr -- LSB MSB ) 32-bit fetch of contents at addr
2DROP   core core stack ( n1 n2 -- ) Drop 2 items
2DUP   core core stack ( n1 n2 -- n1 n2 n1 n2) Duplicate 2 items
2OVER   core core stack ( x1 x2 x3 x4 -- x1 x2 x3 x4 x1 x2 )
2SWAP   core core stack ( x1 x2 x3 x4 -- x3 x4 x1 x2 )
:NONAME   core coreext compiler Define code body without associated dictionary name
:STACK   core pforth utility ( #cells "name" -- ) Define a user stack variable of given name
<#   core core io Part of formatted number I/O
<=   core pforth logical ( a b -- f ) True if a <= b (signed)
<MARK   core pforth compiler Used in forming flow control constructs
<RESOLVE   core pforth compiler Used in forming flow control constructs
>=   core pforth logical ( a b -- f ) True if a >= b (signed)
>BODY   core core dictionary ( XT -- addr ) Used to implement VALUE/TO
>MARK   core pforth compiler Used in forming flow control constructs
>NEWLINE   core pforth utility Print newline but only if output is not at column 0
>NUMBER   core core compiler ( ud1 addr1 u1 -- ud2 addr2 u2 ) See documentation
>RESOLVE   core pforth compiler Used in forming flow control constructs
>STACK   core pforth utility ( n stack -- ) Push onto user stack, postincrement
>US   core pforth compiler Push to loop stack
?COMP   core pforth compiler Ensures compilation state, otherwise errors out
?CONDITION   core pforth compiler Checks that CONDITIONAL_KEY is at top-of-stack, otherwise errors out
?DO I core coreext flow Like DO loop but no iterations are performed if initial value equals upper limit
?DO_FLAG   core pforth compiler Used for implementing loops
?OF I core pforth compiler Used to implement CASE
ABORT D core core lang Abort current execution, clear stack, return to top level prompt
ABORT" I core core lang ( x <message> -- ) If x is non-zero, print abort string and abort
ABS   core core math ( x -- |x| ) Absolute value
AGAIN I core coreext flow Repeat unconditionally from BEGIN
AHEAD I core progtools flow Implements loop structures
ALIGN I core core compiler Does nothing (normally aligns data pointer to some boundary)
ALIGNED I core core compiler Does nothing (normally bumps up address to next aligned boundary)
ALLOT   core core dictionary ( n -- ) Increments exec pointer by n
ASCII I core pforth utility ( <char> -- char ) NOTE: State-smart
AUTO.INIT   core pforth utility Executed prior to accepting first interactive command
AUTO.TERM   core pforth utility Executed upon 'bye'
BEGIN I core core flow Implements loop structures
BL   core core io ( -- 0x20 ) An ASCII blank (space) character
C" I core coreext deprecated Deprecated...use S"
C,   core core dictionary ( x -- ) Store 8 least-significant bits of x in exec area, bump up exec ptr by 1 byte
CASE I core coreext flow Begin CASE/OF/ENDOF/ENDCASE structure
CASE-DEPTH   core pforth compiler Used to implement CASE
CATCH   core exception lang See documentation
CATCH-HANDLER   core pforth compiler Used to implement CATCH
CELL   core pforth compiler 2, the size in bytes of a cell
CELL+   core core memory ( addr -- addr+2 ) Increment address by 2 bytes (size of a cell)
CELL-   core pforth memory ( addr -- addr-2 ) Decrement address by 2 bytes (size of a cell)
CELLS   core core memory ( x -- x<<1 ) Multiply x by 2 (size of a cell)
CHAR   core core string ( "n" -- 'n' ) Convert next single-letter word to its ASCII integer code
CHAR+   core core lang ( n -- n+1 ) Add size of a character
CHARS I core core compiler ( n -- n ) Doesn't do anything (multiplies by sizeof(char))
CHECK.DEFER   core pforth compiler Used to implement DEFER
CHECK.STACK   core pforth compiler Prints error message and calls ABORT if stack underflow
COMPILE I core pforth deprecated Deprecated...use POSTPONE
COMPILE,   core coreext compiler ( XT -- ) Append XT to exec area at current pointer, increment pointer
CONDITIONAL_KEY   core pforth compiler Magic number used in forming conditional flow control
CONSTANT   core core lang ( n "name" -- ) Create a constant word with value n
COUNT   core core string ( addr -- addr+1 u ) Convert counted string address to address+count
DECIMAL   core core io Set current numeric base to 10
DIGIT   core pforth compiler ( char base -- n true | char false ) Convert a single character to a number in the given base
DNEGATE   core double double ( d1 -- -d1 ) Negative function for double-words
DO I core core flow Begin definite loop
DOES> I core core compiler Describe body of word defined with CREATE
DO_FLAG   core pforth compiler Used for implementing loops
DUNUSED   core pforth dictionary ( -- u ) Returns free space in dictionary area
ELSE I core core flow Introduce ELSE clause of IF/ELSE/THEN statement
ENDOF I core coreext flow Terminates OF clause of CASE/OF/ENDOF/ENDCASE structure
EVALUATE   core core lang ( i*x addr u -- j*x ) Evaluate Forth words from given source buffer
FALSE   core coreext lang ( -- false ) Push false constant
FIND&COMPILE   core pforth compiler ( $word -- {n} ) Find word in dictionary and compile/execute it
HEX   core coreext io Sets BASE to 16
HLD   core pforth compiler Used to implement HOLD
HOLD   core core io ( char -- ) Adds character to formatted output
ID.   core pforth compiler ( nfa -- ) Prints string at given address, masking off length character
IF I core core flow Begin IF/ELSE/THEN statement
IMMEDIATE   core core lang Make most recent word definition an immediate word
INTERPRET   core pforth compiler Keeps parsing words, calling FIND&COMPILE for each one
INVERT   core core logical ( n -- ~n ) One's complement
IS I core pforth lang Stores implementation in deferred word
LATEST   core pforth compiler Return address of last word defined
LEAVE I core core flow Leaves a definite loop prematurely
LEAVE_FLAG   core pforth compiler Used for implementing loops
LOOP I core core flow Increment loop count, if equal to limit, terminate loop, otherwise loop from beginning
LOOP-BACK   core pforth compiler Used for implementing loops
LOOP-FORWARD   core pforth compiler Used for implementing loops
MOD   core core math ( n1 n2 -- n1%n2 ) Remainder function
MOVE   core core memory ( addr1 addr2 u -- ) Move u bytes from addr1 to addr2
NEGATE   core core math ( n -- -n ) Negative function
NIP   core coreext stack ( x1 x2 -- x2 ) Remove element above top-of-stack
NOT   core pforth logical ( n -- !n ) Logical negation (equivalent to 0=)
OF I core coreext flow Start OF clause in a CASE statement
OF-DEPTH   core pforth compiler Used to implement CASE
OK   core pforth compiler Prints prompt and dumps stack if TRACE-STACK is non-zero
PAD   core coreext memory ( -- caddr ) Address of a temporary region for intermediate processing
PARSE   core coreext string ( char "ccc<char>" -- caddr u ) Parse with delimiter char, return addr/length.
PLACE   core pforth string ( addr len dest -- ) Moves a string to given destination
POSTPONE I core core lang Compile next word into word definition
QUIT D core core lang Interpreter loop (also ID_QUIT_P)
RANGEOF I core pforth flow Used to implement CASE
RECURSE I core core lang Go to start of this word during execution
REPEAT I core core flow Repeat from start of BEGIN block
S" I core core string Compilation: return given string ( -- caddr u ) at run-time
S>D   core core double ( n -- d ) Sign-extend n to double-cell d
SIGN   core core io Formatted number output
SOURCE-ID   core coreext compiler Pushes 0 for command-line source, -1 for EVALUATE source
SPACE   core core io Emit a single space
SPACES   core core io ( n -- ) If n>0 emit this many spaces
STACK.PICK   core pforth utility ( index stack -- n ) Grab Nth item from top of user stack
STACK>   core pforth utility ( stack -- n ) Pop from user stack, predecrement
STACK@   core pforth utility ( stack -- n ) Copy from top of user stack
STACKP   core pforth utility ( stack -- ptr ) Pointer to next empty location on user stack
THEN I core core flow Mark end of IF/ELSE/THEN statement
THROW   core exception lang See documentation
TO I core coreext lang Stores quantity in a VALUE
TRUE   core coreext lang ( -- true ) Push true constant
TUCK   core coreext stack ( x1 x2 -- x2 x1 x2 ) Copy top-of-stack as third element
U.   core core io ( u -- ) Display unsigned u in free field format
UD.   core pforth compiler ( ud -- ) Prints double unsigned number
UNLOOP   core core flow Must call prior to EXIT when in the middle of a loop
UNTIL I core core flow ( x -- ) Continue looping at BEGIN if x is zero
UNUSED   core coreext dictionary ( -- u ) Returns free space in exec area
US>   core pforth compiler Pop from loop stack
US@   core pforth compiler Copy from loop stack
USTACK   core pforth compiler Name of the "loop stack" used for implementing loops
VALUE   core coreext lang Declares mutable constant
VARIABLE   core core lang Create a global variable. At run time, the variable's name pushes its data address
WHAT'S I core pforth lang ( <name> -- XT ) Grabs XT of a deferred word
WHILE I core core flow Loop while flag on stack is non-zero
[ I core core compiler Enter interpreter mode
['] I core core compiler At run time, place next word's XT on stack. Like ' name when not compiling.
[CHAR] I core core compiler Compile-in runtime behavior of CHAR
[COMPILE] I core coreext deprecated Deprecated...use POSTPONE
\ I core coreext lang Comment to end-of-line
]   core core compiler Enter compilation mode


coreext

Word Name Flags Source Definition ANS Section Language Category Description
#COLS   coreext pforth utility Constant setting # of columns per screen for WORDS
.R   coreext coreext io ( n1 n2 -- ) Display n1 right-aligned in a field n2 characters wide
CONVERT   coreext coreext deprecated Deprecated...use >NUMBER
CR?   coreext pforth utility Carriage return if output column near #COLS
ENDCASE I coreext coreext flow Terminates CASE structure
ERASE   coreext coreext memory ( addr u -- ) Set u bytes of memory to 0 starting at addr
EXPECT   coreext coreext deprecated Deprecated...use ACCEPT
FORGET.NFA   coreext pforth compiler ( nfa -- ) Core of FORGET algorithm
FREEZE   coreext pforth compiler Sets RFENCE to current code space address.
MARKER   coreext coreext lang ( <name> -- ) Define a word that FORGET's itself when executed
QUERY   coreext coreext deprecated Deprecated...use "REFILL DROP"
RFENCE   coreext pforth compiler Variable storing address below which FORGET is illegal
SPAN   coreext coreext deprecated Deprecated...use ACCEPT
TAB   coreext pforth utility Go to next tab stop
TAB-WIDTH   coreext pforth utility Variable storing spaces per tab for printing WORDS
TIB   coreext coreext deprecated Deprecated...use "SOURCE DROP"
U.R   coreext coreext io ( u n -- ) Display u right aligned in a field n wide
VERIFY.FORGET   coreext pforth compiler ( nfa -- ) Calls FORGET.NFA if nfa is above RFENCE
WITHIN   coreext coreext math ( x1 x2 x3 -- flag ) Sets flag true if x1 is between x2 and x3
WORDS   coreext coreext utility Display current dictionary


double

Word Name Flags Source Definition ANS Section Language Category Description
(D.)   double pforth double ( d -- caddr cnt ) Converts a double to string representation
2CONSTANT   double double double ( dl dh "name" -- ) Create double-word constant
2ROT   double double double ( x1 x2 x3 x4 x5 x6 -- x3 x4 x5 x6 x1 x2 ) Double-word stack rotation
2VARIABLE   double double double Create a global double-word variable
D.   double double io ( d -- ) Display double-word in free-field format
D.R   double double io ( d -- ) Display double-word right-aligned
D0<   double double double ( d -- flag ) Set flag true if double-word d<0
D0=   double double double ( d -- flag ) Set flag true if double-word d=0
D2*   double double double ( d -- d<<1 ) Arithmetic double-word left shift
D2/   double double double ( d -- d>>1 ) Arithmetic double-word right shift
D=   double double double ( d1 d2 -- flag ) Set flag true if double-word d1=d2
D>S   double double double ( d -- n ) Convert double-word to single-word number
DABS   double double double ( d -- |d| ) Double-word absolute value
DMAX   double double double ( d1 d2 -- max(d1,d2) ) Maximum function for double-words
DMIN   double double double ( d1 d2 -- min(d1,d2) ) Minimum function for double-words
M*/   double double double ( d1 n1 +n2 -- d1*n1/n2 ) Quotient is double-word, d1*n1 is triple-word
M+   double double double ( d n -- d+n ) Double-word addition to single-word


exception

Word Name Flags Source Definition ANS Section Language Category Description
(ABORT)   exception pforth compiler Throws -1...used to redefine ABORT if exception.ft is used
QUIT-QUIT   exception pforth compiler Variable that, when set, terminates QUIT loop


progtools

Word Name Flags Source Definition ANS Section Language Category Description
?   progtools progtools io ( addr -- ) Display value at addr (equivalent to "@ .")
EXISTS? I progtools pforth preprocess ( <name> -- flag ) Sets flag if given name is a defined word
FORGET   progtools progtools deprecated Deprecated...use MARKER
[ELSE] I progtools progtools preprocess Conditional compilation
[IF] I progtools progtools preprocess Conditional compilation
[THEN] I progtools progtools preprocess Conditional compilation


strings

Word Name Flags Source Definition ANS Section Language Category Description
-TRAILING   strings strings string (addr u1 -- addr u2 ) Reduce string addr/u1 to addr/u2 to eliminate trailing spaces
BLANK   strings strings string ( addr u -- ) Set u characters to spaces beginning at addr
SEARCH   strings strings string ( addr1 u1 addr2 u2 -- addr3 u3 flag ) Search for str2 in str1, set flag if found
SLITERAL I strings strings string Compile in a string to return ( -- addr u ) at run time

© 2003-2004, Copyright by Andrew Sterian; All Rights Reserved. mailto: steriana@claymore.engineer.gvsu.edu