Pinball Game

Page 390 of the actual Luminary099 assembly listing, photographed at the MIT Museum by Paul Fjeld for the Virtual AGC project. Every line is prefixed R — the entire page is comments. Not a single machine instruction. The assembler produced nothing for it.
The file PINBALL_GAME_BUTTONS_AND_LIGHTS.agc is the longest single source file in the AGC codebase — 82 pages of the original printout (pages 390-471). It contains the entire keyboard and display system: the software that turned keystrokes into commands and computed values into glowing numbers on the DSKY panel. The AGC developers called it Pinball because working the DSKY’s array of buttons felt like playing a pinball machine.
The DSKY
Section titled “The DSKY”The Display/Keyboard unit (DSKY, pronounced “DIS-key”) was the crew’s only interface with the AGC. It consisted of:
- 19 keys: digits 0-9, VERB, NOUN, ENTER, CLEAR, KEY RELEASE, ERROR RESET, +, -, and PROCEED
- Three 5-digit signed displays: R1, R2, R3 (the data registers)
- A 2-digit VERB display and a 2-digit NOUN display
- A 2-digit PROGRAM display (the current major mode)
- Status lights: COMP ACTY, UPLINK ACTY, TEMP, KEY REL, OPR ERR, PROG, RESTART, TRACKER, NO ATT, STBY, GIMBAL LOCK
There was no screen, no cursor, no text. Communication was entirely through numeric codes.
The Verb/Noun System
Section titled “The Verb/Noun System”The interface worked on a simple grammar: a Verb specified what action to take, and a Noun specified what data it applied to. The astronaut pressed VERB, typed two digits, pressed NOUN, typed two digits, and pressed ENTER.
Some common combinations during the lunar descent:
| Verb | Noun | Meaning |
|---|---|---|
| 06 | 63 | Display altitude, altitude rate, lateral velocity |
| 06 | 64 | Display landing site data (P64) |
| 16 | 68 | Monitor time-to-go, range, velocity |
| 37 | — | Change program (major mode) |
| 99 | XX | ”Please enable engine” (used by ignition routine) |
An Accidental Interface
Section titled “An Accidental Interface”The Verb/Noun system was never meant to be permanent. The source code includes an annotation from Ron Burkey (2009) that preserves the account from Ramon Alonso, one of the original AGC developers:
Apparently, nobody had yet arrived at any kind of software requirements for the AGC’s user interface when the desire arose within the Instrumentation Laboratory to set up a demo guidance-computer unit with which to impress visitors to the lab. Of course, this demo would have to do something … In short order, some of the coders threw together a demo program, inventing and using the verb/noun user-interface concept (in the whimsical fashion seen in much of this code), but without any idea that the verb/noun concept would somehow survive into the flight software.
Many objections were raised against it: “it’s not scientific,” “it’s not dignified,” “astronauts won’t understand it.” The coders countered every objection, and the interface shipped. The astronauts understood it fine. Most of them just would have preferred switches and dials.
The Shakespeare Quotation
Section titled “The Shakespeare Quotation”The Pinball source opens with a literary epigraph:
# THE FOLLOWING QUOTATION IS PROVIDED THROUGH THE COURTESY OF THE AUTHORS. # # ::IT WILL BE PROVED TO THY FACE THAT THOU HAST MEN ABOUT THEE THAT # USUALLY TALK OF A NOUN AND A VERB, AND SUCH ABOMINABLE WORDS AS NO # CHRISTIAN EAR CAN ENDURE TO HEAR.:: # HENRY 6, ACT 2, SCENE 4
The source attributes this to Henry VI, Act 2, Scene 4. Ron Burkey’s annotation corrects it to Part 2, Act IV, Scene VII — the scene where the rebel Jack Cade condemns a clerk to death for the crime of literacy. The programmers adopted the quotation as an ironic motto: they, too, were building a system that talked of nouns and verbs, and they were well aware that not everyone approved.
The Display Panel Layout
Section titled “The Display Panel Layout”The code documents the DSKY layout precisely, with each character position mapped to a relay word and bit position:
# THE PANEL APPEARS AS FOLLOWS,# MD1 MD2 (MAJOR MODE)# VD1 VD2 (VERB) ND1 ND2 (NOUN)# R1D1 R1D2 R1D3 R1D4 R1D5 (R1)# R2D1 R2D2 R2D3 R2D4 R2D5 (R2)# R3D1 R3D2 R3D3 R3D4 R3D5 (R3)Each pair of characters was driven by an electroluminescent segment display through relay words written to output channel 10. The DSPTAB buffer (11 registers) held the current display state. The DSPOUT routine, triggered by the T4RUPT timer interrupt, transferred DSPTAB contents to the hardware one relay word at a time.
The CHARIN Dispatch Table
Section titled “The CHARIN Dispatch Table”When the astronaut pressed a key, the KEYRUPT1 interrupt stored the 5-bit key code in MPAC and entered an Executive request for the Pinball program at CHARIN. The dispatch table maps each key code to its handler:
CHARIN2 XCH MPAC TS CHAR INDEX A TC +1 # INPUT CODE FUNCTION TC CHARALRM # 0 TC NUM # 1 TC NUM # 2 TC NUM # 3 TC NUM # 4 TC NUM # 5 TC NUM # 6 TC NUM # 7 TC 89TEST # 10 8 TC 89TEST # 11 9 ... TC NUM -2 # 20 0 TC VERB # 21 VERB TC ERROR # 22 ERROR LIGHT RESET ... TC KEYRLSE # 31 KEY RELEASE TC POTEFNTR # 32 + TC POTEFNTR # 33 - TC ENTERON # 34 ENTER ... TC NOUNON # 37 NOUNThe INDEX A; TC +1 pattern is an indexed jump — it uses the key code directly as an offset into the dispatch table. Each table entry is a TC (transfer control) to the appropriate handler. Digits go to NUM, the VERB key goes to VERB, ENTER goes to ENTERON, and so on.
The Display Relay Codes
Section titled “The Display Relay Codes”Each digit was represented as a 5-bit relay code for the electroluminescent display:
# THE 5-BIT OUTPUT RELAY CODES ARE:## BLANK 00000# 0 10101# 1 00011# 2 11001# 3 11011# 4 01111# 5 11110# 6 11100# 7 10011# 8 11101# 9 11111These codes directly controlled which segments of the seven-segment-style display were illuminated. The encoding is not sequential — it is optimized for the physical wiring of the electroluminescent segments.
GOTOPOOH — Returning to Idle
Section titled “GOTOPOOH — Returning to Idle”Throughout the Pinball code and indeed the entire AGC, the routine GOTOPOOH appears as the standard exit for terminated or abandoned operations. It returns the computer to program P00 — the idle program. The name is a contraction of “GO TO P-double-oh,” though the Winnie-the-Pooh overtones were certainly not lost on the engineers.
The definition lives in FRESH_START_AND_RESTART.agc:
GOTOPOOH CAF OCT33 # 4.33 SPOT FOR GOP00FIX TS L COM DXCH -PHASE4And the idle state itself:
POOH TC RELDSP # RELEASE DISPLAY SYSTEMWhen the computer had nothing to do, it sat in POOH, waiting for the next Verb 37 command to select a new program. The green COMP ACTY light went dark.
The Alarm Display
Section titled “The Alarm Display”When the 1202 and 1201 alarms fired during the lunar descent, it was the Pinball display system that showed them to the crew. The PROGLARM routine in ALARM_AND_ABORT.agc set bits in the DSPTAB relay buffer:
PROGLARM CS DSPTAB +11D MASK OCT40400 ADS DSPTAB +11DThis lit the PROG indicator light on the DSKY. The alarm code itself could be displayed using Verb 05, Noun 09 — “display alarm data in R1.” When Buzz Aldrin called down “Program alarm — it’s a 1202,” he was reading a number that had traveled from the Executive’s BAILOUT routine through the alarm registers and out through the Pinball display system to the electroluminescent segments of the DSKY.
The entire path — from the Executive detecting an overflow, through the alarm handler recording the code, to the display system lighting up the indicator and the crew reading the number — was designed as an integrated system. Each piece was built by different engineers, but they all relied on common data structures (DSPTAB, FAILREG) and common interfaces (ALARM, BANKCALL, the relay word encoding) that Hamilton’s team had defined from the beginning.
That is what “software engineering” means in practice: not just writing code that works, but building the interfaces and conventions that allow separately written code to work together under conditions no one fully predicted.
Try It
Section titled “Try It”Type Verb-Noun commands directly into Hamilton’s DSKY interface. The simulator below runs the actual Pinball Game code from Luminary099.