This is an old revision of the document!
FORTH-10 is a Forth language interpreter included in the Panda TOPS-20 distribution. The anonymous programmer describes the implementation as “NOT totally standard”. The interpreter can be started with the following command on TWENEX:
@FORTH
MIDAS assembly language source is available in file TOPS20:<UTILITIES>FORTH.MID
.
The following Forth words are hard-coded in the FORTH-10 dictionary.
+ ( n1 n2 – n1+n2 )
1+ ( n – n+1 )
- ( n1 n2 – n1-n2 )
1- ( n – n-1 )
* ( n1 n2 – n1*n2 )
MINUS ( n – -n )
ABS ( n – |n| )
MAX ( n1 n2 – n ) n is the greater of n1 or n2
MIN ( n1 n2 – n ) n is the lesser of n1 or n2
/ ( n1 n2 – n1/n2 ) integer division
MOD ( n1 n2 – n ) n is the modulus of n1/n2
/MOD ( n1 n2 – n3 n4 ) n3 is the modulus of n1/n2, n4 is the integer quotient (n1 = n2*n4+n3)
F+ ( r1 r2 – r1+r2 ) floating point addition
F- ( r1 r2 – r1-r2 ) floating point subtraction
F* ( r1 r2 – r1*r2 ) floating point multiplication
F/ ( r1 r2 – r1/r2 ) floating point division
DROP ( n – )
DUP ( n – n n )
OVER ( n1 n2 – n1 n2 n1 )
PICK ( n1 – n2 ) n2 is the n1th item from the top of the stack
SWAP ( n1 n2 – n2 n1 )
At start-up, FORTH-10 searches the user's log-in directory for a file named AUTO-LOAD.4TH
. If such a file exists, it is loaded automatically. If the file does not exist, FORTH-10 displays a standard greeting message.