The PDP-1 software environment
The PDP-1 had no operating system. There was no file system, no command line, no resident supervisor deciding what ran when. When you sat down at the machine you were the operating system: you loaded a program from paper tape, set the console switches, pressed start, and the machine did that one thing until it stopped. Everything we now take for granted, the editor, the assembler, the debugger, even the idea of more than one user, had to be written as ordinary programs and loaded the same way. This page is about that environment, the thin, hand-built software world in which Spacewar! was written, and about how much of modern computing first appears here in miniature.
How software lived
Programs lived on rolls of fanfold punched paper tape, read in through a photoelectric reader and punched back out the same way. A single tape was at once the distribution medium, the backup and the archive, which is why so much early-software history is a history of tapes being copied, carried, lost and occasionally rediscovered. Text and listings were prepared offline on Friden Flexowriters using DEC's FIO-DEC character code, and the operator's console offered a bank of sense switches and an adapted IBM electric typewriter for printed output. To run anything was a physical act: thread the tape, toggle the switches, press start.
Because nothing managed memory or scheduling for you, a program owned the whole machine while it ran. That is the deep reason Spacewar! takes the shape it does: with the entire PDP-1 to itself and nothing to interrupt it, the game could run a tight, uninterrupted real-time loop, computing and redrawing the whole screen on every pass. The absence of an operating system is part of the design of the game.
Writing programs for a machine with nothing on it
Everything needed to write software had itself to be written. The assembler that turned mnemonics and octal into machine words was MACRO, carried over from the earlier TX-0 and extended with the define facility the Spacewar! authors used to build their own higher-level operations. Ed Fredkin, at BBN, wrote an alternative assembler, FRAP ("Free of Rules Assembler Program"), squeezed into 1,024 words; MIDAS, often miscredited as the assembler of the game, is a later development built in this same line.
To edit text there was the Expensive Typewriter, written around 1961–62 by Steve Piner (one of the Spacewar! circle), one of the earliest programs to treat a computer as a word processor, and later TECO, the Tape Editor and Corrector by Dan Murphy, whose macro language would echo down the decades into Emacs. To find out why a program did not work there was DDT, an interactive debugger descended from the TX-0's FLIT, which let a programmer stop a running program, inspect and patch memory, and continue, in real time, at the console. An interactive debugger in 1962 is a remarkable thing: it assumes the machine is yours to converse with, not a batch service you submit jobs to.
The TMRC hackers called their programs the Expensive series as a running joke about using a six-figure computer for the work of cheaper machines: the Expensive Typewriter, the Expensive Desk Calculator, and Samson's Expensive Planetarium, the accurate star map that became the background of Spacewar!.
Making the single-user machine shared
If the PDP-1 ran one program at a time, how could it ever be shared? The answer, worked out partly on this very class of machine, was time-sharing. John McCarthy's idea was to let many users appear to use the computer at once by switching rapidly between them; the obstacle was that swapping a user in and out of expensive core memory was slow. Ed Fredkin solved it with a zero-latency swapping drum, synchronised to the memory cycle so a user could be swapped out and the next swapped in within about twenty milliseconds. Built into the BBN and MIT PDP-1 systems, it produced one of the earliest working time-sharing systems, the seed of an idea that would define computing for the next two decades. The full story is on the PDP-1 page.
The hacker ethic in embryo
For a Critical Code Studies reading, the software environment is where the culture becomes visible. A machine with no operating system, programmed hands-on from the console with tools the users built for themselves, is the material condition of the hacker ethic: direct access, total control, tools made and shared freely, the computer treated as an instrument rather than a service. Spacewar! was not an exception to this environment but its natural product. To read the game's code is also to read the world of paper tape, octal and the console that made it possible.
Kline, Dyer-Witheford and de Peuter note that much of the time programmers spent developing their craft went into what we would ordinarily call play, a "divergent thinking" that substitutes quick intuition for the slow grind of trial and error and, in doing so, drives radical innovation. Spacewar! is the exemplary product of that play ethic: a serious feat of engineering undertaken, in the first instance, for fun.
References
- Steven Levy, Hackers: Heroes of the Computer Revolution (1984), for the Expensive series, DDT, the TMRC milieu and the hacker ethic.
- Computer History Museum, Oral History of Ed Fredkin (2006), for FRAP and the swapping-drum time-sharing system; and the PDP-1 machine page here.
- On the editors: the Expensive Typewriter (Steve Piner) and TECO (Dan Murphy).
- Norbert Landsteiner, Inside Spacewar!, masswerk.at, on MACRO and the assembler lineage.
- Stephen Kline, Nick Dyer-Witheford and Greig de Peuter, Digital Play: The Interaction of Technology, Culture, and Marketing (McGill-Queen's University Press, 2005), on the play ethic and divergent thinking in programmer subculture.