Files
WAFER/docs/FORTH-IN-SPACE.md
ok2 13a16ae2a4 Update docs: performance results, new optimizations, test counts
- README: add performance section (beats gforth 2-10x), update test
  commands, note self-recursive direct calls and loop promotion
- CLAUDE.md: update test counts (427 unit + comparison tests)
- OPTIMIZATIONS.md: stack-to-local Phase 1→Phase 2 (loops + IF),
  DO/LOOP locals done, J as IR done, add section 14 (self-recursive
  direct call), add current performance table vs gforth
- WAFER.md: document self-recursive call optimization, CONSOLIDATE,
  update test commands and line counts
- FORTH.md: expanded space history, add FORTH-IN-SPACE.md reference
- FORTH-IN-SPACE.md: new document with verified spacecraft history
2026-04-09 20:00:55 +02:00

11 KiB

Forth in Space

Forth's properties -- tiny footprint, deterministic execution, interactive testing on live hardware, no operating system required -- read like a specification sheet for spacecraft software. When your computer has kilobytes of memory, your budget for cosmic ray errors is zero, and the nearest debugger is hundreds of millions of kilometers away, you want a language where you can see every instruction and test every word before committing it to flight.

This is a verified list of Forth's presence in space, drawn from the NASA Goddard Space Flight Center compilation, Johns Hopkins University Applied Physics Laboratory mission documentation, and cross-referenced public sources. Claims that cannot be traced to authoritative sources (such as the persistent but debunked claim that Voyager runs Forth) are excluded.

Before Forth: Apollo and the Verb-Noun Paradigm

The Apollo Guidance Computer (AGC) was not programmed in Forth -- it used its own assembly language, and Forth did not exist yet. But its human interface deserves mention as a philosophical ancestor.

The AGC's DSKY (Display and Keyboard) unit presented astronauts with a numeric vocabulary: two-digit verb codes for actions, two-digit noun codes for data. VERB 37 NOUN 01 meant "change to program 01." VERB 06 NOUN 62 displayed spacecraft attitude. There were roughly 100 verb-noun combinations. Astronauts memorized them, composed them interactively, and got immediate feedback on a seven-segment display -- all while traveling to the Moon on a computer with 74 kilobytes of memory.

The parallel to Forth is structural, not genealogical. Both systems give the operator a small vocabulary of composable commands, entered interactively, with immediate execution and visible results. Both trust the human to know the vocabulary. Both reject the idea that the user needs to be protected from the machine by layers of abstraction. Charles Moore started building Forth in 1968, the same year astronauts were training on DSKY procedures for Apollo 8. The two systems emerged from the same engineering instinct: when the stakes are high, give skilled people direct control.

The RTX2010: A Processor That Speaks Forth

Most of the missions below share a single piece of hardware: the Harris RTX2010, a radiation-hardened 16-bit stack processor. Understanding this chip explains why Forth dominated space instrument control for two decades.

The RTX2010 is built on silicon-on-sapphire (SOS) -- a thin layer of silicon grown on an insulating sapphire substrate. Because sapphire is an insulator, ionizing radiation cannot create the parasitic currents that corrupt conventional silicon chips. This makes the processor inherently radiation-resistant without the performance penalties of other hardening techniques.

More importantly, the RTX2010 is a native Forth processor. Its instruction set maps directly to Forth primitives. It has two hardware stacks -- a 256-word data stack and a 256-word return stack -- built into the chip. Subroutine calls and returns execute in a single clock cycle. Interrupt latency is four cycles, consistent and predictable. At 8 MHz, it draws milliwatts.

The original architecture was designed by Chuck Moore, the inventor of Forth, as the Novix NC4000 in the mid-1980s. Harris Semiconductor licensed and radiation-hardened it as the RTX2000, then the RTX2010. The Johns Hopkins University Applied Physics Laboratory (APL) standardized on it for spacecraft instrument controllers, and it became the de facto Forth-in-space platform.

On this chip, there is no compiler between the programmer and the hardware. Forth words are the machine instructions. Every word can be tested interactively on the flight hardware before launch. There is no operating system to fail, no runtime to consume resources, no hidden behavior. What you write is what the silicon executes.

Verified Missions

The Early Pioneers

MAGSAT (1979) -- NASA, built by APL. The Magnetic Field Satellite carried an attitude control system programmed in Forth on an RCA CDP1802 COSMAC processor. This is among the earliest documented uses of Forth in space. The 1802 was itself a radiation-hardened chip (silicon-on-sapphire, like the later RTX2010), and its simple architecture made it a natural target for Forth implementations.

AMSAT OSCAR 10, 13, and 21 (1983--1996) -- Built by volunteer radio amateurs in the AMSAT organization, these Phase III amateur radio satellites carried flight software written in Forth. OSCAR 10 launched in 1983 on an Ariane rocket, OSCAR 13 in 1988, and OSCAR 21 in 1991. These were high-orbit satellites (Molniya-type orbits reaching 35,000+ km altitude) providing intercontinental amateur radio communication, and Forth was chosen for the same reasons as professional missions: tiny footprint, interactive debugging, and full control of the hardware.

Freja (1992) -- Swedish Space Corporation. This Swedish magnetospheric research satellite carried a magnetometer experiment controlled by Forth running on an SC32 processor. Freja studied the aurora borealis and plasma processes in the upper ionosphere from a polar orbit.

The APL/RTX2010 Era

The mid-1990s through early 2000s saw an extraordinary concentration of Forth-powered instruments, nearly all built by the Johns Hopkins University Applied Physics Laboratory on RTX2010 processors.

NEAR Shoemaker (1996) -- NASA, built by APL. The Near Earth Asteroid Rendezvous mission was the first spacecraft to orbit and land on an asteroid. Four of its science instruments ran Forth on RTX2010 processors: the X-Ray/Gamma-Ray Spectrometer (9,545 lines of Forth), the Multispectral Imager (5,926 lines), the Near-Infrared Spectrometer/Magnetometer (3,019 lines), and the NEAR Laser Rangefinder (2,946 lines). These instruments mapped the composition and topography of asteroid 433 Eros in detail before the spacecraft soft-landed on its surface on February 12, 2001 -- a maneuver the spacecraft was never designed to perform, executed by Forth code running on 8 MHz processors 316 million kilometers from Earth.

Cassini MIMI (1997) -- NASA/ESA joint mission, instrument built by APL. The Magnetospheric Imaging Instrument (MIMI) on the Cassini orbiter ran its CPU and Event Processing Unit on RTX2010 processors programmed in Forth. MIMI studied Saturn's magnetosphere for 13 years, from Cassini's arrival in 2004 until its planned destruction in Saturn's atmosphere in September 2017. During that time, the Forth code on those 8 MHz processors operated flawlessly through radiation environments far more intense than Earth orbit.

ACE (1997) -- NASA. The Advanced Composition Explorer, stationed at the L1 Lagrange point 1.5 million kilometers sunward of Earth, carries a star scanner built by Ball Aerospace on an RTX2000 with Forth, and the Ultra Low Energy Isotope Spectrometer (ULEIS) built by APL on an RTX2010. ACE monitors the solar wind and is the primary early-warning system for solar storms heading toward Earth. As of 2026, it is still operating -- nearly three decades of continuous Forth execution in deep space.

Chandra X-ray Observatory (1999) -- NASA. The Chandra X-ray telescope, one of NASA's four Great Observatories, uses science instrument control software and mechanism controllers built by Ball Aerospace on RTX2000/2010 processors. These systems manage the precise positioning of Chandra's X-ray detectors and gratings.

IMAGE (2000) -- NASA, instruments by Baja Technology and APL. The Imager for Magnetopause-to-Aurora Global Exploration was the first spacecraft to image Earth's magnetosphere globally. Its Extreme Ultraviolet (EUV) imager and High-Energy Neutral Atom (HENA) imager both ran on RTX2010 processors programmed in Forth.

TIMED GUVI (2001) -- NASA, built by APL. The Global Ultraviolet Imager (GUVI) on the TIMED satellite runs on an RTX2010, scanning the Earth's thermosphere and ionosphere in five ultraviolet wavelength bands. TIMED launched from Vandenberg Air Force Base in December 2001.

Comets, Shuttles, and Weather Satellites

Rosetta and Philae (2004/2014) -- ESA. The most famous Forth-in-space story. Philae's central command and data management system ran Forth-83 on two 8 MHz RTX2010 processors. On November 12, 2014, Philae separated from the Rosetta orbiter and descended to the surface of comet 67P/Churyumov-Gerasimenko, 511 million kilometers from Earth -- the first controlled landing on a comet. But Forth was present on Rosetta as well: the orbiter's Ion and Electron Sensor (IES) instrument ran on an RTX2010 with Forth, built by Baja Technology.

Deep Impact (2005) -- NASA. The spacecraft that deliberately collided an impactor with Comet Tempel 1 to study its interior composition used an RTX2010 running Forth for its Attitude and Orbit Control (AOC) system controller, built by Baja Technology.

SSUSI on DMSP (5 missions, 15+ years) -- U.S. Department of Defense, built by APL. The Special Sensor Ultraviolet Spectrographic Imager (SSUSI) flew on five Defense Meteorological Satellite Program Block 5D-3 weather satellites, running on Harris RTX2000 processors with Forth. Each satellite orbited at 850 km altitude in sun-synchronous polar orbits, measuring ultraviolet emissions from the upper atmosphere to monitor space weather and auroral activity.

SSBUV on Space Shuttle (8 flights, 1989--1996) -- NASA Goddard Space Flight Center. The Shuttle Solar Backscatter Ultraviolet instrument flew eight successful missions in the Shuttle payload bay, calibrating ozone-monitoring satellites. Its controller ran chipFORTH on a custom hardware platform, interfacing the instrument to the Shuttle's avionics systems through the Small Payload Accommodations Interface Module (SPAIM).

Additional Missions

The NASA Goddard Space Flight Center compilation lists further missions with less detailed documentation, including: Shuttle Imaging Radar SIR-B (1984), Hopkins Ultraviolet Telescope on Astro-1 (1990), TOPEX/Poseidon (1992), Midcourse Space Experiment MSX (1996), X-ray Timing Explorer XTE (1995), Submillimeter Wave Astronomy Satellite SWAS (1998), SAGE III (2001 and 2017), and several ground support systems for Globalstar, Iridium, and ORBCOMM satellite constellations.

A Note on Myths

The claim that NASA's Voyager spacecraft run Forth appears frequently online but is not supported by primary sources. NASA's official Voyager FAQ states that the onboard computers (CCS, AACS, and FDS) are programmed in their respective assembly languages, with ground software written in Fortran. Similar unverified claims circulate about the Mars rovers and other missions. This list includes only missions traceable to the NASA GSFC compilation, APL documentation, or equivalent authoritative sources.

Sources