Assembly Code That Took America to the Moon Now Published On GitHub (qz.com) 74
An anonymous Slashdot reader writes:
"The code that took America to the moon was just published to GitHub, and it's like a 1960s time capsule," reports Quartz. Two lines of code include the comment "# TEMPORARY, I HOPE HOPE HOPE," and there's also a quote from Shakespeare's play Henry VI. In addition, the keyboard and display system program is named PINBALL_GAME_BUTTONS_AND_LIGHT, and "There's also code that appears to instruct an astronaut to 'crank the silly thing around.'"
A former NASA intern uploaded the thousands of lines of assembly code to GitHub, working from a 2003 transcription made from scans inherited by MIT from a Colorado airplane pilot, and developers are already using GitHub to submit funny issue tickets for the 40-year-old code -- for example, "Extension pack for picking up Matt Damon". Another issue complains that "A customer has had a fairly serious problem with stirring the cryogenic tanks with a circuit fault present." Because this issue succinctly describes the Apollo 13 mission in 1970, the issue has been marked "closed".
A former NASA intern uploaded the thousands of lines of assembly code to GitHub, working from a 2003 transcription made from scans inherited by MIT from a Colorado airplane pilot, and developers are already using GitHub to submit funny issue tickets for the 40-year-old code -- for example, "Extension pack for picking up Matt Damon". Another issue complains that "A customer has had a fairly serious problem with stirring the cryogenic tanks with a circuit fault present." Because this issue succinctly describes the Apollo 13 mission in 1970, the issue has been marked "closed".
Mrs MIT Engineer was the God (Score:1)
I think This is the most amazing example of software being developed by a non-company ever.
Margaret Hamilton ran the show.
Well.. (Score:2)
If the first & second AC was the same and legitimate, he sure as hell has regretted not signing-in right about now!
Link error (Score:1)
"special version of the assembly programming lang" (Score:1)
Ah yes, the assembly programming language.
development environment? (Score:3)
What did they use to develop the software? And even more interesting how did they test it? The must have had some simulators, probably both software and hardware based?
Re: (Score:1)
Switches, keypads, and real programmers.
Not the girly crap we have today.
if a programmer freaks out at the lack of an IDE or libraries, they really are not high level programmers, but more code monleys.
Re: development environment? (Score:1, Troll)
Calling it 'girly crap' is both offensive and ignorant. Many of the people who operated and programmed those systems were WOMEN.
Re: development environment? (Score:1)
Geez get over it. I doubt it was meant as a slight and if you room to that way it's your problem n
Re: (Score:3)
I think you have the terminology 100% backwards.
You are not really a LOW level programmer if you freak out with no IDE or libraries. If you're writing the sort of code presented here I'd say you can easily call yourself a Systems Engineer or Software Engineer (unlike 99% of the people who call themselves a Software Engineer).
However, if you feel the need to write assembly, use code quirks to eek out 1% more performance, and write your own libraries then you have no place in modern high level software devel
Re: (Score:3)
start: ;; start of frame
if overrun == 1 ; check for frame overrun
goto frame_err
overrun = 1
read value1 ; read all data at start of 10ms frame
read value 2
read valuen
output1 = 2*value1
outputn = 4.17*valuen
write output1, output2, ..., outputn
wait for interrupt
read radaltswitch
if radaltsw
Re: (Score:3)
They did not even have version controll at that time!
The main reason to develop source code control software came from the fact that the Apollo developers fucked up so often. No pun intended. They worked with back ups etc. and often stuff got lossed or mixed together wrongly.
Re: (Score:1)
Well it's easy to fuck something up when you are the one doing the shit for the first time. Unless you are aware of some previous effort to send and return people from the moon. It's not like they could just access some open source libraries and copy the work done by others. The Apollo program was a very high risk endeavor. So risky that any similar effort today would never happen because any failure or loss of life would only start the witch hunt looking to place the blame on someone. The government and ge
Re: (Score:2)
Don't worry, they had a witch hunt in the 1960s when they lost 3 astronauts in the Apollo 1 fire, complete with Congress critters trying to put the brakes on the whole thing.
Re: (Score:2)
Re: (Score:2)
IIRC it was tested in a mission emulator on an IBM 360.
I wasn't actually "recalling" real events there - I was recalling what I read on the NASA history pages.
Re: (Score:1)
My Dad worked on the Ranging Radar for the Lunar Excursion Module, so I've heard some stories.
Data input was punched cards (duh).
Tests included sticking a unit on the front of a missile and launching across White Sands Missile Range, then comparing the telemetry data returned with a known track mapped across a digitized re-creation of the range. Along the way they discovered the errors in the digitization when the results began claiming that the missile was travelling underground.
One of his research projec
Idiots. Idiots everywhere. (Score:5, Insightful)
Unfortunately, with the amount of coverage that this is getting in the geek sphere, the Dunning-Kruger Effect is in full force. So far, just today, I've seen:
- Someone trying to look into the code who had apparently never encountered a .s file before, and
- Some (judging by his name) Indian guy who had apparently never heard of the term "attitude" in relation to flight control, and submitted a pull request to change it to "altitude".
Idiots. Idiots everywhere.
Re:Idiots. Idiots everywhere. (Score:4, Funny)
We'll never get into space with that kind of attitude!
Re: (Score:2)
Re: (Score:2)
A little altitude goes a long way...
At the wrong attitude, it better go a long way! Are we there yet?!
Re: (Score:2)
Re: (Score:2)
Re: (Score:3)
good code too (Score:4, Informative)
Re: (Score:2)
Re:good code too (Score:4, Interesting)
And remember they did ALL OF THIS with integer only math and NO freaking math libraries.
Want to drive a fre grad programmer nuts? have him convert celcius to Farenheit and Kelvin with 4 decimal places of accuracy using only integer math on an 8 bit micro, no you can not use ANY libraries at all, and you need to do it in less than 6 lines of code.
Most shit themselves.
Re: (Score:3)
Actually likely not 'integer' but fixed point math.
The first time I saw one creating a table with 360 entries one byte big and storing precalculated sinues values in that table (remember: 1 byte big, so 127 means '1' and 128 means '-1' and the other values are 'fractions' between -1 and +1) I told myself: WTF! That was on an 6502 around 1985 in a small math library used in a game.
Re: (Score:2, Insightful)
That is, indeed, a WTF; you only need to store 45 degrees, the rest can be trivially calculated from that. Also, this means you could store the precalculated table as 16-bit (or even 32-bit) integers, yielding much more accurate results, and still save space.
This isn't really uncommon in embedded systems.
Re: (Score:1)
Storing one octant is simply a memory-speed trade off, especially on 1980s 8-but home computer with no memory cache architecture.
Storing the full circle allows faster lookup. Without knowing the design and constraints of the system, e.g. Available memory versus frequency of table lookups, it's not really fair to say that storing full circle is "WTF".
Re: (Score:2, Insightful)
Lame. A full circle is 256 entries, not 360.
Allows you to add angles together without boundary check and you can easily mirror angles.
There is no real reason to stick with 360 degrees circles, if necessary you can step up to 512.
Re: (Score:3)
Re: (Score:3)
Re: (Score:3)
and you need to do it in less than 6 lines of code.
Is that possible?
Re: (Score:3)
A lookup table is the solution I'd use for that sort of problem, but if you're counting the lookup table as 1 line of code then you're sort of going against the spirit of the challenge.
Re: (Score:2)
convert celcius to Farenheit and Kelvin with 4 decimal places of accuracy using only integer math on an 8 bit micro, no you can not use ANY libraries at all
This is why the world loves gcc and libc :) It isn't that hard with just the "standard library," but it sure is without any library! That first little bit of help is the most valuable.
Re: (Score:3)
Depends on the architecture. Try doing that in less than 6 lines when you don't have multiply or divide instructions in the CPU. You might not necessarily need to code up general-purpose multiply and divide routines (especially if you're dealing wit
Re: (Score:2)
you need to do it in less than 6 lines of code
This is easy !
For such short sequences of code, you can use SuperOptimization:
https://en.wikipedia.org/wiki/... [wikipedia.org]
I remember reading that a sequence of 7 assembly opcodes required a few weeks of computation.
Re: (Score:2)
Re: (Score:2)
Funny bugs, etc, are nice, but ... (Score:1)
... historical code like this also needs to exist in a "curated" version, where the only "changes" are those made by a responsible curator, with the changes consisting only of comments.
I'd fork it myself but the honor of being the "keeper of the curated version" really should be someone with a connection to the project or, better yet, an organization like NASA, a museum, a retired-NASA-employee-association, university, or similar organization that will have the funds, manpower, and interest to keep this goi
Re: (Score:2)
Why are they accepting modifications at all? The code is never going to be actually used again anywhere, is it?
Related: Lunar Module paper source listing (Score:2)
Don Eyles walks us through the Lunar Module source code [hackaday.com]
Ah, that explains ... (Score:1)
... yesterday's story TIOBE's Language-Popularity Index Sees A New Top 10 Language: Assembly [slashdot.org]. :)
i found it (Score:2)