How They Built the Software of Apollo 11
LinuxScribe tips a piece up at Linux.com with inside details on the design and construction of the Apollo 11 code. There are some analogies to open source development but they are slim. MIT drafted the code — to run on the Apollo Guidance Computer, a device with less grunt than an IBM XT — it had 2K of memory and a 1-MHz clock speed. It was an amazing machine for its time. NASA engineers tested, polished, simulated, and refined the code. "The software was programmed on IBM punch cards. They had 80-columns and were 'assembled' to instruction binary on mainframes... and it took hours. ... During the mission, most of the software code couldn't be changed because it was hard-coded into the hardware, like ROM today... But during pre-launch design simulations, problems that came up in the code could sometimes be finessed by... computer engineers using a small amount of erasable memory that was available for the programs. The software used a low-level assembly language and was controlled using pairs or segments of numbers entered into a square-shaped, numeric-only keyboard called a Display and Keyboard Unit... The two-digit codes stood for 'nouns' or 'verbs,' and were used to enter commands or data, such as spacecraft docking angles or time spans for operations." Reader Smark adds, "The Google Code Blog announced today that the Virtual AGC and AGS project has transcribed the Command Module and Lunar Excursion Module code used during the Apollo 11 moon landing. The code is viewable at the VirtualAGC Google Code Page."
As some one old enough to enter raw hex in to a hex keypad on a machine with an LED display having hand assembled the code in the back of her math exercise book during a math lesson (when I should have been learning stats) this doesn't sound too different.
...was the first flight to land in terrain where the descent trajectory had to be designed to avoid high altitude terrain. By that I mean they had to fly over a mountain, then into a valley for the landing.
The terrain model in the PNGS had five vectors in memory to represent terrain. Back in those days, RAM was expensive.
http://michaelsmith.id.au
http://embedded.com/columns/technicalinsights/218401508?pgno=1
"Calculating trajectories for Apollo program"
"Jack Crenshaw describes what he and team members did to research trajectories for the Apollo missions."
You're wrong. Only RAM or ROM is measured in base 2, due to the innate binary nature of computers (they measure in multiples of 256, 512, 1024, 2048, et cetera). Clock speed is independent of that and measured in base 10 such that 1 megahertz == 1000 hertz.
Anyway:
This Apollo computer has specs almost identical to ancient 1970s home technologies like the Atari VCS/2600 (1 megahertz, 2K ROM) or an Atari 400 computer or a Commodore VIC-20 (1 megahertz, ~8K RAM). That gives you a rough idea of how "weak" the computer inside Apollo truly was.
"I disapprove of what you say, but I will defend to the death your right to say it." - historian Evelyn Beatrice Hall
Next time you think you have a tight deadline:
"Final exam (for the advanced student)
Prior to the descent of Apollo 14's LM to the lunar surface, a short in the LM control panel caused the abort switch to be triggered intermittently. If this actually happened during the landing, an abort would have automatically occurred (meaning that the lower stage of the LM would have been jettisoned and the upper stage would have blasted back into space). No landing would have been possible, and the astronauts would have faced the grave situation of needing rescue by the command module. It was therefore necessary, in the orbit or two before descent, for the some of the software designers to work out a fix for this problem that allowed a software lockout of the abort switch during the initial phase of the descent, but also allowed reenabling the abort switch later in the descent, in case the astronauts needed to use it. They did, in fact, work out such a fix. Your mission, should you choose to accept it, is this: Work out such a fix and send it to me. Remember, your fix can only involve erasable memory, since the core-rope containing the program cannot be altered. The fix needs to be keyed in at the DSKY by the astronauts. You have about 90 minutes to figure it out. Go!"
http://www.ibiblio.org/apollo/index.html#Final_exam_for_the_advanced_student_
A few years ago I read an excellent article on how NASA develops software for the space shuttle. It focuses on the development process. The article is quite long, but well written, informative and entertaining. Read it here: http://www.fastcompany.com/magazine/06/writestuff.html?page=0%2C3
The Block II AGC had 2,048 WORDS of memory, not 2,048 bytes. A word on the AGC is 15 bits + 1 bit parity. So, the AGC actually has 4 KiB of erasable memory, or 3.75 KiB not counting parity.
Also, keep in mind that this was just data memory, not program memory. A lot of early 8-bit micros loaded their programs into RAM from cassette or paper tape, so the total memory available for data is reduced.
The AGC had 36 KWords of read-only program memory which was woven into core-rope memory by the same "little old ladies" that sewed the suits together.
This guy wins the ubergeek crown of all time. He actually built a fully functional version of an AGC out of discrete IC chips. Granted, it is not a true AGC clone, since the exact chips could not be procured in 2000-2004, but he did build a functional workalike of the AGC out of individual TTL chips, and wrote two software emulators, and got his modernized hardware reproduction AGC to run actual original AGC machine code software.
Not powerful in any meaningful sense. Just incredibly robust and failure tolerant.
Some might remember the 1202 alarm when the LEM commander had to take over manual control and land the LEM because, according to the mainstream press, the computer crashed.
Well, it turns out it was not quite that simple. Human error led to the computer reaching a PLANNED restart point. This restart was essentially instant, dumping tasks it could not handle due to missing data, and picking up where it left off.
Aldrin, due to the closeness of the landing decided to take over manually as he had trained to do hundreds of times in the simulator.
But the computer did not fail, it restarted, as programmed, and was back on line long before he even got his hand off the switch.
http://history.nasa.gov/alsj/a11/a11.1201-pa.html
Sig Battery depleted. Reverting to safe mode.