PDP-8/I · Volume 9

PDP-8/I — Volume 9 — The Software World: FOCAL, OS/8, BASIC, DECUS

How a bare twelve-bit machine grew an assembler, a conversational language that fit in 4K, a real file system, time-sharing for a roomful of Teletypes, and a freewheeling tape-swapping culture that prefigured open source.

About This Volume

The eight volumes before this one have, between them, built a machine. We have looked at the twelve-bit word, the single accumulator, the eight opcodes, the core memory that holds a program through the night, the front panel where a person and a bare processor first meet, and — in Volumes 7 and 8 — the paper tape, the clattering Teletype, and the bootstrap loaders by which the machine first reached out and pulled a program into itself. At the close of Volume 8 the PDP-8/I could move a character, move a block, and field an interrupt. What it could not yet do was anything useful without a human first deciding, instruction by instruction, what it should do.

This volume is about the other half of the computer: the software world that grew up around the 8/I and turned a frugal pile of flip-chips into a language laboratory, a teaching machine, a multi-user time-sharing host, and the centre of one of the first great software-sharing communities. It is a story that runs from the most primitive base layer — a symbolic assembler punched onto paper tape — up through an interactive language that fit, interpreter and all, into four thousand words of core; through DEC’s packaged offerings that put the machine into thousands of classrooms; through a genuine operating system with a file system and a command line; and finally to the remarkable feat of giving a roomful of students each their own virtual PDP-8, all sharing one real machine, and to the user group whose tape library let all of this circulate freely from site to site.

We begin where every PDP-8 programmer of the era began: with the patient, paper-tape ritual of writing, assembling, and loading a program by hand. Everything else in this volume was built on that base, and most of it was distributed on the same fan-folded tape. By the end you will see why the 8/I’s software, even more than its hardware, is what made it the machine that taught a generation to program.

PAL and the paper-tape toolchain

A PDP-8 program, at the bottom, is nothing but a sequence of twelve-bit numbers in core. Volume 7 showed the most literal way to put them there: stand at the front panel and toggle each word in by hand, switch by switch. That works for a twenty-word bootstrap and is intolerable for anything larger. The whole edifice of PDP-8 software rests on a single, liberating idea — that a programmer should write in symbols (TAD, JMS, a label like LOOP, a constant called COUNT) and let another program translate those symbols into the octal the machine actually runs. That translator is an assembler, and on the PDP-8 the assembler was PALProgram Assembly Language.

PAL is the language you have already been reading. Every TAD, DCA, ISZ, JMS, and JMP in the earlier volumes, every KSF/JMP .-1/KRB busy-wait loop, is PAL source: mnemonic opcodes, symbolic addresses, octal and decimal constants, the / that begins a comment, the * that sets the assembly origin, the , that defines a label, and the pseudo-operators that reserve data or end the program. The baseline version through most of the 8/I era was PAL III, the third iteration of the language, and for roughly the machine’s first decade it was the assembler a customer got, because the interactive PDP-8 shipped with a Teletype Model 33 ASR and its built-in paper-tape reader and punch and not much else. A richer relative, MACRO-8, extended PAL III with true macros and other conveniences (many of which were later folded back into the PAL family), and under the disk operating system a descendant called PAL8 became the standard. But the dialect, and the workflow, were continuous.

That workflow — the edit–assemble–load cycle — is the daily reality this volume must be honest about, because it shaped how all PDP-8 software felt to make. With nothing but a Teletype and paper tape, the loop went like this. First you edited: you typed your source program, and to do it you ran a text editor — DEC’s Symbolic Editor (the paper-tape “Editor,” and its relatives like EDIT-8) — a program that let you type lines of PAL source, correct them, and punch the finished text out as a source tape, a long ribbon of ASCII characters. Then you assembled: you loaded the PAL III assembler itself (its own paper tape, read in through the bootstrap), then fed your source tape through the reader. PAL III was a two-pass assembler, so on a bare machine you fed the source tape through twice — pass one to build the symbol table (working out the address of every label), pass two to actually generate code — and out of the punch came a binary tape, the assembled object program in the BIN loader’s format. Finally you loaded and ran: you used the RIM loader to read in the Binary Loader, used the Binary Loader (Volume 7) to read your binary tape into core, set the starting address on the panel, and pressed START.

If your program had a bug — and it always had a bug — you went back to the top. Re-edit the source, re-punch the source tape, re-assemble (two passes), re-punch the binary, re-load, re-run. Each pass through the Teletype’s ten-character-a-second reader took minutes for a program of any size; an afternoon’s debugging was measured in coffee breaks, which is exactly why the labs that did serious work bought the high-speed photoelectric reader of Volume 8 and cut the wait thirty-fold. This is the unglamorous foundation on which everything else in this volume sits. The Symbolic Editor and the PAL assembler were the base layer — the tools used to write the tools — and nearly every other piece of PDP-8 software, from FOCAL to the operating system itself, was written in PAL, assembled this way, and distributed as a paper tape that the recipient loaded with the same Binary Loader they used for their own work. The distinction between a hand-toggled program and a symbolic one is the distinction between the machine as a curiosity and the machine as a tool: symbols, an assembler, and a loader are what let a program grow past what a human can hold in their head and key in by hand.

The hardware the software world ran on: a family of DEC PDP-8 machines beside a Teletype Model 33 ASR at the Computer History Museum. The ASR's keyboard, printer, and paper-tape reader/punch were t…
The hardware the software world ran on: a family of DEC PDP-8 machines beside a Teletype Model 33 ASR at the Computer History Museum. The ASR's keyboard, printer, and paper-tape reader/punch were the console at which a programmer edited PAL source, watched FOCAL print its answers, and loaded software shared on fan-folded tape. For most PDP-8 sites this one slow, clattering terminal was the entire interface to the machine's software. — "DEC PDP-8 family ... and Teletype ASR-33 ... Computer History Museum" by Carlo Nardone from Roma, Italy. License: CC BY-SA 2.0 (https://creativecommons.org/licenses/by-sa/2.0/). Via Wikimedia Commons (https://commons.wikimedia.org/w/index.php?curid=66960383).

FOCAL — DEC’s conversational calculator

The assembler made the machine programmable; FOCAL made it approachable. Written at DEC in 1968 by Richard “Rick” Merrill, FOCAL was an interactive, interpreted, conversational mathematics language — you typed a line, the machine answered, you typed another — and it became, more than any other piece of software, the language people associated with the PDP-8. The name was officially glossed “Formulating On-line Calculations in Algebraic Language,” but Merrill’s own preferred reading was the one everybody remembered: FOrmula CALculator. That is precisely what it felt like: a calculator you could talk to in algebra.

FOCAL’s lineage ran back to JOSS, the pioneering conversational language from the RAND Corporation, and Merrill’s achievement was to capture JOSS’s friendly, immediate spirit and squeeze it into a 4K PDP-8. This is the fact that mattered most. The interpreter was written in extraordinarily tight PAL assembly, occupying only about 3K of twelve-bit words, which left a (genuinely cramped) 1K for the user’s program and variables. The consequence was enormous: FOCAL ran on the cheapest PDP-8 you could buy, a bare 4K machine with nothing but a Teletype — no disk, no DECtape, no extra memory. A high-school or a small lab that could afford only the minimum configuration could nonetheless sit down and compute interactively, in something close to ordinary mathematical notation, the moment they loaded the FOCAL paper tape. An interpreter that fit on the bare machine democratized the PDP-8 in a way no assembler ever could.

FOCAL’s syntax was built for the same economy. Programs were lines numbered in a group.step scheme (line 2.30 is group 2, step 30), and every command could be abbreviated to a single letter — T for TYPE (output), A for ASK (input), S for SET (assignment), F for FOR (loops), I for IF (conditionals), D for DO (call a group of lines as a subroutine), G for GOTO, plus QUIT, RETURN, and C for comments. It had floating-point arithmetic and a useful kit of built-in functions — FSQT (square root), FABS, FSIN, FCOS, FEXP, FLOG, FATN, FITR, and even FRAN for random numbers — and a compact output-formatting notation (%8.02 meaning a field eight wide with two decimals). A short FOCAL-69 session gives the flavour:

01.10 C   COMPOUND INTEREST — FOCAL-69
01.20 ASK "PRINCIPAL", P, "RATE PERCENT", R, "YEARS", N
01.30 SET I = R/100
01.40 FOR Y = 1,1,N; DO 2.0
01.50 QUIT

02.10 SET P = P + P*I
02.20 TYPE %8.02, "YEAR", %3, Y, "   BALANCE", %8.02, P, !

A user would type GO, FOCAL would print PRINCIPAL: and wait, the user would type a number, and so on down the ASK line; then the FOR loop would DO group 2 once per year, each pass compounding the balance and TYPE-ing a formatted line (the trailing ! is a carriage-return/line-feed). It reads almost like the problem statement — which was the whole point.

The release that everyone actually used was FOCAL-69, the 1969 revision, and through the early 1970s it spread with the machine: ported across the twelve-bit family (the PDP-5, the PDP-12), embedded in countless lab and classroom programs, the natural first language for anyone meeting a PDP-8. There was, famously, a friendly rivalry with BASIC. By most technical measures FOCAL was BASIC’s equal and in some respects its better — more compact, with cleaner conditionals and subroutine handling. But it carried one fatal commercial handicap, captured by the computing popularizer David Ahl: DEC, as Ahl put it, “was unwilling to license” FOCAL to other manufacturers, whereas BASIC was available everywhere and ran on everyone’s machines. FOCAL was a brilliant language chained to a single vendor; BASIC was a portable idea. In the long run portability won, and even DEC came to push BASIC hard for the educational market — which is the next part of the story. But on a 4K PDP-8 in 1970, FOCAL was the friendliest face computing had yet shown to a beginner, and a generation of PDP-8 owners loved it.

BASIC and EduSystem — the teaching machine

If FOCAL was the language the PDP-8 community adopted, BASIC was the language DEC marketed, and it marketed it straight at the schools. BASIC had been born at Dartmouth in 1964 expressly to teach beginners, and its mission — make the computer usable by people who were not, and did not wish to become, professional programmers — was exactly the mission DEC saw for the small, affordable PDP-8 in education. DEC’s PDP-8 implementation, BASIC-8, was modelled on Dartmouth BASIC (trimmed to fit the 12-bit machine: BASIC-8 left out matrix operations, strings, the ON…GOTO, TAB, and some other niceties, and a single program was capped at a few hundred lines, with “chaining” provided for longer work). But the language was almost beside the point. What DEC actually sold the schools was a package.

That package line was EduSystem. Rather than ask a school to understand assemblers, loaders, monitors, and language tapes, DEC bundled a particular PDP-8 hardware configuration with a particular software load and a number, and sold the whole thing as a ready-to-teach computer. The small end of the line — EduSystem 5, 10, 15, 20, 25 and their kin — scaled from a bare single-user 4K BASIC machine up through more capable configurations with paper-tape or DECtape support, an editor, the assembler, and FORTRAN, so a school could buy the rung of the ladder it could afford. (EduSystem 25, for instance, was a disk- or DECtape-based single-user system that understood a real file system.) At the top of the line sat the multi-user systems, where a single PDP-8 served a whole roomful of students at their own Teletypes at once — the time-sharing offering we come to below, sold as EduSystem 50.

The importance of this to the PDP-8’s history is hard to overstate. The EduSystem packaging is a large part of why the PDP-8 became the machine on which an entire generation first learned to program. A computer that a high school could buy, that booted into a friendly language, that a class of teenagers could share — that was a genuinely new thing around 1970, and DEC, more than anyone, built it and sold it. The first computer many people of that era ever touched was a PDP-8 running BASIC under an EduSystem label, in a classroom, with a Teletype clattering out their first 10 PRINT. The machine’s spread into education was not an accident of its low price alone; it was a deliberate product strategy, and the EduSystem catalogue was its instrument.

OS/8 and the operating systems

Everything so far — PAL, FOCAL, BASIC — lived, on a minimal machine, in the world of paper tape: load a tape, run it, punch your results, and when you wanted a different tool you loaded a different tape. There was no file system, no notion of named programs and data living together on a fast medium, no command line from which to summon them. As disk and DECtape became affordable, DEC built the layer that supplied all of that: an operating system, and on the PDP-8 the one that mattered was OS/8.

It did not arrive fully formed. The earliest “system” was simply the paper-tape software system of Volumes 7–8 — the loaders, the editor, the assembler, FOCAL, each a separate tape, with the human as the operating system, deciding what to load next. The first real step up was the Disk Monitor System (DMS) of around 1967: with a fixed-head disk attached, a resident monitor program could stay in memory and respond to typed commands, keeping the assembler, editor, and utilities on disk where they could be summoned in seconds instead of read from tape in minutes. From DMS the line evolved through PS/8 — “Programming System/8” — and in 1971 PS/8 was renamed OS/8. (The renaming was pure marketing: a DEC salesman reportedly insisted he could sell more machines with an “Operating System” than with a “Programming System.” He was right.)

What OS/8 bought you over bare paper tape was the difference between a pile of tools and a working environment. It gave the PDP-8 a genuine file system — named files in a directory, on DECtape or disk, that you could list, copy, rename, and delete — using a directory structure deliberately made compatible with the larger PDP-10’s, so files could move between the two. It gave you a Keyboard Monitor: a command-line interpreter that printed a dot and waited for you to type commands like R PAL8 to run the assembler or .DIRECT to list a directory, dispatching the right program automatically instead of making you hand-load a tape and set a start address. And it gave you, as files on that disk, the whole toolchain at your fingertips: a symbolic editor, the PAL8 assembler, a linking loader, debugging tools, and — significantly — high-level languages, including FORTRAN. OS/8 FORTRAN (and the later FORTRAN IV) brought the most important scientific programming language of the era to the little machine; with the optional FPP-8 floating-point processor installed, the FORTRAN runtime would detect it and offload the arithmetic, letting the PDP-8 itself run as little more than an I/O processor while the FPP crunched numbers. OS/8 was remarkably small for what it delivered — it ran in 8K with a DECtape — and it turned the PDP-8 from a machine you operated into a machine you used, the same conceptual leap that separates loading programs by hand from typing their names at a prompt.

Time-sharing and DECUS

The most audacious thing anyone did with a PDP-8’s software was to make one of them behave like many. That was TSS/8 — the Time-Sharing System/8. Conceived at Carnegie Mellon University (graduate student Adrian van de Goor was central to its design, in reaction against the cost and complexity of IBM’s TSS/360) and built into a shipping product at DEC by Don Witcraft and John Everett, TSS/8 was written in 1967 and released in 1968, running on the PDP-8/I and up. Its trick was breathtaking on so small a machine: it gave each user their own virtual 4K PDP-8. A dozen people, each at their own Teletype, each apparently in sole possession of a complete little computer, all sharing one physical processor and one disk, the system swapping each user’s 4K image in and out of core and round-robining the processor among them so quickly that each felt alone with the machine. Many of the utilities a TSS/8 user ran inside their virtual machine were familiar faces — versions of the Disk Monitor and paper-tape-world tools — and the system supported BASIC well (plus restricted 4K FORTRAN and ALGOL), which is exactly why DEC also sold TSS/8 to schools under the name EduSystem 50, the multi-user top of the educational line. The first installation went into Lexington High School in Massachusetts; it ran at something like a twentieth the operating cost of IBM’s TSS/360. That a $20,000-class minicomputer could give twelve simultaneous users their own interactive computer, in 1968, was very nearly miraculous, and it put hands-on, interactive computing within reach of institutions that could never have dreamed of a mainframe.

None of this software — not PAL, not FOCAL, not BASIC, not the operating systems, not the thousands of application and utility programs people wrote — would have spread as it did without a way for users to share it, and the PDP-8 world had one of the best: DECUS, the Digital Equipment Computer Users Society. DECUS was founded in March 1961, the year DEC’s first computer, the PDP-1, was new, when a handful of PDP-1 users gathered in Lexington, Massachusetts, with a simple idea — to start a program library. (Edward Fredkin was the prime mover.) The society was legally part of DEC and subsidized by it, but run by volunteers, and from those PDP-1 beginnings it grew, by the PDP-8 era, into one of the largest computer-user organizations in the world.

The heart of DECUS was its library. Any user could submit a program they had written and were willing to share; the library would accept it, catalogue it, and — crucially — send a copy to anyone who asked, for the cost of the medium and handling. Year by year the library published thick catalogues of what was on offer: assemblers and editors and debuggers, FOCAL programs and BASIC programs, numerical routines, games, hardware diagnostics, language enhancements, whole subsystems. And it all traveled on the very paper tape that has run through this entire series. A program written and assembled at one site, punched onto a fan-folded ribbon, mailed to DECUS, catalogued, copied, and mailed back out to a hundred other sites who loaded it with their own Binary Loader — that was how PDP-8 software actually circulated. It is hard not to see in DECUS a direct ancestor of the free-software and open-source cultures that came decades later: a community of users freely contributing, freely copying, and freely improving one another’s code, with the manufacturer’s blessing and a tape library as the distribution channel. The PDP-8’s software world was not only made on paper tape and for a frugal little machine; it was shared in a way that turned thousands of isolated owners into a single, collaborating community. That community, as much as any feature of the hardware, is why the little twelve-bit machine punched so far above its weight — and why the programs people wrote for it survived to be run again.

Sources

  • Wikipedia, “FOCAL (programming language)” — FOCAL created by Richard (“Rick”) Merrill at DEC, first released 1968 with the 1969 revision known as FOCAL-69; the “Formulating On-line Calculations in Algebraic Language” / “FOrmula CALculator” gloss; inspiration from JOSS; the ~3K interpreter leaving ~1K for the user in a 4K machine; single-letter commands (T/A/S/F/I/D); and the David Ahl observation on DEC’s refusal to license FOCAL while BASIC spread freely. https://en.wikipedia.org/wiki/FOCAL_(programming_language)
  • Computer History Museum / Software Preservation Group, “History of FOCAL (Formula Calculator)” — corroborates authorship, dates, and the FOCAL-69 release. https://softwarepreservation.computerhistory.org/FOCAL/
  • Wikipedia, “OS/8” — OS/8 as the primary PDP-8 operating system; PS/8 (“Programming System/8”) renamed OS/8 in 1971 (the salesman anecdote); predecessors including the Disk Monitor System; the DECtape/disk directory structure made compatible with the PDP-10; the keyboard monitor; and OS/8 FORTRAN with FPP-8 floating-point offload. https://en.wikipedia.org/wiki/OS/8
  • Wikipedia, “TSS/8” — time-sharing system co-written by Don Witcraft and John Everett at DEC, designed at Carnegie Mellon with Adrian van de Goor in reaction to IBM’s TSS/360; written 1967, released 1968 on the PDP-8/I; each user a virtual 4K PDP-8; sold as EduSystem 50; BASIC well supported with restricted FORTRAN/ALGOL; first installation at Lexington High School; ~1/20 the operating cost of TSS/360. https://en.wikipedia.org/wiki/TSS/8
  • Wikipedia, “DECUS” — the Digital Equipment Computer Users Society, founded March 1961 by PDP-1 users meeting in Lexington, Massachusetts (Edward Fredkin), to start a program library; legally part of DEC but volunteer-run; a library that accepted submissions and distributed them to anyone, publishing yearly catalogues. https://en.wikipedia.org/wiki/DECUS
  • “A Field Guide to PDP-8 Assemblers” (PiDP-8/I project, tangentsoft.com) — PAL III = “Program Assembly Language,” version III, the baseline assembler shipped with the Teletype-and-paper-tape PDP-8; MACRO-8 built on PAL III adding macros; the two-pass paper-tape assembly workflow; PAL8 as the OS/8-era descendant; and EDIT-8 / the Symbolic Editor as the paper-tape editing tools. https://tangentsoft.com/pidp8i/wiki?name=A+Field+Guide+to+PDP-8+Assemblers
  • PAL III Symbolic Assembler Programming Manual (DEC-08-ASAB-D / ASAC-D) and the OS/8 and PDP-8 software handbooks, Digital Equipment Corporation, via bitsavers.org — DEC’s own documentation of the PAL assembly language, the edit–assemble–load cycle, OS/8’s keyboard monitor and file system, PAL8, and OS/8 FORTRAN. http://www.bitsavers.org/pdf/dec/pdp8/
  • Doug Jones, PDP-8 documentation and FAQs (University of Iowa) — the PDP-8 software toolchain, the Disk Monitor System and the evolution toward OS/8, and the EduSystem packaged offerings for education. https://homepage.divms.uiowa.edu/~jones/pdp8/
  • David H. Ahl, writings on DEC, FOCAL, and BASIC in education — the FOCAL-versus-BASIC licensing contrast and the PDP-8’s role as an educational machine.
  • Figure: “DEC PDP-8 family … and Teletype ASR-33 … Computer History Museum,” photograph by Carlo Nardone, via Wikimedia Commons, licensed CC BY-SA 2.0 — a family of PDP-8 machines with the ASR-33 Teletype console at which this volume’s software was written, run, and shared. https://commons.wikimedia.org/w/index.php?curid=66960383