figForth Glossary
Some parts of this page/site are currently incomplete & will be updated asap
Other parts will change continually so use “Refresh” in your browser !!
There is extensive use of “Tooltips” text to support learning which do not seem to render on a Smartphone. This site is best viewed via a computer’s HD monitor
Previous Section: Inside figForth
Glossary: “an alphabetical list, with meanings, of the words or phrases in a text that are difficult to understand…“ Cambridge Dictionary
Important Forth Concepts/Definitions…
Linked List
• The Dictionary’s Linked List Structure
Dictionary/Word Fields
• Name Field
• Link Field
• Code Field
• Parameter Field
Stack Requirements
Forth Words
Glossary Item Format
The first line of each entry shows a symbolic description of the action of the procedure on the parameter stack. The symbols indicate the order in which input parameters have been placed on the stack. Three dashes “—” indicate the execution point; any parameters left on the stack are listed. In this notation, the top of the stack is to the right The definitions are presented in the order of their ASCII sort
All symbols are 16-bit values on the Parameter Stack ("the stack")
The symbols include:
addr memory address
b 8 bit byte (i.e. high 8 bits zero) within a 16-bit word
c 7 bit ASCII character (high 9 bits zero) within a 16-bit word
d 32 bit signed double integer, most significant portion with sign on top of the stack
ud 32 bit unsigned double integer, most significant portion on top of the stack
f boolean flag. 0 = false, non-zero = true
ff boolean false flag = 0
tf boolean true flag = non-zero
n 16 bit signed integer number
u 16 bit unsigned integer
The capital letters on the right show definition characteristics:
C May only be used within a colon definition. A digit indicates number of memory addresses used,
if greater than one
E Intended for execution only
P Has precedence bit set. Will execute even when compiling
U A User variable
Unless otherwise noted, all references to numbers are for 16 bit signed integers. on 8 bit data bus computers, the high byte of a number is on top of the stack, with the sign in the leftmost bit. For 32 bit signed double numbers, the most significant part (with the sign) is on top
All arithmetic is implicitly 16 bit signed integer math, with error and underflow indication unspecified
Word Requirements
“the words or phrases in a text that are difficult to understand”, or rather, in this case, to define a set of rules (“requirements”) that determine the behaviour of Forth Words…
Stack Requirements
As Forth uses the Parameter Stack to pass values during the execution of Forth Words, there are some simple stack rules (“requirements”) to be followed for each Word and these stack rules are documented
Alphabetically
! !CSP <# # #> #S ‘ ( (.”) (+LOOP) (;CODE) (DO) (FIND) (LOOP) (NUMBER) * */ */MOD + +! +- +LOOP , - -DUP -FIND -TRAILING . .” .R / /MOD 0 0< 0= 0> 0BRANCH 1 1+ 1- 2 2! 2* 2+ 2- 2@ 2DROP 2DUP 2SWAP : ; ;CODE ;S < <BUILDS = > >R ? ?COMP ?CSP ?DUP ?EXEC ?PAIRS ?STACK ?TERMINAL @ ABORT ABS AGAIN ALLOT AND BACK BASE BEGIN BL BINARY BLANKS BRANCH C! C, C@ CFA CMOVE COLD COMPILE CONSTANT CONTEXT COUNT CR CREATE CURRENT CSP CONTEXT D! D+ D- D. D.R D0= D< D= D> D@ DABS DECIMAL DEFINITIONS DEPTH DIGIT DLITERAL DMINUS DO DOES> DP DPL DROP DUP ELSE EMIT ENCLOSE END ERASE ERROR EXECUTE EXPECT FENCE FILL FLD FORGET FORTH HERE HEX HLD HOLD I ID. IF IMMEDIATE IN INTERPRET J KEY LATEST LEAVE LFA LIT LITERAL LOOP M* M*/ M/ M/MOD MAX MIN MINUS MOD NFA NOOP NUMBER OR OUT OVER P! P@ PAD PFA QUERY QUIT R0 R> R@ REPEAT ROT RP! RP@ S->D S0 SIGN SMUDGE SP! SP@ SPACE SPACES STATE SWAP THEN TIB TOGGLE TRAVERSE TYPE U* U. U.R U/ U< UNTIL USER VARIABLE VLIST VOCABULARY VTABLE WARM WARNING WHILE WORD XOR [ [COMPILE] ]
Primatives (“Code Definitions”)
FILL ROT < - 2- 2+ 1+ 1- P! D! C! ! P@ D@ C@ @ TOGGLE +! 2DUP DUP 2SWAP SWAP 2DROP DROP OVER DMINUS MINUS D+ + 0< 0= >R R> R@ LEAVE ;S RP@ RP! S->D SP! SP@ AND OR XOR U/ U* CMOVE ?TERMINAL EMIT KEY ENCLOSE (FIND) DIGIT J I (DO) (+LOOP) (LOOP) 0BRANCH BRANCH EXECUTE LIT
“Compile-Time” Words
COLON CONSTANT DOES> USER VARIABLE VOCABULARY .” ;CODE AGAIN ELSE REPEAT IF LITERAL LOOP +LOOP THEN UNTIL WHILE
“Run-Time” Words
DOCOL DOCON DODOES DOUSE DOVAR DOVOC ;S LIT (;CODE) BRANCH 0BRANCH (LOOP) (+LOOP) (.”)
Entry Points
Other Meanings
The “input stream”