Forth is a stack-oriented programming language and interactive integrated development environment designed by Charles H. "Chuck" Moore and first used by other programmers in 1970. Although not an acronym, the language's name in its early years was often spelled in all capital letters as FORTH. The FORTH-79 and FORTH-83 implementations, which were not written by Moore, became de facto standards, and an official technical standard of the language was published in 1994 as ANS Forth. A wide range of Forth derivatives existed before and after ANS Forth. The free and open-source software Gforth implementation is actively maintained, as are several commercially supported systems. Forth typically combines a compiler with an integrated command shell, where the user interacts via subroutines called words. Words can be defined, tested, redefined, and debugged without recompiling or restarting the whole program. All syntactic elements, including variables, operators, and control flow, are defined as words. A stack is used to pass parameters between words, leading to a reverse Polish notation style. For much of Forth's existence, the standard technique was to compile to threaded code, which can be interpreted faster than bytecode. One of the early benefits of Forth was size: an entire development environment—including compiler, editor, and user programs—could fit in memory on an 8-bit or similarly limited system. No longer constrained by space, there are modern implementations that generate optimized machine code like other language compilers. The relative simplicity of creating a basic Forth system has led to many personal and proprietary variants, such as the custom Forth used to implement the bestselling 1986 video game Starflight from Electronic Arts. Forth is used in the Open Firmware boot loader, in spaceflight applications such as the Philae spacecraft, and in other embedded systems which involve interaction with hardware. Beginning in the early 1980s, Moore developed a series of microprocessors for executing compiled Forth-like code directly and experimented with smaller languages based on Forth concepts, including cmForth and colorForth. Most of these languages were created to support Moore's own projects, such as chip design.
Uses Forth has a niche in astronomical and space applications as well as a history in embedded systems. The Open Firmware boot ROMs used by Apple, IBM, Sun, and OLPC XO-1 contain a Forth environment. Forth has often been used to bring up new hardware. Forth was the first resident software on the new Intel 8086 chip in 1978, and MacFORTH was the first resident development system for the Macintosh 128K in 1984. Circa 1982, Atari, Inc. used an elaborate, self-running demo written in Forth to showcase capabilities of the Atari 8-bit computers in department stores. Electronic Arts published multiple video games in the 1980s that were written in Forth, including Worms? (1983), Adventure Construction Set (1984), Amnesia (1986), Starflight (1986), and Lords of Conquest (1986). Robot coding game ChipWits (1984) was developed in MacFORTH for the Macintosh 128K, while the Commodore 64 port was written with SuperForth 64. The prototype of Boulder Dash (1984) was implemented in Forth before being rewritten in 6502 assembly language. Ashton-Tate's RapidFile (1986), a flat-file database program, and VP-Planner from Paperback Software International (1983), a spreadsheet program competing with Lotus 1-2-3, were written in Forth. The Canon Cat (1987) uses Forth for its system programming. Rockwell produced single-chip microcomputers with resident Forth kernels: the R65F11 and R65F12. ASYST was a Forth expansion for measuring and controlling on PCs.
History Forth evolved from Charles H. Moore's personal programming system, which had been in continuous development since 1968. Forth was first exposed to other programmers in the early 1970s, starting with Elizabeth Rather at the United States National Radio Astronomy Observatory (NRAO). After their work at NRAO, Charles Moore and Elizabeth Rather formed FORTH, Inc. in 1973, refining and porting Forth systems to dozens of other platforms in the next decade. Moore saw Forth as a successor to compile-link-go third-generation programming languages, or software for "fourth generation" hardware. He recalls how the name was coined:
At Mohasco ["in the late 1960s"] I also worked directly on an IBM 1130 interfaced with an IBM 2250 graphics display. The 1130 was a very important computer: it had the first cartridge disk, as well as a card reader, a card punch (as backup for the disk), and a console typewriter. The 1130 let the programmer, for the first time, totally control the computer interactively. FORTH first appeared as an entity on that 1130. It was called F-O-R-T-H, a five-letter abbreviation of FOURTH, standing for fourth-generation computer language. That was the day, you may remember, of third-generation computers and I was going to leapfrog. But because FORTH ran on the 1130 (which permitted only five-character identifiers), the name was shortened. FORTH, Inc.'s microFORTH was developed for the Intel 8080, Motorola 6800, Zilog Z80, and RCA 1802 microprocessors, starting in 1976. MicroFORTH was later used by hobbyists to generate Forth systems for other architectures, such as the 6502 in 1978. The Forth Interest Group was formed in 1978. It promoted and distributed its own version of the language, FIG-Forth, for most makes of home computer. Forth was popular in the early 1980s, because it was well suited to the limited memory of microcomputers. The ease of implementing the language led to many implementations. The Jupiter ACE home computer has Forth in its ROM-resident operating system. Insoft GraFORTH is a version of Forth with graphics extensions for the Apple II. Common practice was codified in the de facto standards FORTH-79 and FORTH-83 in the years 1979 and 1983, respectively. These standards were unified by ANSI in 1994, commonly referred to as ANS Forth. As of 2018, the source for the original 1130 version of FORTH has been recovered, and is now being updated to run on a restored or emulated 1130 system.
Overview
… excerpt ends here. Continue reading the full article.



