
Don Eyles Walks Us Through the Lunar Module Source Code - szczys
http://hackaday.com/2016/07/05/don-eyles-walks-us-through-the-lunar-module-source-code/
======
szczys
There's something amazing about carrying around your dot-matrix printed source
code in a roller suitcase. The only thing that says "stable release" more than
printing it out on hundreds of pages of paper is launching the computer
running the code into space with no hope of doing an update.

~~~
sizzzzlerz
Kids, today! You have no idea how lucky you are. At the time of writing this
code, there were no 32" color monitors, IDEs, code text editors, or source
code management systems. Code was first written out by hand and then typed
onto punch cards or paper tape. These were fed into a mainframe computer for
assembly. If you made a mistake, you had to find cards (by hand), remove and
replace them with corrected cards. Get the cards out of order, you were toast.
In general, the only way to gain a big picture of the code was to print it
out, often over and over. Needless to say, paper was in huge demand.

~~~
nervousvarun
Yup..."back then" you would arrange all your cards in a shoebox and then take
a marker and make a diagonal mark from top left to bottom right JUST IN CASE
you dropped said shoebox on the way to class to turn in your homework/take
home test. Without that mark there's no easy way to recreate the correct order
of the punch cards.

Source: dad was an engineering major in the early 70s.

~~~
donarb
The first six columns of IBM cards used for COBOL programming had sequence
numbers that could be used to validate that program lines were in order.

~~~
joezydeco
I'm curious what % of HN readers have ever written a program with line
numbers...

~~~
rurban
Even punch cards, but more teletype-style
[https://en.wikipedia.org/wiki/Punched_tape](https://en.wikipedia.org/wiki/Punched_tape)

The punchcards were considered uncool then, the tape was much better.

------
xhrpost
There's a link to the source code on GitHub[0], is that not the full source
though? Just searching for a comment like 'hello there' from the photo[1]
doesn't seem to exist in the repo.

[0]
[https://github.com/chrislgarry/Apollo-11](https://github.com/chrislgarry/Apollo-11)

[1] [https://hackadaycom.files.wordpress.com/2016/07/apollo-
sourc...](https://hackadaycom.files.wordpress.com/2016/07/apollo-sourcecode-
example-wb.jpg)

~~~
mmastrac
Googling some of the surrounding lines suggests that it is available here:

[https://github.com/avtobiff/virtualagc/blob/master/Luminary1...](https://github.com/avtobiff/virtualagc/blob/master/Luminary131/BURN_BABY_BURN
--MASTER_IGNITION_ROUTINE.agc#L878)

------
diego898
If you enjoy this, you might also enjoy a DIY Apollo Guidance Computer build
by John Pultorak [1]:

"John Pultorak created a working reproduction of the Apollo Guidance Computer
(AGC), wrote a complete manual that will allow you to build your own Apollo
flight computer clone and released it in the public domain."

[1]: [http://www.galaxiki.org/web/main/_blog/all/build-your-own-
na...](http://www.galaxiki.org/web/main/_blog/all/build-your-own-nasa-apollo-
landing-computer-no-kidding.shtml)

------
boznz
The I/O on the diagram blows your mind, I wish the projects I worked on had
outputs like Decent Engine

My career choices really suck, should have joined NASA or SpaceX :-)

------
foobarge
There's mention of interpreted sections in the code. Do you know if it was
possible to manually enter interpreted code to have it ran by the system
afterward - or even program some of software by hand (being dictated hex) in
case something unexpected occurring during the mission warranted it?

~~~
robryk
All of the code was in read-only memory (core rope), so it was impossible to
modify it.

There was at least one case when the behaviour of the code was significantly
changed in flight to work around a hardware failure (shorted button). This
involved changing the writable memory, which kept all the state, to
selectively disable some parts of the lunar landing program. For more details
see:

[http://www.ibiblio.org/apollo/#Final_exam_for_the_advanced_s...](http://www.ibiblio.org/apollo/#Final_exam_for_the_advanced_student_)

------
cwilkes
I couldn't have been the only one that read this as Don Rickles. Man you
thought reviews from coders was tough, wait till you get roasted.

------
spacecop
Does no digital copy of this exist to the public?

~~~
szczys
There are digital copies if you search around the Internet (at least a couple
have been linked in other comments).

For me the most interesting part is that there are hand-written notes in this
version which are from the development process.

