This is the code in the Apollo Guidance Computer for Apollo 11.

It's part of the LUMINARY sofware, which ran on the AGC on the Lunar Module. It's meant to check if the landing radar is pointed toward the lunar surface - because the LM went through several orientations, the landing radar could be pointed to the front or the side or down. You're landing on the Moon. Point it down.

Point is, you have to verify user input. Even if your users are the most meticulous and highly trained individuals in history. You have to see if they're lying. So you get to the BURNBABY.

Browse the code in GitHub - this code is in THE_LUNAR_LANDING.agc

all 34 comments

sorted by: hot top controversial new old
[–] 68 points 5 months ago (4 children)

in case anyone is curious, those comments are not a modern addition. They are a faithful reproduction of the original scanned copy of the code. Scan of Page 789 of Luminary099

  • source
  • hideshow 4 child comments
  • [–] 23 points 5 months ago (3 children)

    Ima be honest, I have no idea wtf I'm looking at

  • source
  • parent
  • hideshow 3 child comments
  • [–] 14 points 5 months ago (2 children)

    I know people hate AI, but I fed the OP pic to Claude and asked it to explain the code and maybe gice modern comparisons to something like Python.


    This is AGC (Apollo Guidance Computer) assembly code from the lunar module's landing radar routines. Let me walk through it:


    P63SPOT3 — "Is the antenna in position yet?"

    CA   BIT6
    EXTEND
    RAND CHAN33
    EXTEND
    BZF  P63SPOT4
    

    Reads a hardware channel (CHAN33) to check the state of the landing radar antenna. BZF means "Branch if Zero" — if the antenna bit is already set, skip ahead.

    if radar_channel_33 & BIT6 == 0:
        goto("P63SPOT4")
    

    "Nope, not there yet — bug the astronaut"

    CAF  CODE500
    TC   BANKCALL
    CADR GOPERF1
    

    Loads error code 500 and calls GOPERF1 — this triggers a crew alert, literally asking the astronaut to manually crank the antenna into position. The comment says it all: "PLEASE CRANK THE SILLY THING AROUND"

    display_alert(code=500, message="Antenna not in position, please fix manually")
    await_crew_response()
    

    "Did they fix it or bail?"

    TCF  GOTOPOOH  # TERMINATE
    TCF  P63SPOT3  # PROCEED — SEE IF HE'S LYING
    

    Two possible outcomes: crew hits terminate (GOTOPOOH — yes, really), or hits proceed and the code loops back to P63SPOT3 to check again. "See if he's lying" is the actual comment, meaning: verify they actually moved it.

    if crew_pressed == "terminate":
        goto("GOTOPOOH")
    else:
        goto("P63SPOT3")  # trust but verify
    

    P63SPOT4 — "Okay, antenna's good, initialize radar"

    TC   BANKCALL
    CADR SETPOS1
    

    Calls SETPOS1 to initialize the landing radar into position 1.

    bankcall(SETPOS1)  # configure radar for landing approach
    

    "And we're off"

    TC   POSTJUMP
    CADR BURNBABY
    

    BURNBABY. That's the actual name of the burn routine. Jumps to the powered descent initiation — the engine ignition sequence for landing.

    goto("BURNBABY")  # 🔥 start the descent burn
    

    The whole thing is basically: check hardware → nag human if needed → loop until fixed → initialize systems → light the engine. Written by people with a great sense of humor under enormous pressure, in 4KB of RAM.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 40 points 5 months ago (14 children)

    Love that the termination routine is GOTOPOOH and the next step is BURNBABY

  • source
  • hideshow 14 child comments
  • [–] [S] 41 points 5 months ago (13 children)

    GOTOPOOH was actually jargon for Program 00 (Hex), which was (I think?) the AGC's normal idle routine.

    BURNBABY was an alias for BURN_BABY_BURN which was the lunar descent burn sequence. Or something. I wouldn't have named it that.

  • source
  • parent
  • hideshow 13 child comments
  • [–] 14 points 5 months ago* (12 children)

    P00H is hilarious.

    Poop.

    The end of all food, yet also, the beginning of all food.

    Poop is the true neutral ground state from whence all emerges and all returns to.

    ... genuienly an incredible name for the idle loop, I am in awe.

    I did not think Maggie Hamilton could be more legendary, but somehow, she is. Damn.

  • source
  • parent
  • hideshow 12 child comments
  • [–] 12 points 5 months ago (10 children)

    It’s also something we left on the moon. Bags and bags of it, along with empty food containers and their moonwalking backpacks. It’s not like it’s worth it to haul it back to orbit.

  • source
  • parent
  • hideshow 10 child comments
  • [–] 7 points 5 months ago

    So this is what the Seminal Theory is about. It's not a meteor or some shit that crashed into the earth from far away.

    It was just actual shit left behind by visitors. That's us. We're alien shit.

  • source
  • parent
  • [–] 5 points 5 months ago (8 children)

    I wonder if that shit is something approximating a fossil, currently.

    Presumably the radiation would have killed all the fecal bacteria pretty quickly... hell ... would the plastic bags have degraded as well?

  • source
  • parent
  • hideshow 8 child comments
  • [–] 9 points 5 months ago (7 children)

    It has been exposed to 336 hours of continuous unfiltered sunlight each lunar day for the past 40+ years. That’s can’t be good for the plastic. The poo is probably dedicated, but I don’t think it’d be fossilized, in the sense of biological material replaced with stone, I don’t think the moon is geologically active enough for that to happen.

  • source
  • parent
  • hideshow 7 child comments
  • [–] 7 points 5 months ago (4 children)

    Is there... a word... for... 'exposed to the void of space for a prolonged period of time'?

    Yeah I know fossilized isn't the right word, as thats generally a process that requires water... but i dont know how to say 'space fossilized'.

    Dehydrated and Irradiated ... ?

  • source
  • parent
  • hideshow 4 child comments
  • [–] 5 points 5 months ago (3 children)
  • [–] 2 points 5 months ago (2 children)

    I was going to rejoinder this with a quip about 'presumably neither shaken nor stirred', but given that this was clever enough to stunlock me for ~12 hrs, I guess just 'bravo!'

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 5 months ago* (last edited 5 months ago) (1 child)

    I think the poop bags were mainly stowed into lockers on the sides of the descent module. They're not just piled up on the ground.

    Edit: Correction. This research suggests that the procedure was to "jettison" the "waste receptacle," containing any sealed poop bags, food wrappers, and other trash. "Jettison" definitely sounds more like tossing stuff out the door.

    I also want to point out that maybe 96 bags were provisioned and left. But almost certainly most of those remained empty. Pooping into a bag in the LM in close proximity to your colleague is not an easy or pleasant experience. Astronauts had access to lomotil and they were conditioned on what NASA called a "low residue diet" for the entire duration of the flight and pre-flight quarantine. The early flights were on the surface for less than 24 hours. So there was a lot of opportunity and incentive to just avoid having a bowel movement on the moon.

    There's also a radio transcript from Apollo 16 that suggests that, on that flight, this material was transferred off the returning LM back onto CM and presumably returned to Earth.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 66 points 5 months ago (7 children)

    Sanitizing user input for the Moon landings.

    Meanwhile in 2026, ask AI to change an authentication phone number and it says, "Sure thing!" And is ABLE to do it.

  • source
  • hideshow 7 child comments
  • [–] 12 points 5 months ago (5 children)

    I don't understand what this comment is meant to convey. Could you explain a bit further?

  • source
  • parent
  • hideshow 5 child comments
  • [–] 10 points 5 months ago (3 children)

    The first one insisted to make sure one of the most competent human beings who ever existed oriented a thing downward in order to not die during a very well-rehearsed procedure.

    The second one is a reference to social media companies “outsourcing” support to chatbots with no intelligence and plenty of control, allowing people to prompt said chatbots into giving them other people’s accounts.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 4 points 5 months ago (2 children)

    I knew I should've waited until I hadn't just woken up before trying to understand the comment. 😆

  • source
  • parent
  • hideshow 2 child comments
  • [–] 4 points 5 months ago (1 child)

    I'll take the blame, I shortened the statements maybe a bit too much, assuming the references would work. But they were explained well by the other replies.

    I was learning in the 90s from lessons on AOL how to sanitize inputs and salt passwords along with HTML 1.0. It baffles me how corporations let stupid things happen now.

  • source
  • parent
  • hideshow 1 child comment
  • load more comments (-1 replies)
  • [–] 26 points 5 months ago

    PLEASE CRANK THE SILLY THING AROUND should not be as hilarious as it is

  • source
  • [+] 12 points 5 months ago* (1 child)
  • [–] 6 points 5 months ago (1 child)

    TCF = Terminate and Catch Fire?

  • source
  • hideshow 1 child comment