[net.lang.forth] vforth glossary

valencia@vger.UUCP (05/28/85)

	This is a list of all the FORTH words implemented. In the case where
there are two functions, one for integer, one for floating, they will be
listed together; the floating version will start with "f".

	A "word" refers to a VAX 32-bit longword; a "float" refers
to an 32-bit F-format VAX floating word. The term "opstack" or
"operand stack" will refer to the regular FORTH stack; "return stack"
is the "other" stack, and is implemented with the VAX's SP register.

over ( x y -- x y x )
	Copy second to top

abs, fabs ( x -- |x| )
	Change sign of top of stack if it's negative

max, fmax ( x y -- max(x,y) )
	Take the greater of the top two elements

min, fmin (x y -- min(x,y) )
	Take the lesser of the top two elements

c@ ( d a -- )
	Store the byte quantity "d" at byte address "a".

c! ( a -- d)
	Fetch the byte quantity "d" from byte address "a".

negate, fnegate ( x -- -x )
	Replace top of stack with its negation.

here ( -- a )
	Push the address of the next open memory location in the
dictionary to stack.

>r ( -- d )
	Move one word from the return stack to the operand stack.

r> ( d -- )
	Move one word from the operand stack to return stack.

fill ( a n d -- )
	Fill "n" bytes of memory starting at "a" with the value "d".

pick ( d -- x )
	Get the "d"th word on the opstack (zero-based, starting from the
word below "d") to the top of stack.

, ( d -- )
	Move the word "d" into the next open dictionary word, advancing
HERE.

c, ( d -- )
	As ",", but only a byte operation is done.

rot ( x y z -- y z x )
	Move the third element to the top.

-rot ( y z x -- x y z )
	Move the top element to the third.

allot ( d -- )
	Add "d" to HERE, effectively moving the bottom of the dictionary
forward "d" bytes.

2dup ( x y -- x y x y )
	Duplicate the top two words.

2swap ( w x y z -- y z w x )
	Swap the top two words with the second-to-the-top two words.

(
	Start a comment which is ended by a ")" or newline.

abort
	Initialize forth, start interpreting from the keyboard again.

halt
	Exit back to UNIX.

outpop
	Close the current output file & start using the previous output
file. This is a no-op if this is the first output file.

output
	Take the next word in the input stream & try to open it for writing.
If you can't, call "abort". Otherwise, make it the current output file,
pushing the current output onto a stack so that a later "outpop" will
close this file & continue with the old one.

input
	As output, but open for reading. There is no corresponding "inpop",
as EOF status will cause the equivalent action.

true, false ( -- b )
	Push the boolean true and false values onto the stack. These
values are used uniformly by all of Vforth.

<<, >>
	Arithmetic shift operators. Second item is shifted right or left by
the number of bits specified by the top item.

or, and
	Bitwise OR and AND operations. These will work with "true"
and "false" to provide logical functionality.

=, f= ( x y -- b )
	Return whether x is equal to y.

>, f> ( x y -- b )
	Return whether x is greater than y.

<, f< ( x y -- b )
	Return whether x is less than y.

drop ( x -- )
	Drop the top of stack.

2drop ( x y -- )
	Drop the top two items from the stack.

swap ( x y -- y x )
	Exchange the top two items.

dup ( x -- x x )
	Duplicate the top item.

if ... [ else ] ... end