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.
- - 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 As specified in the Exception word set.
ABORT" ABORT" As specified in the Exception word set.
ABS ABS Overloaded. Only for signed numbers.
ACCEPT ACCEPT  
ALIGN ALIGN  
ALIGNED ALIGNED  
ALLOT ALLOT  
AND AND  
BASE BASE  
BEGIN BEGIN  
BL BL  .
C! !  
C, C,  
C@ @  
CELL+ 1+ For data type ADDRESS -> SINGLE.
CELLS CELLS  
CHAR CHAR  
CHAR+ 1+ For data type CADDRESS.
CHARS CHARS  
CONSTANT CONSTANT  
COUNT   Not implemented, because counted strings are not supported.
CR CR  
CREATE CREATE  
DECIMAL DECIMAL  
DEPTH DEPTH Returns the number of basic data types on the data type heap.
DO DO Dynamically creates I as a local.
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  
FILL FILL Overloaded.
FIND SEARCH-ALL Requires name in address-count-notation. Has two additional input parameters to specify additional search criteria. Always returns a definition and a signed number.
FM/MOD FM/MOD  
HERE HERE  
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 Overloaded for signed and unsigned numbers.
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 UNLOOP  
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 a tuple 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  
VALUE VALUE Overloaded for single- and double-cell items.
WITHIN WITHIN Overloaded.
[COMPILE] [COMPILE]  
\ \ 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"  

Facility Word Set

ANS Forth StrongForth Remarks
AT-XY AT-XY  
KEY? KEY?  
PAGE PAGE  

Facility Extension Word Set

ANS Forth StrongForth Remarks
EKEY EKEY  
EKEY>CHAR EKEY>CHAR  
EKEY? EKEY?  
EMIT? EMIT?  
MS MS  
TIME&DATE TIME&DATE  

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  

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  
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   Not implemented.
AHEAD AHEAD  
ASSEMBLER   Not implemented.
BYE BYE  
CODE   Not implemented.
CS-PICK CS-PICK  
CS-ROLL CS-ROLL  
EDITOR EDITOR  
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 - February 3rd, 2009