Date: Wed, 10 Aug 94 15:20:07 +0100 From: acc AT asterix DOT inescn DOT pt (Antonio Costa) To: DJGPP Subject: Forth for DJGPP available (PFE 0.9.6) Hello. This is to announce that there is a Forth package available for DJGPP. I am not the author, but he agreed to distribute this. 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. This version of PFE (0.9.6) is for: - IBM-PC compatible running DJGPP GO32 1.12 I took any effort to keep it easily portable to any UNIX system capable of ANSI-C or C++ and having a straight 32-Bit architecture. It might even run on 16 and 64 (more likely) Bit systems, but I didn't try yet. The Forth-system is modeled with the coming ANS for Forth in mind. I implemented every word of every word set mentioned in the dpANS-6 document of june 1993. Additionally it is compatible to Forth-83. This set of source files is distributed under the GNU general public license for libraries. See the file COPYING.LIB for conditions. This means that programs you write ON TOP of it are not considered a 'derived work' of the portable Forth environment and you are free to distribute them under any condition you want. Why did I do it? ================ There was no such thing. See below, design objectives. Design objectives ================= With 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 - CORRECT this means not just "no bugs" -- it means all the interaction of all parts works as specified by the standard AND by traditions. - COMPLETE with powerful computers on the desk and power- ful programming environments there is no need to and no use in strategies like "here kernel, there xyz word set" that might be appropriate on a microcontroller. - PORTABLE I hate to rewrite code because of environmental dependencies. Most of the system should be a mere interface between two well defined languages. There are of course such dependencies. I tried to resort to a common subset of all UNIX bahavior known to me. Fortunately this in fact allowed porting to DOS and OS/2 thanks to the great emx-package. - USABLE A sole kernel helps noone. It should be a development environment. You should be able to manage multiple-source-file-projects from within. - SIMPLE or transparent. At least to my taste. 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 a lot of conflicts with much more important goals. We all have fast computers, haven't we? After all pfe isn't slow. But obviously it cannot compete with assembler implementations. Status ====== Did I achieve the above objectives? Some of them. I'll continue working on it. The system is in use for ten 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 - All ANSI Forth word sets with the exception of the assembler hooks `CODE', `END-CODE' etc. Nothing else is missing. - Several more words provided for compatibility and convenience. - An interface to a text editor to edit plain text sources and the ability to include them. - A word star lookalike block file editor to write source in the old style block format. - A simple source level debugger -- maybe I should better say "single stepper". 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 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 roxi.rz.fht-mannheim.de:/pub/unix/languages/forth/pfe-?.?.?.tar.Z Please send suggestions and bug reports via e-mail to duz AT roxi DOT rz DOT fht-mannheim DOT de Usage ===== For installation refer to the file `install'. 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 not 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 and leads back to the FORTH input loop. Use it to break out of infinite loops. To terminate the system, type BYE at the command-prompt or press the keyboard quit key of your system (usually ^\). Documentation ============= I started writing a man-page `pfe.1'. It is aimed to give you a start and to satisfy the "additional documentation requirements" mentioned in the dpANS document. 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. Contributions ============= 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 AT roxi DOT rz DOT fht-mannheim DOT de if you want to subscribe to that mailing list. Acknowledgements ================ I want to express my gratitude to the people who put their efforts in the precise descriptions I found in these documents: - draft proposed American National Standard -- Programming Languages -- Forth (X3J14 dpANS-6, June 30, 1993) - FORTH-83 Standard (August 1983) - fig-FORTH Installation Manual -- Glossary, Model, Editor (Version 1.3, November 1980) Thanks for providing superb development tools: - Richard Stallman and the FSF, Linus Thorvalds and all who contribute to Linux and Eberhard Mattes. Several individuals 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 kept me from frustration. If pfe is stable now it is thanks to it's users. Most notably in those beginning three-bugs-a-day days were Lennert Benschop, Kevin Haddock, Giorgio Richelli, Marko Teiste, Sean Conner, Rob Hooft, Guenther Thomsen. Thank You. DJGPP Port ========== The DJGPP port was made by Antonio Costa (acc AT asterix DOT inescn DOT pt) and it supports everything except signals! Check the TETRIS game written in Forth -- to run use pfe demo\tetris tt