13 ms·
Apollo program source code
- russss 14y agoMost of this is code is available in machine-readable form in the VirtualAGC Google Code repository: http://code.google.com/p/virtualagc/source/browse/#svn%2Ftrunk http://code.google.com/p/virtualagc/source/browse/#svn%2Ftru...
- exDM69 14y agoFun fact: the actual programs in the spacecraft were stored in core rope memory, an ancient memory technology made by (literally) weaving a fabric/rope, where the bits were physical rings of ferrite material. http://en.wikipedia.org/wiki/Core_rope_memory http://en.wikipedia.org/wiki/Core_rope_memory
- GnarfGnarf 14y ago"Core" memory is resistant to cosmic rays. The state of a core bit will not change when bombarded by radiation in Outer Space. Can't say the same of solid state memory. I worked on core memory computers in the 60's. You had 16K, tape drives (no disks) and FORTRAN. What a gas!
- Retric 14y agoAt a low level your correct, but you can use error correction and a lot of redundancy to prevent cosmic rays from corrupting solid state memory and still have a lot more than 16K of storage space for a long time.
- Create 14y ago...and radhard designs.
- maaku 14y ago...which involve error correction and a lot of redundancy. But I assume you meant radhard electronics boxes, which lets you run whatever you want within a cosmic-ray shielded box.
- Create 14y agoyou can do more than just improve on the boxing https://en.wikipedia.org/wiki/Rad-hard#Radiation-hardening_techniques https://en.wikipedia.org/wiki/Rad-hard#Radiation-hardening_t...
- samstave 14y agoJust curious how they knew this given how young the computing industry was at the time that this was used. Were there some "Well, that's interesting..." moments where we launched something and realized it was affected by cosmic rays?
- polyfractal 14y agoI think it's just an understanding of how the underlying physics work. Alpha and beta radiation will cause bits to flip in solid-state devices, because the state is held with electrons. Whereas core rope memory stores that state as magnetic fields in ferrite cylinders. So radiation will basically just bounce right off the giant ferrite cores (giant relative to solid-state semiconductors, that is). *I am not a physicist, someone correct me if I'm grossly wrong.
- Arkien 14y agoIts more a cause of the radiation ionizing the underlying semiconductor material. For instance when an electron tunnels into a transistor it can cause strange effects. Look up single event upset and single event latch-up for more information. The SEL is interesting as it causes a transistor to act as a double transistor and start drawing tons of power. At least that's how I understand it.
- mnl 14y agoHmm, it's more like any ionizing particle (charged) creates pairs electron/hole, many of them, so that the charge distribution in the pn junctions are altered. Sometimes gamma photons generate Compton electrons in the material that act as delta rays, to the same effect. Heavy particles can alter the crystal structure, inducing defects that may change its properties. Magnetic storage devices don't have polarised junctions and could withstand all this if they didn't include solid state electronics. Radiation hardening techniques and shielding can help a lot.
- brendn 14y agoMy guess is that radiation's effects on solid-state technology was well-known from nuclear tests.
- strangetimes 14y ago"Some programmers nicknamed the finished product LOL memory, for Little Old Lady memory." LOL.
- exDM69 14y agoIn 1967, binutils was a person.
- mkopinsky 14y agoHuh? I don't get it.
- unimpressive 14y agoBinutils are a set of utilities used by *nix systems. http://en.wikipedia.org/wiki/Binutils http://en.wikipedia.org/wiki/Binutils
- darkstalker 14y agothe person who builds the core rope memory
- mkopinsky 14y agoAha. Binutils = compiler, linker, weaver, .... I think this is one person who can legitimately say that he programs with a magnetized needle and a steady hand. http://xkcd.com/378/ http://xkcd.com/378/
- AsylumWarden 14y agoGreat! Texting LOL to my grandmother suddenly has a whole new meaning. I love it! She often complains her memory is getting old so it works even better!
- J3L2404 14y agoSort of an interplanetary quipu. http://en.wikipedia.org/wiki/Quipu http://en.wikipedia.org/wiki/Quipu
- __alexs 14y agoRelated: Magnetic Core Memory, the read/write version of Core Rope Memory. http://www.corememoryshield.com/report.html http://www.corememoryshield.com/report.html
- andrewcooke 14y agohmmm. so the "bugger words" at the end of, for example, http://www.ibiblio.org/apollo/listings/Colossus249/MAIN.agc.html http://www.ibiblio.org/apollo/listings/Colossus249/MAIN.agc.... are checksums - see http://books.google.cl/books?id=3fKzL0HfJp4C&pg=PA232&lpg=PA232&dq=apollo+bugger+words&source=bl&ots=cF3S6mxXfE&sig=6LhH9dhU3xpavWEc9UlxwqUHFI8&hl=en&sa=X&ei=afGXT4_NF8avgwez48jQBg&redir_esc=y#v=onepage&q&f=false http://books.google.cl/books?id=3fKzL0HfJp4C&pg=PA232... anyone know the etymology? is it just a shortened form of "debugger"? is "bugger" not common slang in american english? or is this a joke?
- Nate75Sanders 14y agoBugger is not common slang in American English. You can find people who will argue about that, but they don't get out much.
- jackfoxy 14y agoBugger is not common, but also not uncommon American slang. It has rather lost it's original meaning. I have heard little old American ladies use it, probably having heard it in a movie, with the intention of a meaning derived from to bug (bother). I don't think any slang dictionary has ever caught up with this usage.
- AsylumWarden 14y agoI've used bugger since the first of the Austin Powers movies. My friends and I used it until one of them married a South African girl and she made us stop being as it was incredibly impolite and rude apparently. I started again last year after watching Top Gear and then recently got yelled at by a new accounting manager who moved into the office across from my cubicle. Once again, I was being crude but in all honesty, for me, the word is no different than saying frag, frell, crude bunnies, etc.
- wozname 14y agoVery commonly used in New Zealand, its used on TV with no problems, heres the iconic Toyota ad using the word bugger to good effect: http://www.youtube.com/watch?v=TKY_OysWu3k http://www.youtube.com/watch?v=TKY_OysWu3k
- stuff4ben 14y agolooking through some of those documents a couple things stand out to me: 1) learn your maths people if you want to do rocket science stuff 2) the amount and detail of the documentation they wrote back then is unreal 3) the simple webapps I write for big bucks at local megacorp pale in comparison to those programs that frickin landed people on the moon!
- GnarfGnarf 14y agoWith the power of open source, "many eyes make all bugs shallow". Wouldn't be a hoot if someone ran this through a simulator, and discovered a bug that had eluded NASA?
- Retric 14y agoI would not take an even bet that there is any meaningful bugs in that code that NASA was not already aware of.
- joezydeco 14y agoHere's a nice detailed study of the 1201/1202 alarm that caused the AGC to reboot while Apollo 11 was landing: http://www.hq.nasa.gov/alsj/a11/a11.1201-pa.html http://www.hq.nasa.gov/alsj/a11/a11.1201-pa.html
- jerf 14y agoI'd need a lot of convincing it wasn't rather a bug in the simulator. An attainable amount of convincing, but it would be my first thought.
- DanBC 14y agoWhy? Bugs in code made it into space. These are documented.
- jerf 14y agoBecause the odds are that the simulator with which someone will run around yelling about the bug they found (which will get them links on HN and other fun perks) will have had less than 1% of the time spent on creating it than the code that was actually sent into space, and on the balance, given the observation of a defect in the combined simulator+Apollo code the highest probability locus is the new, untested code that was probably rushed out for publicity's sake and had no lives ever depend on it. You seem to have misinterpreted my post as me saying I would never believe it was a bug in the Apollo code, despite me making very sure to explicitly disclaim that.
- skore 14y agoJust in time for being ported to DCPU-16.
- tathagatadg 14y agoExactly ...
- horsehead 14y agoI lolled.
- rbrtrbrt 14y agoAnyone have an idea why there's sourcecode for (apparently) a pinball machine in there? http://www.ibiblio.org/apollo/listings/Luminary099/PINBALL_GAME_BUTTONS_AND_LIGHTS.agc.html http://www.ibiblio.org/apollo/listings/Luminary099/PINBALL_G... It's in the code repository for multiple Apollo's
- th0ma5 14y agoIf you read the code, it seems to suggest this is just the (fun) name of the lit display driving code.
- mladenkovacevic 14y agoI believe pinball was the name of their keyboard and display program (not an actual pinball machine)
- pkmays 14y agoI bet a lot of folks under the Iron Curtain would have loved to have had access to these documents back in the day.
- Michiel 14y agoMaybe they had... or maybe the NASA/MIT code is based on code originally obtained from behind the iron curtain.
- ptrckryn 14y agoA very interesting book, written by Frank O'Brien and published by Springer, The Apollo Guidance Computer: Architecture and Operation, is definitely worth the read. Fun fact: The unit weighed 70lbs (32kg). The AGC has spawned a pretty active cult of hardware hackers that have built the AGC from scratch - including the core memory.
- jscheel 14y agoNow that the shuttle program has ended, it would be nice to get the supposedly perfect code produced by the On-board Shuttle Group as well. I wonder if a FOIA request has been made.
- developer9 14y agoSo, when is someone going to write an Apollo emulator that in turns contains an Apollo hardware emulator that uses the actual program to simulate what the onboard system would have done? Or has that been done? :)
- mykhal 14y ago.. what about voyager program? you could then actually test the live system )
- rurounijones 14y agoso who is going to be the first to convert this all to DCPU?
- angersock 14y agoC'mon, Notch, even Apollo supported interrupts: http://www.ibiblio.org/apollo/hrst/archive/1678.pdf http://www.ibiblio.org/apollo/hrst/archive/1678.pdf "It is first appropriate to briefly describe the Apollo Guidance Computer (AGC). This processor is a general purpose, sequential, digital machine. Its word length is 16 bits including parity. The random access memory consists of 2048 words of destructive, read-write memory, called erasable, and 36,864 words of non- destructive read-only memory called fixed memory. The memor’y cycle time (MCT) is slightly less than 12 microseconds, with two MCI’s required to execute an add and four MCTs to execute a multiply. As is typical of real-time control computers, this machine has a set of special input-output channels with which it controls the spacecraft and observes the state of its environment. The interrupt structure consists of ten program interrupts with associated priorities, which are used for program control transfers. In addition, twenty-six counter interrupts with associated priorities allow for input-output servicing. The instruction set consists of forty-two regular instructions and nine involuntary instructions. Figure 1 indicates the number and diversity of systems with which the AGC interacts" EDIT: Apparently, as of six or so hours ago, Notch has implemented cutting-edge 1970s technology ( http://dcpu.com/highnerd/dcpu16_1_3.txt http://dcpu.com/highnerd/dcpu16_1_3.txt ). :)
- tryeng 14y agoWell, the DCPU-16 does too: http://www.reddit.com/r/dcpu16/comments/sripk/rfe_dcpu16_v13/ http://www.reddit.com/r/dcpu16/comments/sripk/rfe_dcpu16_v13...
- roqetman 14y agoMy favorite is the DSKY emulator: http://www.ibiblio.org/apollo/yaDSKY.html http://www.ibiblio.org/apollo/yaDSKY.html I used to use it as my desktop clock for a while.
- glenntzke 14y agoWho's going to implement this in-browser in javascript?
- alexbell 14y agoIf this stuff interests you, I highly recommend David Mindell's Digital Apollo.
- donnawarellp 14y agoHere is my implementation of the Apollo 11 computer in verilog on an FPGA: https://github.com/donnaware/AGC https://github.com/donnaware/AGC It has an assembler and IDE.