Dirk Zoller's README |
Here is the README file that belongs to version 0.9.10 of November, 24 1994 of the Portable Forth Environment. (written by Dirk Zoller) What is it?This package contains all neccessary ANSI-C source files to build a running Forth-environment on most UNIX machines, on DOS and on OS/2. The Forth-system is closely modeled along the new American National Standard for the programming language Forth. With the exception of the assembler words I implemented every word of every word set mentioned in the dpANS-6 document of june 1993. Additionally it is compatible to Forth-83. LegaleseThis set of source files is distributed under the GNU general public license for libraries. See the file COPYING.LIB for conditions.
I chose that one to point out that I don't consider programs you write
on top of it a `derived work' of the portable Forth environment. To
violate these conditions you have to do two things together:
Why did I do it?For fun. As an excercise in unix programming. And there was no such thing. See below, design objectives. Design objectivesWith two elaborate standards at hand, one for C, one for Forth, it should be possible to build one language in terms of the other and thus provide both where at least one is available.
While I leave the writing of an ANSI-C compiler in Forth to those who
really believe in Forth's superiority and universality, I concentrated
on the manageable part: Providing a Forth-system in ANSI-C that is
Maybe you miss the design objective SPEED. It was not my goal to
provide the fastest C-based Forth-environment. This would have led to
conflicts with more important goals. We all have fast computers,
haven't we?
After all pfe isn't slow. With a little tuning using GNU-C's global
register variable feature it is pretty fast. On an ix86-based system
it seems to run with about two thirds the speed of a direct threaded
assembler Forth (eforth) i.e. benchmarks take 50% more time.
Did I achieve the above objectives?
Some of them. I'll continue -- slowly -- working on it.
The system is in use for eighteen month now. Several quite obvious
and several quite subtle bugs have been fixed. While there surely are
some more, they are not as obvious since the system passes several
test programs, some of them rather sophisticated.
Once you get the system running, you'll have
Thus you'll be able to edit, compile an run programs in a moderately
comfortable way. For the final design of the development environment
your suggestions still are welcome!
If you try this system, please keep in mind that it is still under
development. Sometimes new --even stupid-- bugs are introduced while
enhancing functionality or while fixing old ones. I appreciate every
hint to a bug and I fixed every bug I've been told about in the last
months. So please don't hesitate to tell me about whatever seems
wrong. Please check for the latest version via anonymous ftp from
UPDATE: The new PFE can be found at
guidod@gmx.de
For installation refer to the files `INSTALL' and `TUNING'.
Once you have it running and see the "ok" prompt after typing return
you can interactively type in forth words. If you mistype, you can
edit the command line and recall old command lines with the arrow
keys. (If you can't then your termcap doesn't work all right and you
can resort to wordstar-like control keys.)
To write some more statements try "EDIT-TEXT filename". This will
invoke your favorite text-file editor on the given file. If it
doesn't, first check the environment variable EDITOR, then check the
file "const.h" for the #defined symbol "EDITOR".
Having written some code you can load it by "INCLUDE filename".
If you prefer the old style block files, give a file to use as
block-file with the -b commandline option. Alternatively you can say
`USING filename' or if the file doesn't exist yet: `USING-NEW
filename'. Then you can edit a block by `n EDIT-BLOCK'.
If your termcap-mechanism works well, the arrow keys and some other
function keys should be active. Quit the editor with ^U and load
blocks with "n LOAD". If it doesn't work well you might not even get a
picture.
For more commandline options try the option -h.
The interrupt key is remapped to ^U (normally it's ^C) and leads back
to the FORTH input loop. Use it to break out of infinite loops. If you
find the ^U annoying see src/options.h for how to change it. I needed
the ^C for the Wordstar look-and-feel.
To terminate the system, type BYE at the command-prompt or press the
keyboard quit key of your system (usually ^\).
I started writing a documentation in texinfo format. This will allow
you to view it online or print it in good quality. There's also an
outdated and hopefully soon superseded man-page that explains some of
the command line options. All documentation is highly unfinished.
For more information please try to get the dpANS-document, which is
an EXCELLENT REFERENCE to this system! You can (could?) ftp it at
ftp.uu.net in the directory /vendor/minerva/x3j14.
Recently the ANSI standard (or the last draft) bacame available as
Word document and in HTML format. From a post of Norm Smith to c.l.f:
are welcome! After the kernel is finished now it makes much sense to
share the burden of creating and improving a well rounded programming
environment for all tasks a Forth programmer wants to do. PFE is YOUR
tool. Get involved in it's design!
There is a mailing list on pfe which you should subscribe to if you
want to be up to date with the development of the system. Send e-mail
to duz@roxi.rz.fht-mannheim.de if you want to subscribe to that
mailing list.
I want to express my gratitude to the people who put their efforts in
the precise descriptions I found in these documents:
Thanks for providing superb development tools:
Several nice people on the net continuously gave me valuable hints to
bugs and possible improvements, were patient enough to try the very
first releases, made ports to machines I never saw myself and thus kept
me from frustration. If pfe is stable now it is thanks to it's users.
Most notably:
|