The Apollo 11 Guidance Computer
wiredog writes "Dr. Dobbs has an article on the Apollo Guidance Computer with a jpg of a source code listing.
Some specs:
70-lb box ,
Approximately 20 instructions,
16 bit word,
ROM (rope core) 36K words; RAM (core) 2K words,
Basic machine cycle: 2.048 MHz"
the American Computer Museum there actually HAS an Apollo guidance computer, along with a lot of other neat stuff. Very cool. No, they don't let you use it. :-)
* And remember, it's spelled N-e-t-s-c-a-p-e, but it's pronounced "Mozilla."
I think you're missing the point. In code that is controlling guidance on a space ship, you don't *want* lots of features. You want *one* feature - getting from point A to point B on the right route. The more parts and code you throw at that problem, the more likely it is that the guidance will fail. We have bloated software because people want all kinds of features that they will never use. How many features of of Word do you actually *use*. If you stripped it down to that, I'd bet it would crash a whole lot less...
Go Badgers! -- #include "std/disclaimer.h"
A Google search found this site. It lists all the commands and has an ASCII drawing of the display.
Life is a psychology experiment gone awry.
Uh... like it matters YES. *MASS* my friend. Weightlessness doesn't mean masslessness. You may not have to "hold" up a heavy suit, but you do have to move it.
You might want to know your stuff...
If you don't have anything nice to say, say it often.
- Ed the Sock
Yes, they should have used GOSUB, they'd have stood a much better chance of RETURN'ing.
Oh, come on! Everyone knows the moon landings were faked .
Burn Hollywood Burn
"He then manually landed the craft, with only 4 seconds of fuel remaining on touchdown"
I believe that was 64 seconds of fuel, with 60 seconds being needed to orient the descent module and fire the ascent module engine for a successful abort. The real question is whether Armstrong would have eaten into that 60 seconds to land. On the records he has always said no...
sPh
Not written about software (or computers), but equally applicable:
That explains why Microsoft software (and indeed most software) will never reach perfection. It's not even their objective.
Today the art of making every byte of memory (and every gate of hardware) is nearly lost. It's still sometimes seen in very cost-sensitive embedded systems. But even there, in recent years there's been a tendency in recent years to say "screw it, let's just put in another 128K of flash memory and a faster processor."
My day job involves embedded systems with fast RISC processors and hundreds of megabytes of RAM. There are occasional challenges, and I do take pride in my work, but when there are no resource limits it's just not fundamentally that interesting.
In my spare time, I prefer to try to wring the "impossible" out of tiny microcontrollers:
To someone who doesn't understand the concept of doing the most work with the least resources, none of these projects probably seem exceptional. But they were much more satisfying to develop than anything I ever do at a day job.
In the old days, the only alternative to doing things cleverly was not to do them at all. If the engineers at Draper had been less clever in how they designed the AGC, the Apollo program might have had to be delayed by several years. The AGC is one of the finest examples of computer engineering (both hardware and software) ever. I imagine that some of the disparaging comments about how primitive it was (i.e., that it was obsolete at launch) were from people who either were trying to be funny, or have no conception of system design.
Start DL'ing the source and hack some
rockets.
Vam
Yeah, but can it guide a missle as well as a PlayStation 2? Saddam wants to know...
When encryption is outlawed, ?o'AZ-,++o+i++##4AoA+-/-C++bI+/.+~
The current issue of Amerian Scientist has an
article about a British meterologist who conducted
the first finite-difference weather prediction
calculation in the 1920s using a room full of
people with adding machines. The motive for this
was there were a few very dense measurements
of weather data during the Great War,
and Prof. Richardson wanted to see if it was predictable.
Richard Feymann in "Surely you aren't joking"
mentions a human calculation room for a-bomb
modeling at Los Alamos in the 1940s.
Simple, but unforgiving. You were peeking & poking directly into the computer's memory. I would hope nowadays that a little higher-level interface would be desired.
:)
Of course, if you need to patch around a bug in the software in the final few minutes before descent (which actually happened in one of the Apollo missions), there's no substitute for a good hex editor
This may seem a little startling, but what I have to say is of the utmost importance IMO, and has not been touched upon by our biased media representatives. It is a matter of scientific fact that male astronauts are better suited to the rigours of space exploration than are females. This is due to better water retention in men, better skills at navigating in 3D environments, an important skill on spacewalks, and highly superior hand-eye coordination and physical strength. Men are the clear choice for space missions.
However, there are a number of problems involved in extended space missions for men. Amongst these is the loneliness and alienation involved. For this reason, it is my belief that gay men are far better suited for long term space exploration, being used to alienation and having a number of talents that heterosexual men do not, including better interpersonal skills. They would be far less likely to suffer from depression and the decrease in performance this would cause, as they would be able to love each other while on missions. As Human Beings are the most crucial elements in any space mission, equal opportunities regulation should not apply. We should find the very best men for the job, regardless of political and social motives.
Unfortunately, NASA is beholden to the right wing Bush administration that runs our country, and so it will insist on choosing from men and women equally, without regard to performance.
If we are to have a viable space exploration program, with happy and committed astronauts, we must put what I have recomended into practice. It will do our space exploration program the world of good, and improve its success rate.
They fuck you up, your mum and dad.
--Anticipation of a New Lover's Arrival, The
In the early 90s, when the space shuttle
were using computers designed around 1980,
their specification sounded rediculously primitive, including core memory.
Some of the astronauts were carrying laptops
that were hundreds of times more powerful.
The shuttle computers have been ugraded since.
Core memory is considered more reliable than
semiconductor memory in the space radiation
environment.
The average woman astronaut, at 100 pounds, is 2/3 the weight of the average male astronaut at 150 pounds. With present day launch costs of 10,000 USD per pound, replacing a 6 person male shuttle crew with 6 females results in a cost savings of $3,000,000 dollars, or 300 extra pounds of equipment and payload. Factor in the reduced fod, water and oxygen requirements, and you might be able to loft 500 extra pounds into orbit.
Woman live longer than men, and are healthier in general. When you are talking about expeditions lasting 3+ years (ala Mars), you want the healthiest people you can going.
When you are talking about being locked in the space the size of 2 cubibles with 5 other people for 3+ years, you want low aggression, non-territorial people there, to avoid infighting and chaos. While Europe is making admirable strides towards breeding a complacent, passive population, for now, the best. most compatible crew would be woman.
However, due to the stranglehold that the caucasian patricarchy has on the space program, don't expect this to be acknowledged, or to even see more than a token amount of women in space. Pity the Israelis don't have a space program, they don't have the resources for false pride and propping up insecure males, the would go for the gusto and have woman like Golda Meir in orbit.
Thanks,
http://www.perljam.net/misc/apollo11-code.jpg
I wonder what clock speed the HAL 9000 ran at?
- passion
Incidentally, the panel from an Apollo guidance computer is in a display case in the Gates building at Stanford.
And then when you figure in the crates of KY jelly, cock rings, and "Hello Kitty" tote bags, you'd end up with a rocket that wouldn't be able to exceed the escape velocity of the moon, let alone Earth!
Yeesh. I dunno what kind of fags you hang out with.
The ones I hang out with are almost exclusively into Madonna and Men's Health magazine.
Fire and Meat. Yummy.
If the P-level hits 254 during zero-G, it could cause an explosion in the oxygen tanks. Who should I report this bug to?
I really miss the days where software development and hardware engineering was really about being clever. A lot of the work being done these days has been tainted by the Microsoft mindset: "If it's too slow, throw more CPU at it; if it's too big, throw more RAM at it." This is a luxury that we didn't always have, and it's something that I think a lot of people take for granted these days. Programmers are at their best when they take a machine with definite resource limitations and work with those limitations to develop an acceptable solution. This is, IMHO, a far more noble effort than simply throwing more resources at the problem until you've gotten to the point where the "lazy man's method" is acceptable.
I can remember years back writing some assembly code on an Apple II; I had a routine that ended up being two bytes too long to fit between Page 3 and the keyboard buffer. In order to make it fit, I ended up resorting to self-modifying code that saved three bytes. Now, you might make the argument that self-modifying code is horrible style (and you'd be right), but at the time, that didn't matter to me; what mattered was that I'd come up with a solution that worked given the limitations I was stuck with. Coming up with something like that gives a person a far greater sense of accomplishment than does a solution that was attained simply by artificially throwing more resources at the problem.
This type of mindset is for the most part dead. Oh, there are examples of it around in certain specialized arenas (for example, the current crop of Playstation 1 games has pretty much pushed that platform to its limitations.) But Moore's Law and dropping RAM prices have mandated that general software development should be quick and dirty rather than compact and elegant. And maybe, from a financial standpoint, that's how it should be; after all, it takes considerably more development time and effort (and therefore more money) to write the slickest code than it does to write acceptable code that works, given enough resources. However, that doesn't mean that we should not be able to lament the passing of the earlier era.
Finally, I should point out that I am not saying that current software developers are entirely devoid of creativity, because they're not. There are a lot of developers for a lot of different hardware platforms and operating systems that are doing some pretty cool things. I am claiming, however, that software development is rapidly becoming a field of endeavor that requires far less cleverness and wherewithall than it once did. Whether this is good or bad depends on your point of view, but I don't see how it can contribute to any increase in general software quality.
We're going down, in a spiral to the ground
Missed a few points there. 1. Modern computers are far more liable to fail in space NO MATTER what software they run. This is due to increased radiation outside the atmosphere interfering with the CPU. Even if you run Linux! This is the reason why CPUs used in space vehicles are outdated, because they have gone through a vigourous hardening and testing procedure to check their suitability to space travel. i.e. the recent computer upgrade to the Hubble involved a processor (486, wasn't it?) many years obsolete by desktop standards. But it was a specially radiation-hardened chip and so less liable to fail in space.
2. If an astronaut's laptop running email crashes, this is not a big deal. If the space shuttle's guidance computer crashes, this IS a big deal. This is why they've not upgraded the systems much over the years. This is why aerospace companies have very strict protocols of design - Rapid Application Development is NOT what they want! They want very slow and careful application development using formal methods. (IMHO, Open Source wouldn't work. Joe Hacker may be a linux whizkid but does he know about telemetry? Thrust vectors? Navigation? Do you trust him to?) The last programming problem was Ariane, as far as I know. and they fixed that by the time they launched the second one. The reason this Apollo Guidance Computer is designed like this is because it was the best they could do at the time, and as someone else commented, wasn't quite good enough as Neil Armstrong had to fly the LEM out of the programmed course to a safe landing.
Hacker: A criminal who breaks into computer systems
"Information wants to be paid"
Just think where the space program would be if a truck load of Mac Cubes, flatpanel displays, a bunch of those PPC-in-a-cdrom-size-box computers, and servers were sent back to 1955. Make sure they're loaded with Linux and all the right software, docs, etc. How much of a change would there be with a 45 year jump in computing technology?
I drank what? -- Socrates
Actualy, it didn't work.
Actually, it didwork. Armstrong left the docking radar on when the procedure said to shut it off. This consumed processing cycles which meant that not all the events could be processed in the time allotted, which meant that some very critical calculations weren't getting done. The problem wasn't in the computer, it was in the astronauts not following procedure. The program was basically a big loop which had to be executed every 'n' milliseconds, and the engineers knew how many cycles they had to burn during those 'n' milliseconds, and designed and tested the procedures and programs accordingly. Once the astronauts deviated from the procedures, they were in unknown territory.
The next Cmdr Taco duplicate will be ready soon, but subscribers can beat the rush and see it early!
They are not laptops. The laptops are only for austronauts personal use and sometimes for control of non-critical experiments
The guydance and control computers are actually almost as simple as apollo 11. They were either 804(X=8,9)or 805(X=0,1). These were the highest ones certified for NASA use at the time the shuttle was designed. There is an overall of 5 of these extremely simple systems operating commands to the valves and the engine ignition system on a voting principle. The majority gets to execute the command. The idea is that there cannot be a simultaneous triple failure. This is actually described in detail in one of the articles on the shuttle ran by Scientific American in the eighties.
Baker's Law: Misery no longer loves company. Nowadays it insists on it
http://www.sigsegv.cx/
Contrary to what you seem to believe, the laptops carried aboard the shuttle serve no 'mission critical' (per se) functions. They're just laptops like you or I use, and Windows 95 is more than adequate for the purposes they serve.
The actual guidance, life support, etc., systems run on the shuttles five redundant GPCs which, no, do not run Linux. The way in which the flight systems are coded is incredible -- every single line of code is audited dozens of times. Every single bug generates a binder of paperwork. And it's not just bureaucracy -- it works. Something like half a dozen bugs have affected the shuttle computers in the last decade.
I wouldn't trust my life to Windows, but I sure as hell wouldn't trust it to Linux either. Anyone who says that they would is either suicidal or a damn fool.
Hi, I'm a pretentious cock who will make some gay comment about ignoring AC posts here.
NASA actually brings multiple laptops for guidance computer while in orbit. Only one computer is actually needed, but since they recognize the fact that windows is instable, they have a couple more for redundancy. While one is blue-screening, another one takes control of the system.
not too shabby? did you ever a play a lunar lander from that period? that's outstanding! of course, I read the article and it doesn't say anywhere how many plays he had at it.
Alan Shepard was on Apollo 14. Alan Bean was on Apollo 12.
General Relativity: Space-time tells matter where to go; Matter tells space-time what shape to be.
The astronauts didn't follow the procedure, because the procedure was flawed. If they'd had to abort the landing, it would've taken too long to reactivate the docking radar, so it was left on. However, this wasn't taken into account in the software design, so the system failed...
Don't act like the two are the same. I can test my Linux system and fix it because I have the source. My Windoze desktop is designed to fail by registry crap out and I can never be sure when or why it will blue screen. Any test performed today is valid only today and is not an indicator of future performance. A linux box can be striped down tested and quality assured. What it does today is what it will do until the hardware fails.
Do you think the Wright brothers just lofted themselves into the air on an untried and unknown device? No they did not. They had a very good research, design and model program with wind tunnels, mock ups and the rest. Their fliers got off the ground because their behavior was as well known as possible at the time. They were not fools, they were brave men.
Friends don't help friends install M$ junk.
I got the impression that they made the decision to leave the radar on while on the mission. If there was a real problem activating the radar in time, rather than just a niggling fear that they might need to save some time in that eventuality, wouldn't they have discovered it in simulation? And if they'd simulated it, the computer would have had the same problem.
The next Cmdr Taco duplicate will be ready soon, but subscribers can beat the rush and see it early!
go north
look
You see a mailbox here.
open mailbox
Inside the mailbox is a leaflet.
take leaflet
Taken.
read leaflet
etc.
So that's how they made Zork work! I always wondered about that when I was a kid, I just assumed it was rocket science. Looks like I was right!
omega_rob
Who do these guys think they are? Every 1st year CS student knows that GOTO is considered harmful.
Let's do ourselves all a favor and never go to the moon again using a GOTO statement!
also by 2ndPersonShooter: Voices Inside My Head - The Unauthorized Autobiography
The fuel injection controller in most newish cars uses an embedded controller, usually with about 8k of ROM (most of which is lookup tables) and 256 bytes of RAM.
They are usually based on 8032 family processors, and are clocked at a stunning 12MHz.
Of course, I'm speaking for the Bosch Jetronic family, newer ones are more powerful (but not by much).
Or so it would seem, at least in the world of computing. And the scale of Apollo's computers suggests that going to the moon is predicated on will and desire, not technology.
Of course, there is something to be said for the vastness of modern computing; we don't need to spend enless hours on the minutia, giving us the luxury of focusing on "the bigger picture".
Still, I wonder what we could accomplish if we wrote put a historical level of effort into code optimization. Think of the bloat involved in Perl, Java, MFC, VB, scripting, and useless visual clutter. Sometime, bloat doesn't matter -- and sometime, the bloat is just a reflexion of laziness.
Don't get me wrong; as my father (one of the first EEs) always said: "Use the right tool for the job." While C/C++ may be my tool of choice, it isn't the best or most efficient mechanism for every problem. I think our problem is the old saw about "a man with a hammer sees every problem as a nail." We are too myopic in our view of software developemnt, and we are often too lazy to use the right tool for the job.
But I digress.
It is good for all programmers to be forced to get the most out of the least. I've been playing with my Lego Mindstorms kits, trying to build learning algorithms into limited program space, a few motors, and a couple of sensors. It's been a mind-stretching exercise, and I highly recommend such projects to programmers who want to hone their skills to a fine edge.
--
Scott Robert Ladd
Master of Complexity
Destroyer of Order and Chaos
All about me
I have to disagree with this, because I think part of any effective testing regimen is durability/lifetime testing. This is obviously something that doesn't happen very much with software testing because of all the little 'memory holes' that don't get noticed until a system 49 days old needs to be rebooted.
We're right on the verge of sending out interstellar probes. Even if you could do rapid testing by automated means (AI calculated test types, etc... ), can you be assured that your system with last for dozens or hundreds of years necessary to cross the interstellar gap at sub-c speeds?
The next Slashdot story will be ready soon, but subscribers can beat the rush and slashdot the links early!
As a straight, heterosexual male, I have been mistaken in the past for being gay, as a result of these idiotic sterotypes.
If you were mistaken for being gay by actual homosexuals, you might want to do some introspection.
As a practicing homosexual, I can assure you that what is laughably called "gaydar" is damn near infallible.
I have never once mistakenly hit on a heterosexual man - not once. Sure, sometimes I hit on latent homosexuals who were still in denial, but they've all been at the point in their lives where they were willing to expiriment.
Of course if it's women or straight men that think you're gay, you've got nothing to worry about - they can't tell worth beens.
Most of my hetero male friends think I'm straight.
--Shoeboy
Considering that today people seem to want to throw the latest technologies at every tiny little problem they encounter the fact that the Apollo 11 worked is a testament to the fact that more is not always better, and that complexity brings its own problems.
Unfortunately, it seems as though people have gotten used to the idea that they require the latest technology, the latest "innovations" in order to be successful and cool. Hence the market for shoddy products that are rushed out quickly to customers, who can be guaranteed to solve their problems by getting the next release because it's newer and therefore superior.
Whereas this machine, so simple compared to even the simplest of embedded processors today, did what it was supposed to, and did it well. Today, we see all kinds of computer problems due to technology being thrown at projects as a miracle cure without considering what is actually required! Just look at the Navy's debacle with NT for a prime example.
Well done /. We need more stories to remind us that more technology isn't always good. Remember, 90% of everything is crap, and technology is no exception.
Part of the beauty of this old, seemingly useless system was that it was simply designed, and almost perfectly optimized for the task.
Now we have astronauts taking laptops into space and using MS software for email and networking while on board. The testing cycles for all this software is long because all faults have to be eliminated, but the simple fact remains that computer and software designs are becoming so complex that in the very near future, if not already, they are too complex for use in the space program.
Hunting down a bug in a 100000 lines of code is one thing. Hunting down a bug and all the other bugs it causes in 4 million lines? NASA has already faced this problem, because they use Win 95 laptops. How about 10 million lines. How about 20 M?
What about the computer processors that run the space shuttles. Frankly, they're all old technology, because upgrading to the newer stuff is just too damned dangerous. If the video processor that powers your HUD guidance systems crashes because of an obscure hardware bug that occurs only in freefall, you're screwed.
Personally, I think that this sort of complexity is going to become the limiting factor in the advancement of technology. A point will come in the very near future when systems, be they processors or OS's, become so complex that the testing time necessary for critical use makes rapid development unprofitable.
The next Slashdot story will be ready soon, but subscribers can beat the rush and slashdot the links early!
I'm sure that if I was an astronaut I'd prefer the relative comfort and ease of use and reliability of modern ships compared to Apollo but there's something to be said for the single mindedness of that earlier gear. There was abolutetly NOTHING extra in that box, nada. I spent my formative years designing computational algorithms expressedly for limited resource, slow clock machines. The design goal specifically was "do xxxxxx in 25 ticks or less and using less than x K memory". It puts the fun back into orbital mechanics. By comparison I doubt you could run the diagnostic system that checks the indicator status lights on the space shuttle with one. Nor would you want to either.
Just one correction to an informative post -- right astronaut, wrong mission: Alan Shepard was on Apollo 14.
"Ground control, wtf are you doing the clocks only on 5 and we're off the ground."
The good news was Windows couldn't run on it.
To the astronauts, the DSKY was the GNC; the GNC really was just a box stowed in the Lower Equipment Bay.
The interface was so good, it was subsequently used on the F-8 fighter prototype. For more on the DSKY, see:
http://www.dfrc.nasa.gov/gallery/photo/F-8DFBW/HTM L/EC96-43408-1.html
To see it in action, watch the "From the Earth to the Moon" series from HBO. Most local video stores have 'em. The Apollo 12 one was my favorite for seeing the DSKY in action, when Al Sheppard helped upload new code (IN FLIGHT) to ignore a flakey ABORT button.
Best to ya,
Quantum Hack
http://www.hamhud.net
www.backwoodsengineer.com
Emulating this will be sweet and elite. The only problem is the 70 lbs box. Hurm...I bet if I strap together four old metal computer cases that will way nearly 70 lbs! Rock on!
Hey...its the only thing I could think of besides saying "Can you imagine a Beowulf cluster of these things?"
Why not send dwarves/midgets? They're even smaller! You could build smaller vehicles, smaller spacesuits, pack less food, etc.
Send Mini-Me to Mars!
---
When in danger or in doubt, run in circles, scream and shout. --Robert A. Heinlein
For this reason, it is my belief that gay men are far better suited for long term space exploration,
Are you kidding? The Madonna CDs alone would make the launch weight prohibitive!
Fire and Meat. Yummy.