microFORTH was heavily marketed, and attracted a lot of attention in the late '70s. One side effect of this was the growth of an active and enthusiastic group of hobbyists who fell in love with Forth. In their wake came new companies marketing versions of Forth in competition with FORTH, Inc. At the same time, Moore himself was becoming increasingly drawn toward hardware implementations of Forth, and less involved in software production at FORTH, Inc. (which he left in 1982 to pursue his hardware interests full time). In this section we examine the development of Forth under these diverse new influences.
In the late 1970's, Northern California was afire with the early rumblings of the Computer Revolution. Groups of interested individuals such as the "Home Brew Computer Club" were meeting to share interests and experiences. Magazines such as Radio Electronics published step-by-step instructions on how to build your own video display terminal, and even how to build your own microcomputer system.
Due to the high cost of memory and low level of VLSI integration, typical "homebrew" computers were very resource-constrained environments. Echoing back to the first generation computers, there was insufficient memory to concurrently support an editor, assembler and linker. Mass storage was slow and expensive, so many homebrew systems used paper tape or audio cassette tapes for I/O. Although some BASIC language products were available, they were typically very slow, and incapable of supporting significant programs. The stage was thus set for something else to meet the expanding needs of these hardy explorers and "early adopters."
Forth had been born and bred to exploit the minimal facilities of resource-constrained systems. It carried neither the excess baggage of a general solution nor a requirement for an existing file or operating system or significant mass storage. As Forth was used to tackle more and more difficult embedded computer applications, it started to claim the attention of the Northern California homebrew computer enthusiasts.
Bill Ragsdale, a successful Bay Area security system manufacturer, became aware of the benefits of microFORTH, and in 1978 asked FORTH, Inc. to produce a version of microFORTH for the 6502. FORTH, Inc. declined, seeing much less market demand for microFORTH on the 6502 than the more popular 8080, Z80 and 6800 CPUs.
Ragsdale then looked for someone with the knowledge of microFORTH and intimate familiarity with the 6502 to port a version of microFORTH to the 6502. He found Maj. Robert Selzer, who had used microFORTH for an AMI 6800 development system on an Army project and was privately developing a standalone editor/assembler/linker package for the 6502. Selzer wrote a 6502 Forth assembler, and used the Army's microFORTH metacompiler to target compile the first 6502 stand-alone Forth for the Jolt single board computer.
Selzer and Ragsdale subsequently made substantial modifications and improvements to the model, including exploitation of page zero and stack-implicit addressing architectural features in the 6502. Many of the enhancements that characterized the later public-domain versions were made during this period, including variable-length name fields and modifications to the dictionary linked-list threading. A metacompiler on the Jolt could target a significantly changed kernel to a higher address in memory. A replacement bootable image would then be recompiled by the new kernel into the lower boot address, which could then be written out to disk. At this point, Ragsdale had a system with which to meet his professional needs for embedded security systems.
During this period the Forth Interest Group (FIG) was started by Ragsdale, Kim Harris, John James, David Boulton, Dave Bengel, Tom Olsen and Dave Wyland [FIG 1978]. They introduced the concept of a "FIG Forth Model," a publicly available Forth system that could be implemented on popular computer architectures.
The FIG Forth Model was derived from Ragsdale's 6502 system. In order to simplify publication and rapid implementation across a wide variety of architectures, a translator was written to convert Forth metacompiler source code into text that, when input to a standard 6502 assembler, would replicate the original kernel image. In this way, neither the metacompiler nor its source code needed to be published. This is an important point. Forth metacompilation is a difficult process to understand completely. It requires the direct manipulation of three distinct execution phases and object areas, and is not something that a casual user wanted or needed.
By publishing assembler listings, the Forth Interest Group was able to encapsulate a Forth run-time environment in a manner that could be easily replicated and/or translated to the assembly language of a different computer architecture. It was the intention of the original team of implementors to thus stimulate the development of compatible Forth systems and the appearance of new vendors of Forth products.
After the 6502 FIG Model was published, FIG implementors published compatible versions for the 8080 and 6800 microcomputers and the PDP-11 and Computer Automation minicomputers. Over the years, volunteers added other platforms and documentation. The 1982 Forth Encyclopedia by Mitch Derick and Linda Baker [Derick, 1982] provided an exhaustive 333-page manual on FIG Forth, with flow charts of most words. In 1983 an ad in Forth Dimensions, the FIG newsletter [FIG, 1983], listed: RCA 1802, 8080, PACE, 6502, 8086/88, 6800, 6809, 9900, Nova, Eclipse, VAX, Alpha Micro, Apple II, 68000, PDP11/LSI11 and Z80.
Today there are several thousand members of the Forth Interest Group
in over fifteen countries. Since 1980, FIG has sponsored an annual conference
called FORML (Forth Modification Laboratory), an educational forum for sharing
and discussing new or unproven proposals intended to benefit Forth, and
for discussion of technical aspects of Forth. Its proceedings are available
from the Forth Interest Group
.
Apple Computer grew out of the bubbling computer enthusiasm in the San Francisco Bay area, and with it a whole new generation of resource-constrained computers. Although BASIC was available in ROM, Forth was used to write a number of popular text editors and games on the Apple ][, allowing resident development of significant programs within its scarce memory and disk constraints. It is hard now, with ubiquitous megabytes of memory and disk, to imagine what it was like to develop significant programs on a 40-column wide screen within 16K of memory and 100K of disk storage.
Vendors of low cost Forth systems sprang up almost overnight, each supporting their favorite personal computer, most of them basing their systems on the FIG model. In 1979, for example, Miller Microcomputer Services announced MMSFORTH for the TRS-80 [TRS-80, 1979], and by 1980 Computerworld reported [Taylor, 1980] that MMS had over 100 user groups for its product.
When IBM entered the personal computer business with their original PC product offering, they chose to distribute a version of the popular Apple ][ text editor EasyWriter, written in Forth, as an IBM product. Laboratory Microsystems (LMI) introduced a commercial IBM PC Forth system in 1982. Numerous commercial and public domain Forth products followed, and significant software product development began.
Following its introduction of the first commercial Forth for the IBM-PC, LMI has maintained a continuing strategy of producing cutting-edge Forth systems for the PC, including a 32-bit real-mode implementation (February 1983), an OS/2-based Forth (February 1988) and a Windows version (1992). Along the way LMI's founder, Ray Duncan, became an acknowledged authority on Microsoft OSs [e.g. Duncan, 1988].
FORTH, Inc.'s PC offering was polyFORTH, which combined the multiuser support and data base tools of its minicomputer products with the ROMable architecture of microFORTH. By 1984 FORTH, Inc. was supporting up to 16 users on a PC with no visible degradation, running polyFORTH first as a native OS and later as a co-resident OS with MS-DOS. By the late 80's polyFORTH users such as NCR were supporting as many as 150 users on a single 80386-based PC.
In 1978, Maj. Seltzer gave Don Colburn a copy of the 6502 Forth he wrote for Ragsdale in exchange for Colburn's writing two articles on Selzer's 6502 work. Colburn subsequently used this as a basis for a version based on the preliminary FORTH-77 standard (the only FORTH-77 implementation of which the authors are aware). In the Fall of 1979, Colburn generated a FIG-compatible system for prototypes of the 68000. A multitasking, multiuser version of this product called MultiForth was demonstrated to Motorola in January, 1980, well ahead of production shipments of the 68000. When Hewlett Packard's desktop computer division designed a new generation of desktop computers around the 68000 in 1982, the first available third-party language product they distributed under an HP part number was MultiForth.
Colburn's company Creative Solutions also introduced MacForth, the first resident development system for the 128K Apple Macintosh, immediately after the Mac's debut in January of 1984. Because MacForth uniquely provided direct access to the entire Macintosh "Toolbox ROM" routines in a resident programming environment, along with comprehensive application examples, a majority of the first generation of Macintosh application programmers learned how to create and use pull-down menus, windows, graphics and mice with MacForth. Significant large-volume spreadsheets, 2D and 3D rendering and design packages, CAD/CAM design tools, games, medical diagnostics, image enhancement programs, accounting packages, desktop planetariums and process control applications were written on early Macintoshes in MacForth.
By 1985 there were over seventy vendors of Forth systems, ranging from single individuals to multi-million dollar organizations.
In 1982 Lawrence Forsley founded the Institute for Applied Forth Research,
now called simply the Forth Institute. This organization sponsors an annual
Conference on Forth Applications at the University of Rochester, Rochester
NY, and publishes the Journal of Forth Application and Research
,
a refereed technical periodical on applications of Forth, new developments and techniques, and surveys of specific
areas of Forth.
In 1989, George Shaw and others formed an ACM Special Interest Group on Forth called SIGForth, which also sponsors a newsletter and an annual conference.
System(s) |
Company |
Primary Products & Markets |
CFORTH83, |
Bradley Forthware |
Portable Forth written in C; versions for Atari, Macintosh, Sun; consulting and services related to the Sun Microsystems Open Boot. |
cmFORTH |
Silicon Composers |
Public-domain system for Novix Forth and others processor by C. Moore, ported to the Harris and SC-32 Forth processors by others |
Cyrano |
Opto-22 |
Forth for a proprietary embedded controller |
F-PC |
T. Zimmer et al. |
Extensive public-domain system for the IBM-PC family |
F83 |
Laxen and Perry |
Public-domain system for the IBM-PC family, later ported by others to other platforms |
HS/Forth |
Harvard Softworks |
IBM-PC family |
JForth |
Delta Research |
Amiga |
MacForth |
Creative Solutions, Inc. |
Apple Macintosh, NuBus interface boards |
Mach2 |
Palo Alto Shipping |
Apple Macintosh |
mmsFORTH |
Miller Microcomputer Services |
IBM-PC family; business and commercial applications |
MPEForth |
MicroProcessor Engineering (UK) |
PCs and embedded systems |
mvpFORTH |
Mountain View Press |
Public-domain system on a variety of platforms |
Open Boot |
Sun Microsystems |
Programmable ROM-based Forth on SPARC workstations |
polyFORTH |
FORTH, Inc. |
Industrial systems on PCs and other platforms; interactive cross-compilers; consulting and custom programming services |
UR/Forth |
Laboratory Microsystems, Inc. (LMI) |
IBM-PC family running DOS, OS2 and Windows; cross compilers for a variety of systems |
Table 3. Some major suppliers of Forth systems, services and related products. [note]
Byte Magazine dedicated its August, 1980 issue to Forth. It was their largest-selling issue to date, and was re-printed several times.
FIG Forth was optimized for portability rather than performance. Only a very few primitives were coded in assembler, and the rest of the logic was implemented using high-level Forth. As a result it was fairly slow -- some operations, such as dictionary searches, were a factor of ten slower than representative commercial implementations.
Other internal decisions were similarly made with the neophyte in mind. For example, the earlier FORTH, Inc. systems compiled word names as the length of the name and the first three characters. This gave a lower collision rate than simple truncation, and was adequate most of the time. But the FIG model used variable-length names up to 31 characters, thereby trading size for user-friendliness. This was somewhat controversial at the time (see Fig. 1), but by the mid 1980's, most systems had converted to this usage.
The advent of personal computers provided Forth implementors with the incentive to learn to run under a host OS. The first non-native systems were developed in 1980 by Martin Tracy of Micromotion (for the Apple ][) and Ray Duncan of Laboratory Microsystems, Inc. (for CP/M on Z80's). LMI's system also featured a full-screen editor. In 1981, LMI added support for software and hardware floating point, and also pioneered performance enhancements such as native code translation and caching dictionary lookups in a hash table to accelerate dictionary searches.
The advent of non-native Forth implementations introduced an issue that remains controversial in Forth practice today, the use of host OS files for mass storage. There are two main approaches: abandoning traditional blocks altogether in favor of directly manipulating source and data in files, and mapping blocks to host OS files. The former approach is favored by implementors who are concentrating on systems for a particular OS (e.g., MS-DOS), whereas the latter is preferred by organizations such as FORTH, Inc. that support both native and non-native products.
Creative Solutions' MacForth used very compact object image strategies, including token threading and separated name heads to maximize the amount of memory available for program development on the original 128K Macintoshes. Other novel features included runtime relocation of the executable image and exclusion of word names in runtime systems without metacompilation. MacForth included a seamless programming environment, incorporating screen based text editor, compiler, interpreter, and assembler in under 20k bytes of memory.
The FIG Model was in the public domain, and was ported to a wide variety of computer systems. Because the internal design of FIG Forth was essentially the same across all machines, programs written in FIG Forth enjoyed a substantial degree of portability, even for "system-level" programs that directly manipulated the internals of dictionary entries and other implementation-dependent features. Because FIG Forth was the first introduction to Forth for many people, it is widely associated with "the nature of Forth."
However, FIG Forth was not representative of all commercial implementations of this era. Commercial vendors tended to be much more performance-conscious, and elected implementation strategies that optimized performance or size rather than porting ease, as we have seen.
The first major effort to standardize Forth was a meeting in Utrecht in 1977, attended by several astronomical Forth users and FORTH, Inc. (at that time the only commercial vendor). They produced a preliminary standard called FORTH-77, and agreed to meet the following year. Meetings in 1978 and 1979 on Catalina Island in California, now including representatives from the Forth Interest Group and other producers, yielded a more comprehensive standard called FORTH-79. Although FORTH-79 was very influential, many Forth users and vendors found flaws in it; in 1982 two meetings were held to update the standard, and in 1983 a new standard was released called FORTH-83. Both FORTH-79 and FORTH-83 specified a 16-bit, twos-complement, unaligned, linear byte-addressed virtual machine, and included a number of assumptions about implementation techniques.
DEA- EDI---
I AM AFR--- THA- THE LET--- IN THE LAS- ISS-- ABO-- FOR-- INC-- USI-- ONL- THR-- LET--- NAM- FIE--- HAS HAD THE OPP----- EFF--- FRO- WHA- THE WRI--- WAN--. HIS LET--- ( LIK- THI- ONE ) SHO-- THA- SAV--- ONL- THR-- LET---- AND COU-- IS JUS- ABO-- OPT---- IN TER-- OF A TRA-- OFF BET---- SAV--- MEM--- AND KEE---- LEG----. WE STI-- DON- SEE THE NEE- FOR 31 CHA------ NAM-- IN THE GEN---- CAS-.
YOU-- TRU--
CHU-- MOO--
FOR-- INC-
Figure 1. "Letter to the Editor" of Forth Dimensions [Moore, 1983] concerning the practice of storing names of Forth words as a count and first three characters.
Unfortunately, some of the changes in FORTH-83 produced grave incompatibilities with existing code. For example, the formal representation of a "true" flag had always been 1, and the word NOT inverted a Boolean flag. In FORTH-83, "true" became -1 and NOT became a bit-wise complement. Other problems involved the specification for floored division in FORTH-83 and a serious ambiguity in the specification of parameters for certain loop structures. The effect of these incompatibilities was divisive. Although most implementors agreed that FORTH-83 was an improvement and adopted the new standard, there remains a vocal group who never converted, and who remain skeptical of the whole standards process. Of the systems listed in Table 3, for example, most are fairly close to FORTH-83 compatibility; notable exceptions are MacForth, mmsFORTH and mvpFORTH, all of which stayed with FORTH-79.
In 1981 Prentice Hall published Starting FORTH, by Leo Brodie [Brodie, 1981], then an employee of FORTH, Inc. Both lucid and entertaining (Brodie drew memorable cartoon figures representing important Forth primitives), Starting FORTH was also a thorough introduction to the language. It sold over 110,000 copies (for a time it was the best-seller in Prentice Hall's computer line) and exerted a powerful influence on many people learning about Forth for the first time, as well as on vendors scrambling to be compatible with it. Although the first edition was primarily based on FORTH, Inc.'s polyFORTH, it included many footnotes and examples in FIG Forth and other dialects. The second edition (1987) was based on the FORTH-83 standard.
Another major influence in the personal computer marketplace has been the competition between public-domain and commercial versions of Forth. In the mid-1980's, the FIG model was gradually replaced by the public domain F83 (produced by Henry Laxen, Mike Perry and others operating under the name "No Visible Support Software"), a multitasking system originally released on the IBM-PC. Versions have been developed by many independent programmers on a wide variety of other platforms. This system is so widespread that many people are led by its name to confuse it with the FORTH-83 standard. In fact, although it is largely compatible with FORTH-83, F83 goes well beyond the limited FORTH-83 standard in its features. In the late 80's, Tom Zimmer and others produced an even more extensive public-domain system for PCs called F-PC, which includes several megabytes of source code and utilities. But except for these, most public-domain Forths are rather limited.
Public-domain Forths have certainly helped to ensure that Forth is widely known. But their influence isn't entirely benign. According to Tyler Sperry, editor of Embedded Systems Programming Magazine [Sperry, 1991]:
The problem is that it is relatively easy to implement your own minimal Forth system. The kernel, after all, is only a few hundred bytes of code…. Unfortunately, bringing up a Forth interpreter is like writing a Small C compiler: it's only a toy without a well-developed library. One of the biggest problems with public-domain and shareware systems is that their libraries are often only partially completed, with sketchy documentation. And that's putting the situation kindly.
People who have only seen or used limited public-domain Forth implementations often perceive that Forth itself is a toy. And suppliers of high-quality commercial systems must deal with prospective customers' assumptions that all Forths are the same, an assumption that naturally creates considerable price resistance given that the public-domain versions are extremely inexpensive. The standing joke within the Forth community, however, is that "when you've seen one Forth … you've seen one Forth." The range in quality of code and documentation, nature and extent of libraries, as well as product support, is enormous. A prospective user is well advised to evaluate a number of both public domain and commercial offerings.
Forth's ability to make maximum use of limited hardware resources made it a natural choice for embedded uses of microprocessors. Some of these have been small: an RCA 1802-based cardiac monitor (1979) that performed a detailed waveform analysis of heart beats was not much larger than the 1" x 2" tape cassette it used to record abnormalities. Some were large, such as the 750-ton stretch press used by Lockheed to form panels for the C5B airplane wings in the early 80's. Some were distributed, such as the roughly 500 networked processors used for an extensive facility management system at the King Khaled International Airport at Ryadh, Saudi Arabia [Rather, 1985]. Forth has been especially successful in developing firmware for hand-held devices made by companies such as Itron and MSI Data. In 1990, Federal Express won the prestigious Malcolm Baldridge quality award for its package-tracking system, whose data entry is performed by Forth-based hand-held devices carried by Federal's 50,000 couriers and agents world-wide.
Forth's extreme modularity facilitates thorough, systematic testing, which has made it attractive for applications requiring high reliability. As a result, it has been used in a number of satellites and Space Shuttle experiments. McDonnell Douglas used polyFORTH in their Electrophoresis in Space project [Wood, 1986] to control the cargo bay factory itself (multiple 68000 VME-bus boards), the astronaut's control console (a laptop PC), and their ground-based analysis computer (a Compaq PC). The November, 1990 Columbia shuttle flight carried four astronomy payloads, of which three were programmed in Forth [Ballard_1991], and the January, 1992, Spacelab flight featured a Microgravity Vestibular Investigation (MVI) experiment using a polyFORTH system for on-board control and analysis [Paloski, 1986] and MACH2 in a ground-based Macintosh for analysis. [note]
Probably the most prolific single purveyor of embedded Forths is Sun Microsystems, whose SPARC workstations all use a programmable Forth-based monitor called Open Boot, developed by Mitch Bradley and associates. Bradley believes [Bradley, 1991] that Forth was successful for this purpose because it offered:
At least one other major board-level CPU vendor has adopted Open Boot firmware across their product line, and there is a working group developing an IEEE standard for it.
From the minis of the '70s to the PCs of the '80s, most Forth systems have supported development on the same computer on which the completed application is to run. Even the microprocessor systems of the late '70s and early '80s were developed on the same CPU (as opposed to cross-development), with development software features for stripping the development tools and producing a ROMable target.
Most embedded systems lack a disk, a terminal, or both, thereby rendering themselves inhospitable to even the leanest Forth programming environment. Nonetheless, some vendors do provide on-board Forths in microcontrollers. Examples include the Rockwell AIM 65 mentioned above, and microcontroller boards sold by New Micros, Inc. of Texas; Vesta Technologies, Inc., in Colorado; and Opto-22 in California.
But as PCs became ubiquitous, they also became popular as hosts for more comfortable and powerful Forth cross-development environments. These have generally been based on modified versions of the classical Forth metacompilers, adapted to support cross development.
The traditional Forth dictionary is integrated: a "definition" includes the word's name (which can be found in a dictionary search performed by the text interpreter), an executable portion (typically a pointer to code which executes words of a particular class, such as colon definitions, variables, constants, etc.), and data space (containing one or more values or addresses of words that make up the content of the definition), all classically in contiguous memory locations (but see Section 5.2, Implementation Strategies). A metacompiler divides these structurally into portions that are used by the host system's compiler (equivalent to a symbol table) and portions required at run-time in the target. In order for a target program to be ROMable, the compiler must also manage separate ROM and RAM data spaces, usually using multiple sets of dictionary pointers.