ANS Forth - StrongForth Cross Reference

Core Word Set

ANS Forth StrongForth Remarks
! ! Overloaded.
# #  
#> #>  
#S #S  
' ' Returns a definition instead of an execution token.
( \ Extended semantics. Use ( for stack diagrams only.
* * Overloaded.
*/ */ Overloaded.
*/MOD */MOD Overloaded.
+ + Overloaded. Performs address arithmetic.
+! +! Overloaded. Performs address arithmetic.
+LOOP +LOOP Overloaded. Performs address arithmetic.
, , Overloaded for SINGLE and DOUBLE. Can be applied to all memory spaces.
- - Overloaded. Performs address arithmetic.
. . Overloaded.
." ." State-smart.
/ / Overloaded.
/MOD /MOD Overloaded.
0< 0< Overloaded.
0= 0= Overloaded.
1+ 1+ Overloaded. Performs address arithmetic.
1- 1- Overloaded. Performs address arithmetic.
2! ! Can only be applied to double-cell items, but not to pairs of single-cell items.
2* 2* Overloaded. Can only be applied to numbers.
LSHIFT Overloaded. Can only be applied to logical values.
2/ 2/ Overloaded. Can only be applied to numbers.
RSHIFT Overloaded. Can only be applied to logical values.
2@ @ Can only be applied to double-cell items, but not to pairs of single-cell items.
2DROP DROP Can only be applied to double-cell items, but not to pairs of single-cell items.
2DUP DUP Can only be applied to double-cell items, but not to pairs of single-cell items.
2OVER OVER Can only be applied to double-cell items, but not to pairs of single-cell items.
2SWAP SWAP Can only be applied to double-cell items, but not to pairs of single-cell items.
: :  
; ;  
< < Overloaded.
<# <#  
= = Overloaded.
> > Overloaded.
>BODY >BODY Applied to a definition instead of an execution token.
>IN >IN  
>NUMBER >NUMBER  
>R >R Creates and initializes a local R@.
?DUP   Not implemented.
@ @ Overloaded.
ABORT ABORT  
ABORT" ABORT"  
ABS ABS Overloaded. Only for signed numbers.
ACCEPT ACCEPT  
ALIGN ALIGN Can be applied to all memory spaces.
ALIGNED ALIGNED  
ALLOT ALLOT Can be applied to all memory spaces.
AND AND  
BASE BASE  
BEGIN BEGIN  
BL BL Hidden by the assembler version of BL.
C! !  
C, C,  
C@ @  
CELL+ 1+  
CELLS CELLS  
CHAR CHAR  
CHAR+ 1+  
CHARS CHARS  
CONSTANT CONSTANT  
COUNT   Not implemented, because counted strings are not supported.
CR CR  
CREATE CREATE Does not supply a word with a default runtime semantics.
DECIMAL DECIMAL  
DEPTH DEPTH Returns the number of basic data types on the data type heap.
DO DO  
DOES> DOES> Must be followed by a stack diagram.
DROP DROP Overloaded.
DUP DUP Overloaded.
ELSE ELSE  
EMIT EMIT  
. Only for data type CHARACTER.
ENVIRONMENT? ENVIRONMENT? Returns the address of the parameter and a flag.
EVALUATE EVALUATE  
EXECUTE EXECUTE Individually created by )PROCREATES. Each version can only be applied to one specific subtype of TOKEN.
EXIT EXIT Does not require UNLOOP when used inside DO loops.
FILL FILL Overloaded.
FIND SEARCH-ALL Requires name in address-count-notation. Has two additional input parameters to specify the additional search criteria. Always returns a definition and a signed number.
FM/MOD FM/MOD  
HERE HERE Can be applied to all memory spaces.
HOLD HOLD  
I I A local dynamically generated by DO and ?DO, and removed by LOOP and +LOOP.
IF IF  
IMMEDIATE IMMEDIATE  
INVERT INVERT  
J J A local dynamically generated by DO and ?DO, and removed by LOOP and +LOOP.
KEY KEY  
LEAVE LEAVE  
LITERAL LITERAL Overloaded.
LOOP LOOP Overloaded. Performs address arithmetic.
LSHIFT LSHIFT Overloaded with an additional version for single bit shift.
M* M* Overloaded.
MAX MAX Overloaded.
MIN MIN Overloaded.
MOD MOD Overloaded.
MOVE MOVE Overloaded.
NEGATE NEGATE Overloaded.
OR OR  
OVER OVER Overloaded.
POSTPONE POSTPONE  
QUIT QUIT  
R> R> Removes local R@.
R@ R@ A local dynamically generated by >R and removed by R>.
RECURSE RECURSE  
REPEAT REPEAT  
ROT ROT Overloaded.
RSHIFT RSHIFT Overloaded with an additional version for single bit shift.
S" " Name changed because counted strings are not supported.
S>D S>D  
SIGN SIGN Expects a flag.
SM/REM SM/REM  
SOURCE SOURCE  
SPACE SPACE  
SPACES SPACES  
STATE STATE  
SWAP SWAP Overloaded.
THEN THEN  
TYPE TYPE Overloaded.
U. .  
U< <  
UM* M*  
UM/MOD UM/MOD  
UNLOOP   Not implemented, because the loop parameters are locals.
UNTIL UNTIL  
VARIABLE VARIABLE Requires an initialization value.
WHILE WHILE  
WORD PARSE Different semantics as specified in ANS Forth A.6.2.2008. WORD is not implemented because counted strings are not supported.
PARSE-WORD
XOR XOR  
[ [  
['] [']  
[CHAR] [CHAR]  
] ]  

Core Extension Word Set

ANS Forth StrongForth Remarks
#TIB #TIB  
.( .(  
.R .R Overloaded.
0<> 0<> Overloaded.
0> 0> Overloaded.
2>R >R Creates and initializes a local R@. Can only be applied to double-cell items, but not to pairs of single-cell items.
2R> R> Removes local R@. Can only be applied to double-cell items, but not to pairs of single-cell items.
2R@ R@ A local dynamically generated by >R and removed by R>. Can only be applied to double-cell items, but not to pairs of single-cell items.
:NONAME :NONAME Returns a definition instead of an execution token.
<> <> Overloaded.
?DO ?DO  
AGAIN AGAIN  
C"   Not implemented, because counted strings are not supported.
CASE CASE  
COMPILE, COMPILE, Applied to a definition instead of an execution token.
CONVERT   Not implemented.
ENDCASE ENDCASE  
ENDOF ENDOF  
ERASE ERASE Overloaded.
EXPECT   Not implemented. May be replaced by ACCEPT.
FALSE FALSE  
HEX HEX  
MARKER MARKER  
NIP NIP Overloaded.
OF OF  
PAD PAD  
PARSE PARSE  
PICK   Not implemented.
QUERY   Not implemented.
REFILL REFILL  
RESTORE-INPUT RESTORE-INPUT Requires always one double-cell item as input parameter.
ROLL   Not implemented.
SAVE-INPUT SAVE-INPUT Returns always one double-cell item.
SOURCE-ID SOURCE-ID Implemented as a VALUE.
SPAN   Not implemented.
TIB TIB  
TO TO  
TRUE TRUE  
TUCK TUCK Overloaded.
U.R .R  
U> >  
UNUSED UNUSED Can be applied to all memory spaces.
VALUE VALUE  
WITHIN WITHIN Overloaded.
[COMPILE] [COMPILE]  
\ \ Extended semantics.

Block Word Set

ANS Forth StrongForth Remarks
BLK BLK  
BLOCK BLOCK  
BUFFER BUFFER  
EVALUATE EVALUATE  
FLUSH FLUSH  
LOAD LOAD  
SAVE-BUFFERS SAVE-BUFFERS  
UPDATE UPDATE  

Block Extension Word Set

ANS Forth StrongForth Remarks
EMPTY-BUFFERS EMPTY-BUFFERS  
LIST LIST  
REFILL REFILL  
SCR SCR  
THRU THRU  
\ \ Extended semantics.

Double-Number Word Set

ANS Forth StrongForth Remarks
2CONSTANT CONSTANT Can only be applied to double-cell items, but not to pairs of single-cell items.
2LITERAL LITERAL Can only be applied to double-cell items, but not to pairs of single-cell items.
2VARIABLE VARIABLE Can only be applied to double-cell items, but not to pairs of single-cell items. Requires an initialization value.
D+ +  
D- -  
D. .  
D.R .R  
D0< 0<  
D0= 0=  
D2* 2* Can only be applied to numbers.
D2/ 2/ Can only be applied to numbers.
D< <  
D= =  
D>S D>S  
DABS ABS Only for signed numbers.
DMAX MAX  
DMIN MIN  
DNEGATE NEGATE  
M*/ */ Overloaded for signed and unsigned numbers.
M+ +  

Double-Number Extension Word Set

ANS Forth StrongForth Remarks
2ROT ROT Can only be applied to double-cell items, but not to pairs of single-cell items.
DU< <  

Exception Word Set

ANS Forth StrongForth Remarks
CATCH CATCH Does not produce a different stack effect if an exception is thrown.
THROW THROW  

Exception Extension Word Set

ANS Forth StrongForth Remarks
ABORT ABORT  
ABORT" ABORT"  

File-Access Word Set

ANS Forth StrongForth Remarks
(   Not implemented.
BIN BIN  
CLOSE-FILE CLOSE  
CREATE-FILE CREATE  
DELETE-FILE DELETE  
FILE-POSITION POSITION  
FILE-SIZE SIZE  
INCLUDE-FILE INCLUDE Overloaded.
INCLUDED INCLUDE Overloaded.
OPEN-FILE OPEN  
R/O R/O  
R/W R/W  
READ-FILE READ  
READ-LINE READ-LINE  
REPOSITION-FILE REPOSITION  
RESIZE-FILE RESIZE  
S" "  
SOURCE-ID SOURCE-ID  
W/O W/O  
WRITE-FILE WRITE  
WRITE-LINE WRITE-LINE  

File-Access Extension Word Set

ANS Forth StrongForth Remarks
FILE-STATUS STATUS  
FLUSH-FILE FLUSH  
REFILL REFILL  
RENAME-FILE RENAME  

Facility Word Set

ANS Forth StrongForth Remarks
AT-XY AT-XY  
KEY? KEY?  
PAGE PAGE Prints 25 empty lines and position the cursor in the top left corner.

Facility Extension Word Set

ANS Forth StrongForth Remarks
EKEY EKEY  
EKEY>CHAR EKEY>CHAR  
EKEY? EKEY?  
EMIT? EMIT? Always returns TRUE.
MS MS Granularity is 1/18.2 seconds.
TIME&DATE TIME&DATE  

Floating-Point Word Set

ANS Forth StrongForth Remarks
>FLOAT >FLOAT Always returns a floating-point number.
D>F D>F  
F! ! Overloaded.
F* * Overloaded.
F+ + Overloaded.
F- - Overloaded.
F/ / Overloaded.
F0< 0< Overloaded.
F0= 0= Overloaded.
F< < Overloaded.
F>D F>D  
F@ @ Overloaded.
FALIGN FALIGN Can be applied to all memory spaces.
FALIGNED FALIGNED  
FCONSTANT CONSTANT  
FDEPTH   Not implemented.
FDROP DROP Overloaded.
FDUP DUP Overloaded.
FLITERAL LITERAL Overloaded.
FLOAT+ 1+  
FLOATS FLOATS  
FLOOR FLOOR  
FMAX MAX Overloaded.
FMIN MIN Overloaded.
FNEGATE NEGATE Overloaded.
FOVER OVER Overloaded.
FROT ROT Overloaded.
FROUND ROUND  
FSWAP SWAP Overloaded.
FVARIABLE VARIABLE Requires an initialization value.
REPRESENT REPRESENT  

Floating-Point Word Extension Set

ANS Forth StrongForth Remarks
DF! ! Overloaded.
DF@ @ Overloaded.
DFALIGN DFALIGN  
DFALIGNED DFALIGNED  
DFLOAT+ 1+  
DFLOATS DFLOATS  
F** **  
F. . Overloaded.
FABS ABS Overloaded.
FACOS ACOS  
FACOSH ACOSH  
FALOG ALOG  
FASIN ASIN  
FASINH ASINH  
FATAN ATAN  
FATAN2 ATAN2  
FATANH ATANH  
FCOS COS  
FCOSH COSH  
FE. E.  
FEXP EXP  
FEXPM1 EXPM1  
FLN LN  
FLNP1 LNP1  
FLOG LOG  
FS. S.  
FSIN SIN  
FSINCOS SINCOS  
FSINH SINH  
FSQRT SQRT  
FTAN TAN  
FTANH TANH  
F~ ~  
PRECISION PRECISION Implemented as a VALUE.
SET-PRECISION SET-PRECISION  
SF! ! Overloaded.
SF@ @ Overloaded.
SFALIGN SFALIGN  
SFALIGNED SFALIGNED  
SFLOAT+ 1+  
SFLOATS SFLOATS  

Locals Word Set

ANS Forth StrongForth Remarks
(LOCAL) (LOCAL)  
TO TO  

Locals Extension Word Set

ANS Forth StrongForth Remarks
LOCALS| LOCALS|  

Memory-Allocation Word Set

ANS Forth StrongForth Remarks
ALLOCATE ALLOCATE Returns a far address.
FREE FREE  
RESIZE RESIZE  

Programming-Tools Word Set

ANS Forth StrongForth Remarks
.S .S Displays data types instead of stack values.
? ?  
DUMP DUMP Overloaded.
SEE SEE  
WORDS WORDS Extended functionality.

Programming-Tools Extension Word Set

ANS Forth StrongForth Remarks
;CODE ;CODE  
AHEAD AHEAD  
ASSEMBLER ASSEMBLER Dummy word.
BYE BYE  
CODE CODE  
CS-PICK   Not implemented.
CS-ROLL   Not implemented.
EDITOR EDITOR Dummy word.
FORGET   Not implemented.
STATE STATE  
[ELSE] [ELSE]  
[IF] [IF]  
[THEN] [THEN]  

Search-Order Word Set

ANS Forth StrongForth Remarks
DEFINITIONS     DEFINITIONS      
FIND SEARCH-ALL Requires name in address-count-notation. Has two additional input parameters to specify the additional search criteria. Always returns a definition and a signed number.
FORTH-WORDLIST FORTH-WORDLIST  
GET-CURRENT GET-CURRENT  
GET-ORDER GET-ORDER Returns an item of data type TUPLE.
SEARCH-WORDLIST SEARCH Has two additional input parameters to specify the additional search criteria. Always returns a definition and a signed number.
SET-CURRENT SET-CURRENT  
SET-ORDER SET-ORDER Expects an item of data type TUPLE. To set the default search order, execute SET-ORDER with no parameter.
WORDLIST WORDLIST  

Search-Order Extension Word Set

ANS Forth StrongForth Remarks
ALSO ALSO  
FORTH FORTH  
ONLY ONLY  
ORDER ORDER  
PREVIOUS PREVIOUS  

String Word Set

ANS Forth StrongForth Remarks
-TRAILING -TRAILING  
/STRING /STRING Overloaded with an additional version for one single character.
BLANK BLANK  
CMOVE MOVE Overloaded. Can only be used for a move, but not for memory propagation.
CMOVE> MOVE Overloaded. Can only be used for a move, but not for memory propagation.
COMPARE COMPARE Overloaded.
SEARCH SEARCH  
SLITERAL SLITERAL  

Note: Many words have specific data type restrictions regarding their input parameters. For example, + can not be used to add an address to an integer, but an integer can be added to an address, giving an address.


Dr. Stephan Becher - January 17th, 2008