Today is exactly 50 years since the day the first man set foot on the Moon, 20 July 1969. “That’s one small step for man, one giant leap for mankind” is the phrase that continues to echo in our lives, but how much computer science has helped man to reach the Earth’s satellite? It was simply fundamental. Let’s try to better understand what tools the astronauts had at their disposal.
There is a Github repository which contains part of the source codes for the Apollo Guidance Computer, i.e. the control center for the comman module and the lunar module (cover photo). The code is the original one kept in paper form in the museum of the MIT.
Before you take a look at it, let’s consider the technical specifications of the AGC.
In the years when there was enthusiasm because computers were able to stay “only” in a room, this device was futuristic. His performance were then achieved by the personal computers of the end of the ’70s, like Apple II.
The AGC was composed of 4 main registers: the accumulator (A), the program counter (Z), the register for the return address or for the rest of a division (Q) and the register for the lower product of multiplications (LP). There were also 23 other registers, 4 of which were part of a group IN (input) and 4 of a group OUT (output).
The AGC had its own command interface: the DSKY. On one hand there were a series of lights showing the status of the computer, on the other a display indicating the number of the program running (if any); verbs and nouns, i.e. the two input parameters that the astronauts could enter, and three output values. At the bottom there was a numeric keyboard with dedicated buttons.
The programs available on the computer were identified by numbers and a program would start when its number was entered. Below there are tables with program numbers, verbs and nouns.
The programming language used to program the computer of Apollo 11 is a version of assembly developed ad-hoc by a group of scientists at MIT directed by Margaret Hamilton, which has become one of the most influential women in the history of computer science.
Among the many and complex instructions we can mention some of them that we will see are not far from the general instructions of assembly.
We can see that as parameters to these commands should be passed only memory addresses and the register A is fundamental for each of them.
There are other types of instructions, even more complicated, which are reported on the documentation.
Languages assembly-based are now part of the historical archives of computer science and have given way to the most versatile and powerful high-level languages. Today it is unthinkable to write an entire program in assembly, unless it is something similar to Hello World; in some particular cases, however, assembly can still be useful, if you want to manage registers and memory addresses.
It may then be a moment to remember that, only 50 years ago, the state of the art in this field was very far from that of today, but not for this reason unable to leave its mark in the history of mankind.
If you want to know more about you can read the Introduction to the Apollo Guidance Computer, you can also download a simulator of the two modules (command and lunar) from this site.
Who knows, which code will one day take us to Mars?
Passionate about computers, technology and information technology since I was a child. I have a bachelor's degree in Computer Science from the University of Bologna and I am now studying for a master's degree. Often I like to put my knowledge into practice by creating something new.