The first assembler
In the spring of 1949, programmers at the Cambridge Mathematical Laboratory fed paper tape into the EDSAC — a machine that occupied most of a room, ran on 3,000 vacuum tubes, and stored its memory in mercury-filled tubes the length of your arm. Writing a program meant punching 17-bit binary instructions onto that tape by hand: five bits for the opcode, ten for the address, one more to choose the word length. Miss a single bit and the calculation was wrong. There was no error message, because there was no notion of an error message yet.
David Wheeler was a 22-year-old PhD student at Cambridge, working on EDSAC under Maurice Wilkes, and he noticed something the designers had built in almost by accident. EDSAC’s 5-bit instruction opcodes matched the character codes for letters in the machine’s teletype alphabet: the binary pattern for “Add” was the same as the character for A; “Subtract” was S. Wheeler drew the natural inference: let programmers write “A 80 F” on tape instead of the raw binary, and put a small program in front of the machine to handle the translation.
The result was the “initial orders” — a 31-word assembler loaded into the bottom of memory at startup. It read symbolic instructions off paper tape, converted them to machine code, and handed off control. Wheeler finished the first version in May 1949. It was, as far as anyone can establish, the world’s first working assembler: a program whose job was to read another program.
He improved it in September 1949. Initial Orders 2 ran to 41 words and did something more ambitious: it automatically relocated subroutines in memory so they didn’t collide with each other. The word “subroutine” is also Wheeler’s. He had realized that chunks of code — a square-root routine, a printer formatter — could be written once, kept in a library, and called from anywhere. The mechanism he invented for calling them, a jump instruction that stored the return address in the accumulator, became known as the Wheeler jump.
Wheeler finished his Cambridge doctorate in 1951 — possibly the first PhD in computer science ever awarded — and that same year he, Wilkes, and their colleague Stanley Gill published The Preparation of Programs for an Electronic Digital Computer, the first book ever written about programming. That book gave the concept its name. Before Wilkes, Wheeler, and Gill, you translated your program by hand. After them, you wrote assembly language and let an assembler do it.
The idea spread quickly. By 1954, Nat Rochester had built an assembler for the IBM 701. The following year, Stan Poley’s SOAP — Symbolic Optimal Assembly Program — went further: it not only translated mnemonic instructions for the IBM 650, it calculated which physical locations on the rotating magnetic drum to assign each instruction so the processor spent minimum time waiting for them to spin into position. The assembler was no longer just a translator. It had started to optimize.
Wheeler’s insight — that you could put a program between the programmer and the processor to handle the translation — is the founding move of software as a discipline. Every compiler, every interpreter, every virtual machine since is a more ambitious version of those first 31 words.
Sources
- Assembly language — Wikipedia — history of early assemblers, Wilkes-Wheeler-Gill terminology, the 1951 book, spread to IBM machines.
- EDSAC — Wikipedia — hardware details, initial orders, Wheeler’s mnemonic opcodes, first program run May 1949.
- EDSAC Initial Orders — HOPL — the 31-word assembler, foundational importance, Wheeler and Wilkes-Wheeler-Gill’s roles.
- Symbolic Optimal Assembly Program — Wikipedia — SOAP for IBM 650, Stan Poley, 1955, drum-position optimization.