Source Code
These source-code files are part of a reconstructed copy of Corona 261, the
final, flown release of the Block I Command Module (CM) Apollo Guidance Computer
(AGC) software for the AS-202 mission.
They have been created via disassembly of binary dumps of the original core rope memory modules actually flown on the mission, part numbers 1003733-171, 1003733-241, 1003733-191, 1003733-211, 1003733-221, and 1003733-241. The source code for the Apollo 4 and 6 software, Solarium 55, was used as a starting point, since it was directly derived from Corona and (at least in theory) only minimally modified. Since only binary dumps (rather than listings) of Corona are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing. |
016164,000002: ## Copyright: Public domain.
016165,000003: ## Filename: INFLIGHT_ALIGNMENT_PROGRAM.agc
016166,000004: ## Purpose: A section of Corona revision 261.
016167,000005: ## It is part of the source code for the Apollo Guidance Computer
016168,000006: ## (AGC) for AS-202. No original listings of this software are
016169,000007: ## available; instead, this file was created via disassembly of
016170,000008: ## the core rope modules actually flown on the mission.
016171,000009: ## Assembler: yaYUL
016172,000010: ## Contact: Ron Burkey <info@sandroid.org>.
016173,000011: ## Website: www.ibiblio.org/apollo/index.html
016174,000012: ## Mod history: 2023-05-27 MAS Created from Solarium 55.
016175,000013:
016176,000014:
016177,000015: 22,6000 SETLOC 44000
016178,000016:
016179,000017: 22,6000 34475 SWAYSTAT CAF SIX # PROGRAM START AND INITIAL CONDITIONS
016180,000018: 22,6001 51100 TS DTCOUNT # SET DTCOUNT = 6
016181,000019: 22,6002 51101 TS DTCOUNT +1
016182,000020: 22,6003 34516 CAF ONE
016183,000021: 22,6004 51102 TS SWAYPULS # SET FIRST PIPA PULSE = +1
016184,000022: 22,6005 51103 TS SWAYPULS +1
016185,000023: 22,6006 34516 CAF ONE
016186,000024: 22,6007 02173 TC WAITLIST
016187,000025: 22,6010 44024 CADR SWAYROTY
016188,000026: 22,6011 34516 CAF ONE
016189,000027: 22,6012 61104 AD PHAZING
016190,000028: 22,6013 02173 TC WAITLIST
016191,000029: 22,6014 44017 CADR SWAYROTZ
016192,000030: 22,6015 20016 RELINT
016193,000031: 22,6016 02124 TC ENDOFJOB
016194,000032:
016195,000033:
016196,000034:
016197,000035: 22,6017 30003 SWAYROTZ XCH LP # STORE LP IN LPRUPT
016198,000036: 22,6020 30032 XCH LPRUPT
016199,000037: 22,6021 34516 CAF ONE # SET INDEX PIPSLECT FOR SELECTION OF
016200,000038: 22,6022 51111 TS PIPSLECT # PIPA TO BE INCREMENTED
016201,000039: 22,6023 06030 TC SWAYROTY +4
016202,000040:
016203,000041: 22,6024 30003 SWAYROTY XCH LP
016204,000042: 22,6025 30032 XCH LPRUPT
016205,000043: 22,6026 35501 CAF ZERO
016206,000044: 22,6027 51111 TS PIPSLECT
016207,000045:
016208,000046: 22,6030 45501 CS ZERO
016209,000047: 22,6031 21111 INDEX PIPSLECT
016210,000048: 22,6032 30045 XCH PIPAY
016211,000049: 22,6033 21111 INDEX PIPSLECT
016212,000050: 22,6034 61102 AD SWAYPULS
016213,000051: 22,6035 21111 INDEX PIPSLECT
016214,000052: 22,6036 30045 XCH PIPAY
016215,000053: 22,6037 10000 CCS A
016216,000054: 22,6040 64516 AD ONE # INCREMENT PIPA COUNTER IF PULSE
016217,000055: 22,6041 06045 TC ADDINC +1
016218,000056: 22,6042 06044 TC ADDINC
016219,000057: 22,6043 06051 TC ENDCHEC
016220,000058:
016221,000059:
016222,000060:
016223,000061: 22,6044 44516 ADDINC CS ONE
016224,000062: 22,6045 21111 INDEX PIPSLECT
016225,000063: 22,6046 60045 AD PIPAY
016226,000064: 22,6047 21111 INDEX PIPSLECT
016227,000065: 22,6050 30045 XCH PIPAY
016228,000066:
016229,000067:
016230,000068:
016231,000069: 22,6051 11105 ENDCHEC CCS ENDSROT # IF ENDSROT = +1 EXIT PROGRAM
016232,000070: 22,6052 06055 TC CDTTHREE # WHEN DTCOUNT = 6
016233,000071: 22,6053 06065 TC TIMCALC
016234,000072: 22,6054 06055 TC CDTTHREE
016235,000073: 22,6055 44475 CDTTHREE CS SIX
016236,000074: 22,6056 21111 INDEX PIPSLECT
016237,000075: 22,6057 61100 AD DTCOUNT
016238,000076: 22,6060 10000 CCS A
016239,000077: 22,6061 06065 TC TIMCALC # EXIT ON DTCOUNT = 6
016240,000078: 22,6062 06124 TC ENDSWAY
016241,000079: 22,6063 06065 TC TIMCALC
016242,000080: 22,6064 06124 TC ENDSWAY
016243,000081:
016244,000082:
016245,000083:
016246,000084: 22,6065 21111 TIMCALC INDEX PIPSLECT
016247,000085: 22,6066 11100 CCS DTCOUNT
016248,000086: 22,6067 06100 TC DIMCOUNT # ACC NOW CONTAINS DTCOUNT - 1
016249,000087: 22,6070 06073 TC ALTPULSS # IF DTCOUNT NORZ CHANGE
016250,000088: 22,6071 06073 TC ALTPULSS # SIGN OF SWAYPULSE
016251,000089: 22,6072 30000 NOOP
016252,000090: 22,6073 21111 ALTPULSS INDEX PIPSLECT
016253,000091: 22,6074 41102 CS SWAYPULS
016254,000092: 22,6075 21111 INDEX PIPSLECT
016255,000093: 22,6076 51102 TS SWAYPULS
016256,000094: 22,6077 33521 CAF THIRTEEN # AND RESTART DTCOUNT AT 13
016257,000095: 22,6100 21111 DIMCOUNT INDEX PIPSLECT
016258,000096: 22,6101 51100 TS DTCOUNT # DTCOUNT NOW DIMINISHED BY ONE
016259,000097: # OR RESET TO 13
016260,000098: 22,6102 21111 INDEX PIPSLECT
016261,000099: 22,6103 21100 INDEX DTCOUNT # SELECT APPROPRIATE DELTA T FROM LIST
016262,000100: 22,6104 36130 CAF DELTA
016263,000101: 22,6105 25777 EXTEND
016264,000102: 22,6106 41110 MP TPERIOD # AND MULTIPLY BY PERIOD
016265,000103: 22,6107 64477 AD FIVE # ROUND RESULT
016266,000104: 22,6110 25777 EXTEND
016267,000105: 22,6111 46146 MP ONETENTH
016268,000106: 22,6112 50575 TS RUPTSTOR +3 # TIME (DT) TILL NEXT INTERRUPT 10MS
016269,000107: 22,6113 11111 NEXTRUPT CCS PIPSLECT
016270,000108: 22,6114 06121 TC ZPIPRUPT # CALL WAITLIST FOR ZPIPA
016271,000109: 22,6115 30575 XCH RUPTSTOR +3
016272,000110: 22,6116 02173 TC WAITLIST # CALL WAITLIST FOR YPIPA
016273,000111: 22,6117 44024 CADR SWAYROTY
016274,000112: 22,6120 06124 TC ENDSWAY
016275,000113:
016276,000114: 22,6121 30575 ZPIPRUPT XCH RUPTSTOR +3
016277,000115: 22,6122 02173 TC WAITLIST
016278,000116: 22,6123 44017 CADR SWAYROTZ
016279,000117: 22,6124 30032 ENDSWAY XCH LPRUPT # REPLACE LP
016280,000118: 22,6125 25777 EXTEND
016281,000119: 22,6126 44516 MP BIT1
016282,000120: 22,6127 02256 TC TASKOVER # END OF SWAY ROUTINE
016283,000121:
016284,000122:
016285,000123: # MEMORY ASSIGNMENTS
016286,000124:
016287,000125:
016288,000126:
016289,000127: 22,6130 1100 DTCOUNT EQUALS AMEMORY # YPIPA STATE COUNTER (0-7)
016290,000128: 22,6130 1102 SWAYPULS EQUALS AMEMORY +2 # NEXT YPIPA PULSE (+1,-1)
016291,000129: 22,6130 1104 PHAZING EQUALS AMEMORY +4 # TIME DELAY FOR ZPIPA START
016292,000130: # INITIALIZED BY KEYBOARD
016293,000131: # +XXXXX. E-2 SEC
016294,000132: # MUST BE GREATER THAN 00001
016295,000133: 22,6130 1105 ENDSROT EQUALS AMEMORY +5 # FLAG FOR PROGRAM EXIT
016296,000134: # SET BY KEYBOARD
016297,000135: # = 00001. TO END SWAYROUTINE
016298,000136: # = +00000. TO CONTINUE
016299,000137: 22,6130 1110 TPERIOD EQUALS AMEMORY +8D # PERIOD OF SWAY
016300,000138: # SET BY KEYBOARD
016301,000139: # = XX.XXX SEC
016302,000140: 22,6130 1111 PIPSLECT EQUALS AMEMORY +9D # INDEX FOR PIPA SELECTION
016303,000141: 22,6130 01602 DELTA DEC .05482 # DELTA TO
016304,000142: 22,6131 01064 DEC .03444 # 1
016305,000143: 22,6132 00720 DEC .02833 # 2
016306,000144: 22,6133 00636 DEC .02528 # 3
016307,000145: 22,6134 00602 DEC .02356 # 4
016308,000146: 22,6135 00562 DEC .02259 # 5
016309,000147: 22,6136 00553 DEC .02213 # 6
016310,000148: 22,6137 00553 DEC .02213 # 7
016311,000149: 22,6140 00562 DEC .02259 # 8
016312,000150: 22,6141 00602 DEC .02356 # 9
016313,000151: 22,6142 00636 DEC .02528 # 10
016314,000152: 22,6143 00720 DEC .02833 # 11
016315,000153: 22,6144 01064 DEC .03444 # 12
016316,000154: 22,6145 04173 DEC .1325 # 13
016317,000155: 22,6146 03146 ONETENTH DEC E-1 B-14
016318,000156:
016319,000157:
016320,000158: # VERIFICATION ASSISTANVE FOR INFLIGHT
016321,000159:
016322,000160:
016323,000161:
016324,000162: 22,6147 04000 MYTEST TC INTPRET # 456
016325,000163: 22,6150 45176 DMOVE 0 # 356
016326,000164: 22,6151 05174 ZERODP # SET ANGLES TO ZERO AND TEST 256
016327,000165: 22,6152 33523 STORE IGC # 156
016328,000166:
016329,000167: 22,6153 47576 NOLOD 0 # 056
016330,000168: 22,6154 33525 STORE MGC # -56
016331,000169:
016332,000170: 22,6155 47576 NOLOD 0 # +56
016333,000171: 22,6156 33521 STORE OGC
016334,000172:
016335,000173: 22,6157 76776 ITC 0
016336,000174: 22,6160 04262 DOTEST
016337,000175:
016338,000176: 22,6161 47176 COMP 0 # SET ANGLES TO -HALF AND TEST
016339,000177: 22,6162 05200 HALFDP
016340,000178: 22,6163 33523 STORE IGC
016341,000179:
016342,000180: 22,6164 47576 NOLOD 0
016343,000181: 22,6165 33525 STORE MGC
016344,000182:
016345,000183: 22,6166 47576 NOLOD 0
016346,000184: 22,6167 33521 STORE OGC
016347,000185:
016348,000186: 22,6170 76776 ITC 0
016349,000187: 22,6171 04262 DOTEST
016350,000188:
016351,000189: 22,6172 45175 CHGIGC DMOVE 1 # CHANGE IGC,MGC, AND OGC AND TEST
016352,000190: 22,6173 70776 DAD
016353,000191: 22,6174 01317 AZIMUTH
016354,000192: 22,6175 04256 INCRMT
016355,000193: 22,6176 33523 STORE IGC
016356,000194:
016357,000195: 22,6177 47576 NOLOD 0
016358,000196: 22,6200 33317 STORE AZIMUTH
016359,000197:
016360,000198: 22,6201 66775 DSU 1
016361,000199: 22,6202 43772 BPL ITC
016362,000200: 22,6203 01523 IGC
016363,000201: 22,6204 05200 HALFDP
016364,000202: 22,6205 04260 OUT
016365,000203: 22,6206 04262 DOTEST
016366,000204:
016367,000205: 22,6207 45175 CHGMGC DMOVE 1 # CHANGE MGC AND OGC AND TEST
016368,000206: 22,6210 70776 DAD
016369,000207: 22,6211 01321 GYROCSW
016370,000208: 22,6212 04256 INCRMT
016371,000209: 22,6213 33525 STORE MGC
016372,000210:
016373,000211: 22,6214 47576 NOLOD 0
016374,000212: 22,6215 33321 STORE GYROCSW
016375,000213:
016376,000214: 22,6216 66775 DSU 1
016377,000215: 22,6217 43772 BPL ITC
016378,000216: 22,6220 01525 MGC
016379,000217: 22,6221 05200 HALFDP
016380,000218: 22,6222 04251 RESETM
016381,000219: 22,6223 04262 DOTEST
016382,000220:
016383,000221: 22,6224 45175 CHGOGC DMOVE 1 # RESET OGC AND TEST
016384,000222: 22,6225 70776 DAD
016385,000223: 22,6226 01323 PRELXGA
016386,000224: 22,6227 04256 INCRMT
016387,000225: 22,6230 33521 STORE OGC
016388,000226:
016389,000227: 22,6231 47576 NOLOD 0
016390,000228: 22,6232 33323 STORE PRELXGA
016391,000229:
016392,000230: 22,6233 66775 DSU 1
016393,000231: 22,6234 43772 BPL ITC
016394,000232: 22,6235 01521 OGC
016395,000233: 22,6236 05200 HALFDP
016396,000234: 22,6237 04244 RESETO
016397,000235: 22,6240 04262 DOTEST
016398,000236:
016399,000237: 22,6241 76776 ITC 0
016400,000238: 22,6242 04225 CHGOGC
016401,000239:
016402,000240: 22,6243 47176 RESETO COMP 0 # RESET OGC TO-HALF
016403,000241: 22,6244 05200 HALFDP # LOOP TO CHGMGC
016404,000242: 22,6245 33323 STORE PRELXGA
016405,000243:
016406,000244: 22,6246 76776 ITC 0
016407,000245: 22,6247 04210 CHGMGC
016408,000246:
016409,000247: 22,6250 47176 RESETM COMP 0 # RESET MGC TO -HALF
016410,000248: 22,6251 05200 HALFDP # LOOP TO CHGIGC
016411,000249: 22,6252 33321 STORE GYROCSW
016412,000250:
016413,000251: 22,6253 76776 ITC 0
016414,000252: 22,6254 04173 CHGIGC
016415,000253:
016416,000254: 22,6255 06314 31463 INCRMT 2DEC .20
016417,000255:
016418,000256: 22,6257 77576 OUT EXIT 0 # END OF MAIN
016419,000257: 22,6260 02124 LASTWORD TC ENDOFJOB
016420,000258:
016421,000259: 22,6261 45575 DOTEST ITA 1
016422,000260: 22,6262 75172 VMOVE ITC
016423,000261: 22,6263 01315 LATITUDE
016424,000262: 22,6264 15573 UNITX
016425,000263: 22,6265 04313 MYROT
016426,000264:
016427,000265: 22,6266 47576 NOLOD 0
016428,000266: 22,6267 33403 STORE STARAD
016429,000267:
016430,000268: 22,6270 75175 VMOVE 1
016431,000269: 22,6271 76776 ITC
016432,000270: 22,6272 15601 UNITY
016433,000271: 22,6273 04313 MYROT
016434,000272:
016435,000273: 22,6274 47576 NOLOD 0
016436,000274: 22,6275 33411 STORE STARAD +6D
016437,000275:
016438,000276: 22,6276 75176 VMOVE 0
016439,000277: 22,6277 15573 UNITX
016440,000278: 22,6300 32007 STORE 6D
016441,000279:
016442,000280: 22,6301 75176 VMOVE 0
016443,000281: 22,6302 15601 UNITY
016444,000282: 22,6303 32015 STORE 12D
016445,000283:
016446,000284: 22,6304 76776 ITC 0
016447,000285: 22,6305 04761 AXISGEN
016448,000286:
016449,000287: 22,6306 76776 ITC 0 # SEND NEW VECTORS TO CALCGTA
016450,000288: 22,6307 04353 CALCGTA
016451,000289:
016452,000290: 22,6310 44576 ITCI 0
016453,000291: 22,6311 01315 LATITUDE
016454,000292: 22,6312 45575 MYROT ITA 1 # INITIALIZE
016455,000293: 22,6313 43411 TEST SWITCH
016456,000294: 22,6314 00052 S2
016457,000295: 22,6315 00006 NBSMBIT
016458,000296: 22,6316 04321 MYROT1
016459,000297: 22,6317 00006 NBSMBIT
016460,000298:
016461,000299: 22,6320 75575 MYROT1 AXT,1 1 # ROTATE X,Z ABOUT Y
016462,000300: 22,6321 74423 AXT,2 DMOVE
016463,000301: 22,6322 00005 4
016464,000302: 22,6323 00001 0
016465,000303: 22,6324 01523 IGC
016466,000304: 22,6325 32037 STORE 30D
016467,000305:
016468,000306: 22,6326 76776 ITC 0
016469,000307: 22,6327 04566 ACCUROT
016470,000308: 22,6330 75575 AXT,1 1 # ROTATE X,Y ABOUT Z
016471,000309: 22,6331 74423 AXT,2 DMOVE
016472,000310: 22,6332 00003 2
016473,000311: 22,6333 00005 4
016474,000312: 22,6334 01525 MGC
016475,000313: 22,6335 32037 STORE 30D
016476,000314:
016477,000315: 22,6336 76776 ITC 0
016478,000316: 22,6337 04566 ACCUROT
016479,000317:
016480,000318: 22,6340 75575 AXT,1 1 # ROTATE Z,Y ABOUT X
016481,000319: 22,6341 74423 AXT,2 DMOVE
016482,000320: 22,6342 00001 0
016483,000321: 22,6343 00003 2
016484,000322: 22,6344 01521 OGC
016485,000323: 22,6345 32037 STORE 30D
016486,000324:
016487,000325: 22,6346 76776 ITC 0
016488,000326: 22,6347 04566 ACCUROT
016489,000327:
016490,000328: 22,6350 44576 ITCI 0
016491,000329: 22,6351 00052 S2
End of include-file INFLIGHT_ALIGNMENT_PROGRAM.agc. Parent file is MAIN.agc