FORTH FOR FREE

The simplicity and extendibility of Forth gives rise to a bewildering variety of Forths and Forth-like systems on the Web. The Forths I have selected meet most or all of these criteria:

I have, I hope, included enough information for you to decide which Forth might interest you. Where possible, I have included a link to a web page rather than just to an FTP site. More details on these and other Forths can be found in the comp.lang.forth Systems FAQ. If you have strong views on the Forths listed here, or think some other Forth should be included let me know. Your feedback is vital.

BEFORE YOU DOWNLOAD

Writing a public domain Forth is a labour of love. Most Forths are written by a single person, often with a single practical implementation in mind. There is no "one best way" of writing a Forth. You will find the Forths listed here vary widely in style, implementation and features. The authors do not have the resources to provide help lines and technical support. When you've read all the instructions and tutorials, studied the source code, and still can't work out how to do something the best place to ask is on comp.lang forth, which many authors and other users follow regularly. And of course, if you find a genuine bug, or better still a fix for one, let the author know, but don't just write saying "Why doesn't your Forth do...? "

There is a saying in Forth circles "If you don't like it, change it." Forth is uniquely easy to modify - the whole system is open to the programmer. With Forth, everyone's an implementor. Study the ANS Standard. You don't have to stick to it, but it's a good base in deciding what differences are necessary and what is merely dialect.

So, read these systems for ideas. Change, adapt, modify, improve. Just remember to give credit where it's due, and don't try to pass off other people's work as your own, or your own as anyone else's.

Minimal Forths

TOP

Minimal Forths are bare-bones systems, written mainly in high-level Forth. This makes them easy to adapt to new hardware, and to situations where memory and other resources are at a premium. Because they are so small and simple, they are also a good way of learning how Forths are written.

CamelForth

by Brad Rodriguez is an ANSI Standard Forth. Each word in assembler also has high-level Forth comments alongside which greatly help in understanding CamelForth/80 is for the Z80; CamelForth/09 is for the 6809.

Douglas Beattie has ported Camel Forth to the Rabbit 2000 processor.

The Rabbit_2000 is a highly-integrated microcontroller based on the instruction set and CPU model of the Zilog Z180. It is a new architecture with superior execution times, optimized for embedded applications, and rich in peripheral functions.

eForth

is a very portable, ANS-aligned, public-domain Forth that comes with all sources and only 29 words in assembler. There are versions for DOS, for the 8051/8031 chip, and for the Z80.

There is even a (slow) "Starting Forth" compatible version written as a Java applet. You need a browser that supports Java 1.1

EForth is now available direct from the web site of Bill Muench, its author. This version includes much material missing from the previous 1997 version.

pbFORTH

replaces the firmware of the Lego Mindstorm brick, allowing it to be programmed in Forth. The author, Ralph Hempel, writes:

One of the coolest things about Mindstorms is that you get a complete embedded development package that is great for teaching kids about basic programming. One of the worst things is that it opens a Pandora's Box for engineers and computer geeks that makes us wish that we could control it directly.

The current version of pbFORTH is 1.2.1 and is available as a complete archive of the image including all the source code for building pbForth, as well as a minimal and full kernel and all of the test scripts.


Forths for the Palm

TOP

Quartus Forth

is the longest-established on-board native FORTH compiler for the Palm Pilot series of PDAs. It also runs on Unix, Windows, and the Mac OS using the Palm OS Emulator available for all three platforms.

Dragon Forth for Palm Pilot

Its author Dmitry Yakimov lists these features:


Forths for DOS

TOP

16-bit DOS Forths are generally faster and more compact than 32-bit, but restricted to a segmented memory model.

F-PC v3.6

is a segmented 16-bit Forth which makes the most of the DOS architecture. Based on the Forth-83 Standard, this is the most developed of the DOS Forths, complete with fast, mousing editor, manual and many code samples. Ulrich Hoffmann has contributed an ANS-compatible layer and the best Forth tutorial (Brown) is based on it.A very complete implementation, with lots of examples, and a huge library of code for graphics, I/O, math, etc. Also, a reasonably good introductory Tutorial

Pygmy Forth v1.5

is a small, 16-bit DOS Forth written by Frank Sergeant, a FIG UK member. It is modeled after Chuck Moore's cmFORTH for NOVIX, and shares many of the characteristics of a minimal Forth, but is a complete programming environment. It has some interesting simplifactions when compared to ANS Forths, including a very neat way of re-compiling itself to produce a kernel exactly suited to your needs. Complete with documented source code, editor, multitasker, I/O, assembler and metacompiler. Can be embedded in a C wrapper to access C library routines. ANSPYGMY by Jonah Thomas is a layer which converts it (more or less) to Standard Forth


32-bit PC Forths

TOP

Common Forth v1.668

is an experimental 32-bit Forth system that features floating point support, C interface, disassembler/assembler, graphics support and a meta-compiler. Full source code included.

FORTH32

is a flat 32-bit subroutine-threaded Forth for DOS-DPMI, and text-mode OS/2. It is ANS-Compliant and contains the full ANS wordset implementation, including all the extension wordsets except LOCALS. The DOS version has a built-in editor for code VIEWing, and the OS/2 version has hooks precompiled in it to link to GNU EMACS for VIEWing. The OS/2 version is also fully multithreaded and supports all the DOS, VIO, and MOUSE system calls from high-level code.

OOF

is an object-oriented 32-bit Forth System written by Zsoter Andras. It does not use a threaded paradigm, and generates native machine code. Although many ANS Forth programs will run on OOF, it is not fully ANS Forth compliant. All source is under the GNU General Public License.


Forths for Windows

TOP

Aztec Forth

by Thomas Worthington, a FIG UK member, is a minimum system for IBM compatible computers under Win95. Aztec Forth generates native intel code, with inlining available to modify the amount of subroutines based on the size of the current word. Windows API calls are normal Forth words and DLLs are wordlists, although WORDS will not list the contents of a DLL. All addresses are treated the same so there is no need to translate from "Forth" to "Windows" addresses. A Windows block editor with cut & paste and shadow block support is included.

Jax4th

a freeware 32-bit Forth for Windows NT complete with source code. The current version features complete access to NT DLL's, and a BLOCK loading facility. Written in MASM by Jack Woehr.

Win32forth v4.1

by Tom Zimmer and Andrew McKewan is a fairly comprehensive Forth for Win95. Complete with editor, debugger and assembler, this provides good access to Windows. Many code samples including an object-oriented layer, but no manual yet. Should have a long lifetime.

Jos van der Ven offers a toolset for Win32Forth users. Included are over 2000 error-codes for Windows.

Michael Hillerstrom has written code for five "container classes" for Property Pages, Multiple Document Interface, Customizable Toolbars, Header Controls,and Treeviews.

Dave Pochin has produced a Beginner's Guide to Win32Forth for FigUk, which Tom Zimmer describes as "much less intimidating than just jumping in head first"


Forths for the Mac

TOP

D

is a free (GPL) FORTH which runs on Mac OS X. It is written by Daniel Engeler, a student of Electrical Engineering at he Federal Institute of Technology, Zurich - who describes it thus:

D is a high-speed, native FORTH which lets you compile code interactively. It features stack caching, seamless integration of assembler, built-in help system and command-line editor.

Kevo

by Antero Taivalsaari is a prototypical (classless) object-oriented language (for the Mac) which has a Forth feel to it. Features multitasking, dynamic memory management, and an integrated (Mac Finder-like) iconic programming environment. Comes with source, demo programs, and some documentation.

Mops and PowerMops

by Michael Hore, is an object-oriented Forth for Mac OS X (Website and FTPsite) Doug Hoffman writes:

Mops is a very comprehensive Forth for the Macintosh. Complete with integrated editor, debugger and assembler, this provides excellent access to the Mac. Many code samples including an object-oriented layer, and a comprehensive manual is included. Should have a long lifetime. Many people have written code and examples in Mops to supplement the already extensive library of classes that is included

Pocket Forth v6.5,

by Chris Heilman. Subroutine threaded with 16-bit words. Supports 16-bit relative, 32-bit absolute addressing. Allows "inline" definitions, but doesn't have an in-line assembler. Minimal Toolbox support; but it does supports Apple Events. Comes as a 17K application, and a desk accessory. Distribution comes with complete source; the kernel is in assembly. There is a MPW version available.


Forths written in C

TOP

Forths written in C are portable and can be fast. If you already know C, this is a good place to start. On the other hand, they tend to be designed for use as part of a larger environment, and so in many ways more akin to conventional compilers than to classic Forth.

4tH v3.3d2

is a fast, portable and crash-proof compiler that is very easy to embed into C applications. It is ANS-Forth compatible, and includes such constructs as assertions, conditional compilation, exception handling, and decompilers. Generates portable bytecode. Confirmed ports to DOS, Windows, Linux, BSD-UNIX, DPX/2, DPX/20, RS/6000, and Coherent, with others in the works. Comes with lots of documentation and sample applications. The extensive errortrapping and good tutorial make it a painless way to learn Forth, but it lacks the ability to define words interactively.

Ficl 2.04

is a lightweight, efficient language designed to be incorporated into other programs, including (especially) firmware based systems. Ficl includes a simple but capable object model that can wrap existing data structures. Applications: scripting, prototyping, automation, hardware test and debug, command language for embedded targets...

Sept 2001 John Sadler announces that release 3.00 is now available for download. Release 3.00 changes the programming interface to permit multiple Ficl systems to coexist in a single address space. Thanks to Orjan Gustaffson for contributing these mods.

There are also bug fixes for 64-bit compatibility (thanks to DCS (again) and the FreeBSD mob), and fixes for various bugs in the debugger, parse-steps, and OO support. The linux makefile and the tar.gz package has been tested on the sourceforge compile farm, so it should be trouble free.

[LATEST RELEASE (v4.0.31 2003)]This is a major revision - thanks to the relentless enrgy of Larry Hastings. The centrepiece is a completely rewritten inner interpreter that runs our benchmarks about three times faster than FICL v3.x

Gforth

is a fast and portable implementation of the ANS Forth language. It works nicely with the EMACS editor, offers some nice features such as input completion and history and a powerful locals facility, and it even has (the beginnings of) a manual. Distributed under the GNU General Public License. Gforth runs under Unix (various flavours), DOS/Win (with GO32), OS/2 (with EMX) and Win95/WNT, and should not be hard to port to other systems supported by GCC.

(Sept 2003) Anton Ertl reports that version 0.6.2 is now available. It includes recent research on using super-instructions for optimisation.

KForth

is available for Linux or Windows. It implements a subset of the ANS-Forth Standard. Designed such that it's object code may be interfaced to another program to serve as a customizable application language. Features include low-level file access words, string manipulation and type-checking on memory operations.

kForth for Windows(95/98/NT) has now been rebuilt using the free Cygwin development tools for WindowsThe new version will allow anyone to modify and rebuild the executable using the Cygwin tools.

This Forth

by Wil Baden, is a reluctantly ANS-compliant C-Forth that originated on a Sun Workstation before the ANS-Forth standard. It is intended as an embedded command line interpreter and scripting tool for Unix applications. You will need m4 and an ANSI-C compiler to compile it. Binaries are available for a number of architectures (Macintosh, CRAY, MIPS, SUN, SGI, Intel).

Until v2.5.2

is (almost) Forth-83 written in C. Its internals are described in the book "Write Your Own Programming Language Using C++" (ISBN# 1-55622-264-5) by Norman Smith which can be borrowed from the library. This implementation was designed to call, and be called, by other C functions. It is ideal as a 'macro' language embedded in C/C++ applications. Comes with 175 pp. of documentation.


Other Forths

TOP

Forthmacs v3.1

is Hanno Schwalm's port of Mitch Bradley's Forthmacs for RISC/OS (Acorn) computers using the ARM2, ARM3, ARM6, ARM7, or StrongARM CPUs. Complete with debugger, assembler, decompiler/disassembler, and floating-point math. Follows the 83-Standard, and was written with portability to other platforms and former versions in mind. Shareware.

Meme

is a modular Forth with features such as built in support for 3-dimensional graphics and a TCP/IP stack along with features that are now pretty much standard in Forth such as structured types and multitasking. Claimed to be a fast and easier alternative to Java for virtual reality applications.

JForth

is an implementation of Forth designed specifically for the Commodore Amiga. JForth uses a 32-bit stack and compiles directly to 68000 machine code. It also provides an extensive set of tools for accessing the special features of the Amiga. You can call any Amiga Library routine by name and reference any Amiga structure using constructs similar to 'C'. JForth also has some special toolboxes that support simple graphics, Intuition menus, IFF files, and other Amiga features. Source code for all these toolboxes is provided so you can customize them if needed or study them as examples of Amiga programming.


More Compilers on FIG USA

HOME Site Map TOP