Source Code
These source code files are an attempted reconstruction of Sundance revision 306, the Apollo 9
LM (Lunar Module) AGC (Apollo Guidance Computer) flight software, created from binary dumps of
original core rope program modules, as follows:
|
031027,000002: ## Copyright: Public domain.
031028,000003: ## Filename: THE_LUNAR_LANDING.agc
031029,000004: ## Purpose: A section of an attempt to reconstruct Sundance revision 306
031030,000005: ## as closely as possible with available information. Sundance
031031,000006: ## 306 is the source code for the Lunar Module's (LM) Apollo
031032,000007: ## Guidance Computer (AGC) for Apollo 9. This program was created
031033,000008: ## using the mixed-revision SundanceXXX as a starting point, and
031034,000009: ## pulling back features from Luminary 69 believed to have been
031035,000010: ## added based on memos, checklists, observed address changes,
031036,000011: ## or the Sundance GSOPs.
031037,000012: ## Assembler: yaYUL
031038,000013: ## Contact: Ron Burkey <info@sandroid.org>.
031039,000014: ## Website: www.ibiblio.org/apollo/index.html
031040,000015: ## Mod history: 2020-07-24 MAS Created from SundanceXXX.
031041,000016:
031042,000017:
031043,000018:
031044,000019: 32,2711 BANK 32
031045,000020: 32,2000 SETLOC F2DPS*32
031046,000021: 32,2000 BANK
031047,000022:
031048,000023: 32,2711 E7,1606 EBANK= E2DPS
031049,000024:
031050,000025: # ****************************************
031051,000026: # P63: THE LUNAR LANDING, BRAKING PHASE
031052,000027: # ****************************************
031053,000028:
031054,000029: 32,2711 COUNT* $$/P63
031055,000030:
031056,000031: 32,2711 05423 P63LM TC PHASCHNG
031057,000032: 32,2712 04024 OCT 04024
031058,000033:
031059,000034: 32,2713 04655 TC BANKCALL # DO IMU STATUS CHECK ROUTINE R02
031060,000035: 32,2714 11067 CADR R02BOTH
031061,000036:
031062,000037: 32,2715 33134 CAF P63ADRES # INITIALIZE WHICH FOR BURNBABY
031063,000038: 32,2716 55430 TS WHICH
031064,000039:
031065,000040: 32,2717 33135 CAF IGNADRES # INITIALIZE WCHPHASE AND FLPASSO
031066,000041: 32,2720 22007 ZL # FOR IGNITION ALGORITHM
031067,000042: 32,2721 53607 DXCH WCHPHASE
031068,000043:
031069,000044:
031070,000045: 32,2722 06014 FLAGORGY TC INTPRET # DIONYSIAN FLAG WAVING
031071,000046: 32,2723 43014 CLEAR CLEAR
031072,000047: 32,2724 02663 NOTHROTL
031073,000048: 32,2725 02671 3AXISFLG
031074,000049: 32,2726 43014 CLEAR CLEAR
031075,000050: 32,2727 00264 VINHFLG
031076,000051: 32,2730 00676 HINHFLG
031077,000052: 32,2731 43014 SET SET
031078,000053: 32,2732 03464 SWANDISP
031079,000054: 32,2733 03067 MUNFLAG
031080,000055:
031081,000056: # ****************************************
031082,000057:
031083,000058: 32,2734 77201 IGNALG1 SETPD VLOAD # FIRST SET UP INPUTS FOR RP-TO-R:-
031084,000059: 32,2735 00001 0 # AT 0D LANDING SITE IN MOON FIXED FRAME
031085,000060: 32,2736 02025 RLS # AT 6D ESTIMATED TIME OF LANDING
031086,000061: 32,2737 41525 PDDL PUSH # MPAC NON-ZERO TO INDICATE LUNAR CASE
031087,000062: 32,2740 02021 TLAND
031088,000063: 32,2741 37612 STCALL TPIP # ALSO SET TPIP FOR FIRST GUIDANCE PASS
031089,000064: 32,2742 51222 RP-TO-R
031090,000065: 32,2743 64312 VSL4 MXV
031091,000066: 32,2744 01736 REFSMMAT
031092,000067: 32,2745 17630 STODL LAND
031093,000068: 32,2746 02021 TLAND
031094,000069: 32,2747 77625 DSU
031095,000070: 32,2750 25140 GUIDDURN
031096,000071: 32,2751 34041 STCALL TDEC1 # INTEGRATE STATE FORWARD TO THAT TIME
031097,000072: 32,2752 27030 LEMPREC
031098,000073: 32,2753 64375 VLOAD MXV
031099,000074: 32,2754 23672 WMREF
031100,000075: 32,2755 01736 REFSMMAT
031101,000076: 32,2756 17622 STODL WM
031102,000077: 32,2757 23672 WMREF
031103,000078: 32,2760 03656 STORE NIGNLOOP
031104,000079: 32,2761 03636 STORE TTF/8
031105,000080:
031106,000081: 32,2762 77745 IGNALOOP DLOAD
031107,000082: 32,2763 00015 TAT
031108,000083: 32,2764 25234 STOVL PIPTIME
031109,000084: 32,2765 00025 VATT1
031110,000085: 32,2766 01543 STORE VCV
031111,000086: 32,2767 74521 MXV VSR1
031112,000087: 32,2770 01736 REFSMMAT
031113,000088: 32,2771 27504 STOVL V
031114,000089: 32,2772 00017 RATT1
031115,000090: 32,2773 01535 STORE RCV
031116,000091: 32,2774 64312 VSL4 MXV
031117,000092: 32,2775 01736 REFSMMAT
031118,000093: 32,2776 37476 STCALL R
031119,000094: 32,2777 67203 MUNGRAV
031120,000095: 32,3000 35236 STCALL GDT/2
031121,000096: 32,3001 62474 ?GUIDSUB # WHICH DELIVERS N PASSES OF GUIDANCE
031122,000097:
031123,000098: # DDUMCALC IS PROGRAMMED AS FOLLOWS:-
031124,000099: # 2 -
031125,000100: # (RIGNZ - RGU )/16 + 16(RGU )KIGNY/B8 + (RGU - RIGNX)KIGNX/B4 + (ABVAL(VGU) - VIGN)KIGNV/B4
031126,000101: # 2 1 0
031127,000102: # DDUM = -------------------------------------------------------------------------------------------
031128,000103: # 10
031129,000104: # 2 (VGU - 16 VGU KIGNX/B4)
031130,000105: # 2 0
031131,000106: # THE NUMERATOR IS SCALED IN METERS AT 2(28). THE DENOMINATOR IS A VELOCITY IN UNITS OF 2(10) M/CS.
031132,000107: # THE QUOTIENT IS THUS A TIME IN UNITS OF 2(18) CENTISECONDS. THE FINAL SHIFT RESCALES TO UNITS OF 2(28) CS.
031133,000108: # THERE IS NO DAMPING FACTOR. THE CONSTANTS KIGNX/B4, KIGNY/B8 AND KIGNV/B4 ARE ALL NEGATIVE IN SIGN.
031134,000109:
031135,000110: 32,3002 45345 DDUMCALC DLOAD DSU # FORM DENOMINATOR FIRST
031136,000111: 32,3003 25150 RIGNZ
031137,000112: 32,3004 03536 RGU +4
031138,000113: 32,3005 63525 PDDL DSQ
031139,000114: 32,3006 03534 RGU +2
031140,000115: 32,3007 65275 DMPR PDDL
031141,000116: 32,3010 25154 KIGNY
031142,000117: 32,3011 03532 RGU
031143,000118: 32,3012 56225 DSU DDV
031144,000119: 32,3013 25146 RIGNX
031145,000120: 32,3014 25152 1/KIGNX
031146,000121: 32,3015 51515 PDVL ABVAL
031147,000122: 32,3016 03614 VGU
031148,000123: 32,3017 57225 DSU DMPR
031149,000124: 32,3020 25144 VIGN
031150,000125: 32,3021 25156 KIGNV
031151,000126: 32,3022 43215 DAD DAD
031152,000127: 32,3023 44415 DAD SR4R
031153,000128: 32,3024 54271 DDV SRR
031154,000129: 32,3025 03620 VGU +4
031155,000130: 32,3026 21615 12D
031156,000131:
031157,000132: 32,3027 43206 PUSH DAD
031158,000133: 32,3030 01234 PIPTIME
031159,000134: 32,3031 14041 STODL TDEC1 # STORE NEW GUESS FOR NEXT INTEGRATION
031160,000135: 32,3032 45246 ABS DSU
031161,000136: 32,3033 25142 DDUMCRIT
031162,000137: 32,3034 45040 BMN CALL
031163,000138: 32,3035 65051 DDUMGOOD
031164,000139: 32,3036 27362 INTSTALL
031165,000140: 32,3037 43014 SET SET
031166,000141: 32,3040 01473 INTYPFLG
031167,000142: 32,3041 00063 MOONFLAG
031168,000143: 32,3042 71214 CLEAR DLOAD
031169,000144: 32,3043 00262 MIDFLAG
031170,000145: 32,3044 01234 PIPTIME
031171,000146: 32,3045 35517 STCALL TET
031172,000147: 32,3046 27060 INTEGRVS
031173,000148: 32,3047 77650 GOTO
031174,000149: 32,3050 64762 IGNALOOP
031175,000150:
031176,000151: 32,3051 45345 DDUMGOOD DLOAD DSU
031177,000152: 32,3052 00041 TDEC1
031178,000153: 32,3053 03421 ZOOMTDP
031179,000154: 32,3054 27425 STOVL TIG # COMPUTE DISTANCE LANDING SITE WILL BE
031180,000155: 32,3055 03476 R # OUT OF LM'S ORBITAL PLANE AT IGNITION:
031181,000156: 32,3056 53435 VXV UNIT # SIGN IS + IF LANDING SITE IS TO THE
031182,000157: 32,3057 03504 V # RIGHT, NORTH; - IF TO THE LEFT, SOUTH.
031183,000158: 32,3060 72441 DOT SL1
031184,000159: 32,3061 03630 LAND
031185,000160: 32,3062 26427 R60INIT STOVL OUTOFPLN # INITIALIZATION FOR CALCMANU
031186,000161: 32,3063 03250 UNFC/2
031187,000162: 32,3064 25256 STOVL POINTVSM
031188,000163: 32,3065 06231 UNITX
031189,000164: 32,3066 01250 STORE SCAXIS
031190,000165: 32,3067 77776 EXIT
031191,000166: # ****************************************
031192,000167:
031193,000168: 32,3070 05423 IGNALGRT TC PHASCHNG # PREVENT REPEATING IGNALG
031194,000169: 32,3071 04024 OCT 04024
031195,000170:
031196,000171: 32,3072 04655 TC BANKCALL
031197,000172: 32,3073 75053 CADR GOASTCLK
031198,000173:
031199,000174: 32,3074 35746 CAF OCT14
031200,000175: 32,3075 04655 TC BANKCALL
031201,000176: 32,3076 20532 CADR GOPERF1
031202,000177: 32,3077 14106 TCF GOTOPOOH
031203,000178: 32,3100 13102 TCF P63SPOT2
031204,000179: 32,3101 13106 TCF +5
031205,000180:
031206,000181: 32,3102 06014 P63SPOT2 TC INTPRET
031207,000182: 32,3103 77624 CALL
031208,000183: 32,3104 30317 R51
031209,000184: 32,3105 77776 EXIT
031210,000185:
031211,000186: 32,3106 00004 INHINT
031212,000187: 32,3107 04737 TC IBNKCALL
031213,000188: 32,3110 40223 CADR PFLITEDB
031214,000189: 32,3111 00003 RELINT
031215,000190:
031216,000191: 32,3112 04655 TC BANKCALL
031217,000192: 32,3113 54103 CADR R60LEM
031218,000193:
031219,000194: 32,3114 05423 TC PHASCHNG # PREVENT RECALLING R60
031220,000195: 32,3115 04024 OCT 04024
031221,000196:
031222,000197: 32,3116 35021 P63SPOT3 CA BIT6 # IS THE LR ANTENNA IN POSITION 1 YET
031223,000198: 32,3117 00006 EXTEND
031224,000199: 32,3120 02033 RAND CHAN33
031225,000200: 32,3121 00006 EXTEND
031226,000201: 32,3122 13130 BZF P63SPOT4 # BRANCH IF ANTENNA ALREADY IN POSITION 1
031227,000202:
031228,000203: 32,3123 33136 CAF CODE500 # ASTRONAUT: PLEASE CRANK THE
031229,000204: 32,3124 04655 TC BANKCALL # SILLY THING AROUND
031230,000205: 32,3125 20532 CADR GOPERF1
031231,000206: 32,3126 14106 TCF GOTOPOOH # TERMINATE
031232,000207: 32,3127 13116 TCF P63SPOT3 # PROCEED SEE IF HE'S LYING
031233,000208:
031234,000209: 32,3130 04655 P63SPOT4 TC BANKCALL # ENTER INITIALIZE LANDING RADAR
031235,000210: 32,3131 67670 CADR SETPOS1
031236,000211:
031237,000212: 32,3132 04674 TC POSTJUMP # OFF TO SEE THE WIZARD ...
031238,000213: 32,3133 74133 CADR BURNBABY
031239,000214:
031240,000215: # ----------------------------------------
031241,000216:
031242,000217: # CONSTANTS FOR P63LM AND IGNALG
031243,000218:
031244,000219: 32,3134 02061 P63ADRES GENADR P63TABLE
031245,000220:
031246,000221: 32,3135 02417 IGNADRES GENADR IGNALG
031247,000222:
031248,000223: 32,3136 00500 CODE500 OCT 00500
031249,000224:
031250,000225: 32,3137 00003 26600 GUIDDURN 2DEC +60800 B-28
031251,000226: 32,3141 00000 00024 DDUMCRIT 2DEC +20 B-28 # CRITERION FOR IGNALG CONVERGENCE
031252,000227:
031253,000228: 32,3143 00417 16641 VIGN 2DEC* +1.69664345 E+1 B-10*
031254,000229: 32,3145 77736 63511 RIGNX 2DEC* -3.41873750 E+4 B-24*
031255,000230: 32,3147 77126 65060 RIGNZ 2DEC* -4.35548938 E+5 B-24*
031256,000231: 32,3151 71463 46314 1/KIGNX 2DEC* -1.99999999 E-1 B+0*
031257,000232: 32,3153 77777 74571 KIGNY 2DEC* -0.02430170 E-6 B+8*
031258,000233: 32,3155 76647 77777 KIGNV 2DEC -384 E2 B-20
031259,000234:
031260,000235: # ----------------------------------------
031261,000236:
031262,000237: # ****************************************
031263,000238: # LANDING CONFIRMATION
031264,000239: # ****************************************
031265,000240:
031266,000241: 31,2000 BANK 31
031267,000242: 31,2000 SETLOC F2DPS*31
031268,000243: 31,2000 BANK
031269,000244:
031270,000245: 31,2000 COUNT* $$/P6567
031271,000246:
031272,000247: 31,2000 05566 LANDJUNK TC UPFLAG
031273,000248: 31,2001 00175 ADRES FLUNDISP
031274,000249: 31,2002 03562 TC FASTCHNG
031275,000250: 31,2003 05423 TC PHASCHNG
031276,000251: 31,2004 00005 OCT 00005
031277,000252:
031278,000253: 31,2005 00004 INHINT
031279,000254: 31,2006 04737 TC IBNKCALL
031280,000255: 31,2007 75561 CADR ENGINOF3
031281,000256:
031282,000257: 31,2010 05566 TC UPFLAG
031283,000258: 31,2011 22371 CADR LRBYPASS
031284,000259:
031285,000260: 31,2012 06014 TC INTPRET # TO INTERPRETIVE AS TIME IS NOT CRITICAL
031286,000261: 31,2013 72234 RTB TLOAD
031287,000262: 31,2014 30653 RDCDUS
031288,000263: 31,2015 00002 1D
031289,000264: 31,2016 03233 STORE CDUXD
031290,000265: 31,2017 43014 SET SET
031291,000266: 31,2020 04067 SURFFLAG
031292,000267: 31,2021 03072 KILLROSE
031293,000268: 31,2022 43014 CLEAR CLEAR
031294,000269: 31,2023 03672 AVEGFLAG
031295,000270: 31,2024 03664 SWANDISP
031296,000271: 31,2025 72575 VLOAD VSL2
031297,000272: 31,2026 01220 RN
031298,000273: 31,2027 16034 STODL ALPHAV
031299,000274: 31,2030 01234 PIPTIME
031300,000275: 31,2031 45014 SET CALL
031301,000276: 31,2032 01463 LUNAFLAG
031302,000277: 31,2033 26323 LAT-LONG
031303,000278: 31,2034 77201 SETPD VLOAD # COMPUTE RLS AND STORE IT AWAY
031304,000279: 31,2035 00001 0
031305,000280: 31,2036 01220 RN
031306,000281: 31,2037 65352 VSL2 PDDL
031307,000282: 31,2040 01234 PIPTIME
031308,000283: 31,2041 45006 PUSH CALL
031309,000284: 31,2042 51247 R-TO-RP
031310,000285: 31,2043 02025 STORE RLS
031311,000286: 31,2044 77776 EXIT
031312,000287: 31,2045 32062 CAF V06N43* # ASTRONAUT: NOW LOOK WHERE YOU ENDED UP
031313,000288: 31,2046 04655 TC BANKCALL
031314,000289: 31,2047 20406 CADR GOFLASH
031315,000290: 31,2050 14106 TCF GOTOPOOH # TERMINATE
031316,000291: 31,2051 12053 TCF +2 # PROCEED
031317,000292: 31,2052 12045 TCF -5 # RECYCLE
031318,000293:
031319,000294: 31,2053 32063 CAF OCT501
031320,000295: 31,2054 04655 TC BANKCALL
031321,000296: 31,2055 20532 CADR GOPERF1
031322,000297: 31,2056 14106 TCF GOTOPOOH
031323,000298: 31,2057 12061 TCF +2
031324,000299: 31,2060 12053 TCF -5
031325,000300:
031326,000301: 31,2061 14106 TCF GOTOPOOH # ASTRONAUT: PLEASE SELECT P57
031327,000302:
031328,000303: 31,2062 01453 V06N43* VN 0643
031329,000304: 31,2063 00501 OCT501 OCT 501
031330,000305: 31,2064 00071 OCT71 OCT 71
031331,000306:
031332,000307: # ****************************************
031333,000308: # LANDING TEST PROGRAM
031334,000309: # ****************************************
031335,000310:
031336,000311: 31,2065 32234 LANDTEST CA VERTADR
031337,000312: 31,2066 55606 TS WCHPHASE
031338,000313: 31,2067 55607 TS FLPASS0
031339,000314: 31,2070 55656 TS WCHVERT
031340,000315:
031341,000316: 31,2071 06014 TC INTPRET
031342,000317: 31,2072 64375 VLOAD MXV
031343,000318: 31,2073 23672 WMREF
031344,000319: 31,2074 01736 REFSMMAT
031345,000320: 31,2075 17622 STODL WM
031346,000321: 31,2076 35122 LUNLANAD
031347,000322: 31,2077 25253 STOVL AVEGEXIT
031348,000323: 31,2100 03532 RGU
031349,000324: 31,2101 74256 UNIT VXSC
031350,000325: 31,2102 22167 LANDSCAL
031351,000326: 31,2103 03630 STORE LAND
031352,000327: 31,2104 43046 ABVAL SET
031353,000328: 31,2105 03470 IDLEFLAG
031354,000329: 31,2106 26023 STOVL /LAND/
031355,000330: 31,2107 06231 UNITX
031356,000331: 31,2110 26401 STOVL CG
031357,000332: 31,2111 06227 UNITY
031358,000333: 31,2112 26407 STOVL CG +6
031359,000334: 31,2113 06225 UNITZ
031360,000335: 31,2114 02415 STORE CG +12D
031361,000336: 31,2115 47014 SET RTB
031362,000337: 31,2116 03067 MUNFLAG
031363,000338: 31,2117 21454 LOADTIME
031364,000339: 31,2120 03612 STORE TPIP
031365,000340: 31,2121 77776 EXIT
031366,000341:
031367,000342: 31,2122 00004 INHINT
031368,000343: 31,2123 35026 CAF ONE
031369,000344: 31,2124 05252 TC WAITLIST
031370,000345: 31,2125 E7,1472 EBANK= DVCNTR
031371,000346: 31,2125 02000 66067 2CADR PREREAD
031372,000347:
031373,000348: 31,2127 35012 CAF BIT13
031374,000349: 31,2130 00006 EXTEND
031375,000350: 31,2131 02011 RAND DSALMOUT
031376,000351: 31,2132 10000 CCS A
031377,000352: 31,2133 12144 TCF TSTENGON
031378,000353:
031379,000354: 31,2134 04737 TC IBNKCALL
031380,000355: 31,2135 74647 CADR ONULLAGE
031381,000356:
031382,000357: 31,2136 35052 CAF 3SECS
031383,000358: 31,2137 05243 TC TWIDDLE
031384,000359: 31,2140 02155 ADRES TESTIGN
031385,000360:
031386,000361: 31,2141 35054 CAF LOW9
031387,000362: 31,2142 04655 TC BANKCALL
031388,000363: 31,2143 01732 CADR DELAYJOB
031389,000364:
031390,000365: 31,2144 00004 TSTENGON INHINT
031391,000366: 31,2145 45017 CS DRIFTBIT
031392,000367: 31,2146 71102 MASK DAPBOOLS
031393,000368: 31,2147 55102 TS DAPBOOLS
031394,000369:
031395,000370: 31,2150 35030 CAF ZERO
031396,000371: 31,2151 55607 TS FLPASS0
031397,000372:
031398,000373: 31,2152 32170 CAF TESTDB
031399,000374: 31,2153 55356 TS DB
031400,000375: 31,2154 15225 TCF ENDOFJOB
031401,000376:
031402,000377: 31,2155 44367 TESTIGN CS PRIO30
031403,000378: 31,2156 00006 EXTEND
031404,000379: 31,2157 02011 RAND DSALMOUT
031405,000380: 31,2160 65012 AD BIT13
031406,000381: 31,2161 00006 EXTEND
031407,000382: 31,2162 01011 WRITE DSALMOUT
031408,000383: 31,2163 05566 TC UPFLAG
031409,000384: 31,2164 00123 ADRES ENGONFLG
031410,000385: 31,2165 15331 TCF TASKOVER
031411,000386:
031412,000387: 31,2166 06502 26500 LANDSCAL 2DEC 0.207196475
031413,000388: 31,2170 00554 TESTDB DEC 0.02222
End of include-file THE_LUNAR_LANDING.agc. Parent file is MAIN.agc