Source Code

These source-code files were obtained by digitally photographing a Solarium 55 (Apollo 6) program listing from the American Computer Museum in Bozeman, Montana. Photography was by Ron Burkey, with assistance from museum curator George Keremedjiev and Montana State University curator Kim Scott. The listing originally belonged to Eldon C. Hall, who donated it to the museum. Volunteers then manually typed in the source code or else modified similar pre-existing Colossus 249 (Apollo 9) source files to incorporate changes, although this transcription was principally done by Jim Lawton and corrected by Ron Burkey. Notations on the program listing read, in part:

        YUL SYSTEM FOR AGC4: REVISION 0 OF PROGRAM SOLRUM55
	BY NASA 1021108-021                    DEC. 4, 1966
Note that the date is the date of the printout, not the date of the program revision.

Due to statements by Jay Sampson, the original contractor from AC Electronics who created Solarium 54 (Apollo 4) from the earlier Corona (AS-202 mission) program, it is believed that Solarium 54 and Solarium 55 (Apollo 6) are actually identical programs. The change in numbering, from 54 to 55, is believed to be for some administrative purpose. Thus, it is believed that the source-code represented here is equally appropriate for both Apollo 4 and Apollo 6 missions.

014179,000002:                                                                                                  ## Copyright:   Public domain.
014180,000003:                                                                                                  ## Filename:    INFLIGHT_ALIGNMENT_PROGRAM.agc
014181,000004:                                                                                                  ## Purpose:     Part of the source code for Solarium build 55. This
014182,000005:                                                                                                  ##              is for the Command Module's (CM) Apollo Guidance
014183,000006:                                                                                                  ##              Computer (AGC), for Apollo 6.
014184,000007:                                                                                                  ## Assembler:   yaYUL --block1
014185,000008:                                                                                                  ## Contact:     Jim Lawton <jim DOT lawton AT gmail DOT com>
014186,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
014187,000010:                                                                                                  ## Page Scans:  www.ibiblio.org/apollo/ScansForConversion/Solarium055/
014188,000011:                                                                                                  ## Mod history: 2009-10-03 JL   Created.
014189,000012:                                                                                                  ##              2016-12-28 RSB  Proofed comment text using octopus/ProoferComments,
014190,000013:                                                                                                  ##                              and fixed errors found.
014191,000014: 

Page 366

014193,000016: 
014194,000017: 22,6000                                           SETLOC   44000                                 
014195,000018: 
014196,000019: 22,6000           34475        SWAYSTAT           CAF      SIX                                   #  PROGRAM START AND INITIAL CONDITIONS
014197,000020: 22,6001           51100                           TS       DTCOUNT                               #  SET DTCOUNT = 6
014198,000021: 22,6002           51101                           TS       DTCOUNT    +1                         
014199,000022: 22,6003           34516                           CAF      ONE                                   
014200,000023: 22,6004           51102                           TS       SWAYPULS                              #  SET FIRST PIPA PULSE = +1
014201,000024: 22,6005           51103                           TS       SWAYPULS   +1                         
014202,000025: 22,6006           34516                           CAF      ONE                                   
014203,000026: 22,6007           02173                           TC       WAITLIST                              
014204,000027: 22,6010           44024                           CADR     SWAYROTY                              
014205,000028: 22,6011           34516                           CAF      ONE                                   
014206,000029: 22,6012           61104                           AD       PHAZING                               
014207,000030: 22,6013           02173                           TC       WAITLIST                              
014208,000031: 22,6014           44017                           CADR     SWAYROTZ                              
014209,000032: 22,6015           20016                           RELINT                                         
014210,000033: 22,6016           02124                           TC       ENDOFJOB                              
014211,000034: 
014212,000035: 
014213,000036: 
014214,000037: 22,6017           30003        SWAYROTZ           XCH      LP                                    #  STORE LP IN LPRUPT
014215,000038: 22,6020           30032                           XCH      LPRUPT                                
014216,000039: 22,6021           34516                           CAF      ONE                                   #  SET INDEX PIPSLECT FOR SELECTION OF
014217,000040: 22,6022           51111                           TS       PIPSLECT                              #  PIPA TO BE INCREMENTED
014218,000041: 22,6023           06030                           TC       SWAYROTY   +4                         
014219,000042: 
014220,000043: 22,6024           30003        SWAYROTY           XCH      LP                                    
014221,000044: 22,6025           30032                           XCH      LPRUPT                                
014222,000045: 22,6026           35501                           CAF      ZERO                                  
014223,000046: 22,6027           51111                           TS       PIPSLECT                              
014224,000047: 
014225,000048: 22,6030           45501                           CS       ZERO                                  
014226,000049: 22,6031           21111                           INDEX    PIPSLECT                              
014227,000050: 22,6032           30045                           XCH      PIPAY                                 
014228,000051: 22,6033           21111                           INDEX    PIPSLECT                              
014229,000052: 22,6034           61102                           AD       SWAYPULS                              
014230,000053: 22,6035           21111                           INDEX    PIPSLECT                              
014231,000054: 22,6036           30045                           XCH      PIPAY                                 
014232,000055: 22,6037           10000                           CCS      A                                     
014233,000056: 22,6040           64516                           AD       ONE                                   #  INCREMENT PIPA COUNTER IF PULSE
014234,000057: 22,6041           06045                           TC       ADDINC     +1                         
014235,000058: 22,6042           06044                           TC       ADDINC                                
014236,000059: 22,6043           06051                           TC       ENDCHEC                               
014237,000060: 
014238,000061: 
014239,000062: 
014240,000063: 22,6044           44516        ADDINC             CS       ONE                                   
014241,000064: 22,6045           21111                           INDEX    PIPSLECT                              
014242,000065: 22,6046           60045                           AD       PIPAY                                 
014243,000066: 22,6047           21111                           INDEX    PIPSLECT                              

Page 367

014245,000068: 22,6050           30045                           XCH      PIPAY                                 
014246,000069: 
014247,000070: 
014248,000071: 
014249,000072: 22,6051           11105        ENDCHEC            CCS      ENDSROT                               #  IF ENDSROT = +1 EXIT PROGRAM
014250,000073: 22,6052           06055                           TC       CDTTHREE                              #  WHEN DTCOUNT = 6
014251,000074: 22,6053           06065                           TC       TIMCALC                               
014252,000075: 22,6054           06055                           TC       CDTTHREE                              
014253,000076: 22,6055           44475        CDTTHREE           CS       SIX                                   
014254,000077: 22,6056           21111                           INDEX    PIPSLECT                              
014255,000078: 22,6057           61100                           AD       DTCOUNT                               
014256,000079: 22,6060           10000                           CCS      A                                     
014257,000080: 22,6061           06065                           TC       TIMCALC                               #  EXIT ON DTCOUNT = 6
014258,000081: 22,6062           06124                           TC       ENDSWAY                               
014259,000082: 22,6063           06065                           TC       TIMCALC                               
014260,000083: 22,6064           06124                           TC       ENDSWAY                               
014261,000084: 
014262,000085: 
014263,000086: 
014264,000087: 22,6065           21111        TIMCALC            INDEX    PIPSLECT                              
014265,000088: 22,6066           11100                           CCS      DTCOUNT                               
014266,000089: 22,6067           06100                           TC       DIMCOUNT                              #  ACC NOW CONTAINS DTCOUNT - 1
014267,000090: 22,6070           06073                           TC       ALTPULSS                              #  IF DTCOUNT NORZ CHANGE
014268,000091: 22,6071           06073                           TC       ALTPULSS                              #  SIGN OF SWAYPULSE
014269,000092: 22,6072           30000                           NOOP                                           
014270,000093: 22,6073           21111        ALTPULSS           INDEX    PIPSLECT                              
014271,000094: 22,6074           41102                           CS       SWAYPULS                              
014272,000095: 22,6075           21111                           INDEX    PIPSLECT                              
014273,000096: 22,6076           51102                           TS       SWAYPULS                              
014274,000097: 22,6077           33535                           CAF      THIRTEEN                              #  AND RESTART DTCOUNT AT 13
014275,000098: 22,6100           21111        DIMCOUNT           INDEX    PIPSLECT                              
014276,000099: 22,6101           51100                           TS       DTCOUNT                               #  DTCOUNT NOW DIMINISHED BY ONE
014277,000100:                                                                                                  #  OR RESET TO 13
014278,000101: 22,6102           21111                           INDEX    PIPSLECT                              
014279,000102: 22,6103           21100                           INDEX    DTCOUNT                               #  SELECT APPROPRIATE DELTA T FROM LIST
014280,000103: 22,6104           36130                           CAF      DELTA                                 
014281,000104: 22,6105           25777                           EXTEND                                         
014282,000105: 22,6106           41110                           MP       TPERIOD                               #  AND MULTIPLY BY PERIOD
014283,000106: 22,6107           64477                           AD       FIVE                                  #  ROUND RESULT
014284,000107: 22,6110           25777                           EXTEND                                         
014285,000108: 22,6111           46146                           MP       ONETENTH                              
014286,000109: 22,6112           50575                           TS       RUPTSTOR   +3                         #  TIME (DT) TILL NEXT INTERRUPT 10MS
014287,000110: 22,6113           11111        NEXTRUPT           CCS      PIPSLECT                              
014288,000111: 22,6114           06121                           TC       ZPIPRUPT                              #  CALL WAITLIST FOR ZPIPA
014289,000112: 22,6115           30575                           XCH      RUPTSTOR   +3                         
014290,000113: 22,6116           02173                           TC       WAITLIST                              #  CALL WAITLIST FOR YPIPA
014291,000114: 22,6117           44024                           CADR     SWAYROTY                              
014292,000115: 22,6120           06124                           TC       ENDSWAY                               
014293,000116: 
014294,000117: 22,6121           30575        ZPIPRUPT           XCH      RUPTSTOR   +3                         

Page 368

014296,000119: 22,6122           02173                           TC       WAITLIST                              
014297,000120: 22,6123           44017                           CADR     SWAYROTZ                              
014298,000121: 22,6124           30032        ENDSWAY            XCH      LPRUPT                                #  REPLACE LP
014299,000122: 22,6125           25777                           EXTEND                                         
014300,000123: 22,6126           44516                           MP       BIT1                                  
014301,000124: 22,6127           02256                           TC       TASKOVER                              #  END OF SWAY ROUTINE
014302,000125: 

Page 369

014304,000127: 
014305,000128:                                                                                                  #  MEMORY ASSIGNMENTS
014306,000129: 
014307,000130: 
014308,000131: 
014309,000132: 22,6130     1100               DTCOUNT            EQUALS   AMEMORY                               #  YPIPA STATE COUNTER (0-7)
014310,000133: 22,6130     1102               SWAYPULS           EQUALS   AMEMORY    +2                         #  NEXT YPIPA PULSE (+1,-1)
014311,000134: 22,6130     1104               PHAZING            EQUALS   AMEMORY    +4                         #  TIME DELAY FOR ZPIPA START
014312,000135:                                                                                                  #  INITIALIZED BY KEYBOARD
014313,000136:                                                                                                  #  +XXXXX. E-2 SEC
014314,000137:                                                                                                  #  MUST BE GREATER THAN 00001
014315,000138: 22,6130     1105               ENDSROT            EQUALS   AMEMORY    +5                         #  FLAG FOR PROGRAM EXIT
014316,000139:                                                                                                  #  SET BY KEYBOARD
014317,000140:                                                                                                  #  = 00001. TO END SWAYROUTINE
014318,000141:                                                                                                  #  = +00000. TO CONTINUE
014319,000142: 22,6130     1110               TPERIOD            EQUALS   AMEMORY    +8D                        #  PERIOD OF SWAY
014320,000143:                                                                                                  #  SET BY KEYBOARD
014321,000144:                                                                                                  #  = XX.XXX SEC
014322,000145: 22,6130     1111               PIPSLECT           EQUALS   AMEMORY    +9D                        #  INDEX FOR PIPA SELECTION
014323,000146: 22,6130           01602        DELTA              DEC      .05482                                #  DELTA  TO
014324,000147: 22,6131           01064                           DEC      .03444                                #  1
014325,000148: 22,6132           00720                           DEC      .02833                                #  2
014326,000149: 22,6133           00636                           DEC      .02528                                #  3
014327,000150: 22,6134           00602                           DEC      .02356                                #  4
014328,000151: 22,6135           00562                           DEC      .02259                                #  5
014329,000152: 22,6136           00553                           DEC      .02213                                #  6
014330,000153: 22,6137           00553                           DEC      .02213                                #  7
014331,000154: 22,6140           00562                           DEC      .02259                                #  8
014332,000155: 22,6141           00602                           DEC      .02356                                #  9
014333,000156: 22,6142           00636                           DEC      .02528                                #  10
014334,000157: 22,6143           00720                           DEC      .02833                                #  11
014335,000158: 22,6144           01064                           DEC      .03444                                #  12
014336,000159: 22,6145           04173                           DEC      .1325                                 #  13
014337,000160: 22,6146           03146        ONETENTH           DEC      E-1        B-14                       
014338,000161: 

Page 370

014340,000163: 
014341,000164:                                                                                                  #  VERIFICATION ASSISTANVE FOR INFLIGHT
014342,000165: 
014343,000166: 
014344,000167: 
014345,000168: 22,6147           04000        MYTEST             TC       INTPRET                               #                                        456
014346,000169: 22,6150           45176                           DMOVE    0                                     #                                        356
014347,000170: 22,6151           05174                                    ZERODP                                #  SET ANGLES TO ZERO AND TEST           256
014348,000171: 22,6152           33523                           STORE    IGC                                   #                                        156
014349,000172: 
014350,000173: 22,6153           47576                           NOLOD    0                                     #                                        056
014351,000174: 22,6154           33525                           STORE    MGC                                   #                                        -56
014352,000175: 
014353,000176: 22,6155           47576                           NOLOD    0                                     #                                        +56
014354,000177: 22,6156           33521                           STORE    OGC                                   
014355,000178: 
014356,000179: 22,6157           76776                           ITC      0                                     
014357,000180: 22,6160           04262                                    DOTEST                                
014358,000181: 
014359,000182: 22,6161           47176                           COMP     0                                     #  SET ANGLES TO -HALF AND TEST
014360,000183: 22,6162           05200                                    HALFDP                                
014361,000184: 22,6163           33523                           STORE    IGC                                   
014362,000185: 
014363,000186: 22,6164           47576                           NOLOD    0                                     
014364,000187: 22,6165           33525                           STORE    MGC                                   
014365,000188: 
014366,000189: 22,6166           47576                           NOLOD    0                                     
014367,000190: 22,6167           33521                           STORE    OGC                                   
014368,000191: 
014369,000192: 22,6170           76776                           ITC      0                                     
014370,000193: 22,6171           04262                                    DOTEST                                
014371,000194: 
014372,000195: 22,6172           45175        CHGIGC             DMOVE    1                                     #  CHANGE IGC,MGC, AND OGC AND TEST
014373,000196: 22,6173           70776                           DAD                                            
014374,000197: 22,6174           01317                                    AZIMUTH                               
014375,000198: 22,6175           04256                                    INCRMT                                
014376,000199: 22,6176           33523                           STORE    IGC                                   
014377,000200: 
014378,000201: 22,6177           47576                           NOLOD    0                                     
014379,000202: 22,6200           33317                           STORE    AZIMUTH                               
014380,000203: 
014381,000204: 22,6201           66775                           DSU      1                                     
014382,000205: 22,6202           43772                           BPL      ITC                                   
014383,000206: 22,6203           01523                                    IGC                                   
014384,000207: 22,6204           05200                                    HALFDP                                
014385,000208: 22,6205           04260                                    OUT                                   
014386,000209: 22,6206           04262                                    DOTEST                                
014387,000210: 
014388,000211: 22,6207           45175        CHGMGC             DMOVE    1                                     #  CHANGE MGC AND OGC AND TEST
014389,000212: 22,6210           70776                           DAD                                            
014390,000213: 22,6211           01321                                    GYROCSW                               

Page 371

014392,000215: 22,6212           04256                                    INCRMT                                
014393,000216: 22,6213           33525                           STORE    MGC                                   
014394,000217: 
014395,000218: 22,6214           47576                           NOLOD    0                                     
014396,000219: 22,6215           33321                           STORE    GYROCSW                               
014397,000220: 
014398,000221: 22,6216           66775                           DSU      1                                     
014399,000222: 22,6217           43772                           BPL      ITC                                   
014400,000223: 22,6220           01525                                    MGC                                   
014401,000224: 22,6221           05200                                    HALFDP                                
014402,000225: 22,6222           04251                                    RESETM                                
014403,000226: 22,6223           04262                                    DOTEST                                
014404,000227: 
014405,000228: 22,6224           45175        CHGOGC             DMOVE    1                                     #  RESET OGC AND TEST
014406,000229: 22,6225           70776                           DAD                                            
014407,000230: 22,6226           01323                                    PRELXGA                               
014408,000231: 22,6227           04256                                    INCRMT                                
014409,000232: 22,6230           33521                           STORE    OGC                                   
014410,000233: 
014411,000234: 22,6231           47576                           NOLOD    0                                     
014412,000235: 22,6232           33323                           STORE    PRELXGA                               
014413,000236: 
014414,000237: 22,6233           66775                           DSU      1                                     
014415,000238: 22,6234           43772                           BPL      ITC                                   
014416,000239: 22,6235           01521                                    OGC                                   
014417,000240: 22,6236           05200                                    HALFDP                                
014418,000241: 22,6237           04244                                    RESETO                                
014419,000242: 22,6240           04262                                    DOTEST                                
014420,000243: 
014421,000244: 22,6241           76776                           ITC      0                                     
014422,000245: 22,6242           04225                                    CHGOGC                                
014423,000246: 
014424,000247: 22,6243           47176        RESETO             COMP     0                                     #  RESET OGC TO-HALF
014425,000248: 22,6244           05200                                    HALFDP                                #  LOOP TO CHGMGC
014426,000249: 22,6245           33323                           STORE    PRELXGA                               
014427,000250: 
014428,000251: 22,6246           76776                           ITC      0                                     
014429,000252: 22,6247           04210                                    CHGMGC                                
014430,000253: 
014431,000254: 22,6250           47176        RESETM             COMP     0                                     #  RESET MGC TO -HALF
014432,000255: 22,6251           05200                                    HALFDP                                #  LOOP TO CHGIGC
014433,000256: 22,6252           33321                           STORE    GYROCSW                               
014434,000257: 
014435,000258: 22,6253           76776                           ITC      0                                     
014436,000259: 22,6254           04173                                    CHGIGC                                
014437,000260: 
014438,000261: 22,6255           06314 31463  INCRMT             2DEC     .20                                   
014439,000262: 
014440,000263: 22,6257           77576        OUT                EXIT     0                                     #  END OF MAIN
014441,000264: 22,6260           02124        LASTWORD           TC       ENDOFJOB                              

Page 372

014443,000266: 
014444,000267: 22,6261           45575        DOTEST             ITA      1                                     
014445,000268: 22,6262           75172                           VMOVE    ITC                                   
014446,000269: 22,6263           01315                                    LATITUDE                              
014447,000270: 22,6264           15573                                    UNITX                                 
014448,000271: 22,6265           04313                                    MYROT                                 
014449,000272: 
014450,000273: 22,6266           47576                           NOLOD    0                                     
014451,000274: 22,6267           33403                           STORE    STARAD                                
014452,000275: 
014453,000276: 22,6270           75175                           VMOVE    1                                     
014454,000277: 22,6271           76776                           ITC                                            
014455,000278: 22,6272           15601                                    UNITY                                 
014456,000279: 22,6273           04313                                    MYROT                                 
014457,000280: 
014458,000281: 22,6274           47576                           NOLOD    0                                     
014459,000282: 22,6275           33411                           STORE    STARAD     +6D                        
014460,000283: 
014461,000284: 22,6276           75176                           VMOVE    0                                     
014462,000285: 22,6277           15573                                    UNITX                                 
014463,000286: 22,6300           32007                           STORE    6D                                    
014464,000287: 
014465,000288: 22,6301           75176                           VMOVE    0                                     
014466,000289: 22,6302           15601                                    UNITY                                 
014467,000290: 22,6303           32015                           STORE    12D                                   
014468,000291: 
014469,000292: 22,6304           76776                           ITC      0                                     
014470,000293: 22,6305           04761                                    AXISGEN                               
014471,000294: 
014472,000295: 22,6306           76776                           ITC      0                                     #  SEND NEW VECTORS TO CALCGTA
014473,000296: 22,6307           04353                                    CALCGTA                               
014474,000297: 
014475,000298: 22,6310           44576                           ITCI     0                                     
014476,000299: 22,6311           01315                                    LATITUDE                              
014477,000300: 22,6312           45575        MYROT              ITA      1                                     #  INITIALIZE
014478,000301: 22,6313           43411                           TEST     SWITCH                                
014479,000302: 22,6314           00052                                    S2                                    
014480,000303: 22,6315           00006                                    NBSMBIT                               
014481,000304: 22,6316           04321                                    MYROT1                                
014482,000305: 22,6317           00006                                    NBSMBIT                               
014483,000306: 
014484,000307: 22,6320           75575        MYROT1             AXT,1    1                                     #  ROTATE X,Z  ABOUT  Y
014485,000308: 22,6321           74423                           AXT,2    DMOVE                                 
014486,000309: 22,6322           00005                                    4                                     
014487,000310: 22,6323           00001                                    0                                     
014488,000311: 22,6324           01523                                    IGC                                   
014489,000312: 22,6325           32037                           STORE    30D                                   
014490,000313: 
014491,000314: 22,6326           76776                           ITC      0                                     
014492,000315: 22,6327           04566                                    ACCUROT                               

Page 373

014494,000317: 22,6330           75575                           AXT,1    1                                     #   ROTATE X,Y  ABOUT  Z
014495,000318: 22,6331           74423                           AXT,2    DMOVE                                 
014496,000319: 22,6332           00003                                    2                                     
014497,000320: 22,6333           00005                                    4                                     
014498,000321: 22,6334           01525                                    MGC                                   
014499,000322: 22,6335           32037                           STORE    30D                                   
014500,000323: 
014501,000324: 22,6336           76776                           ITC      0                                     
014502,000325: 22,6337           04566                                    ACCUROT                               
014503,000326: 
014504,000327: 22,6340           75575                           AXT,1    1                                     #  ROTATE  Z,Y ABOUT  X
014505,000328: 22,6341           74423                           AXT,2    DMOVE                                 
014506,000329: 22,6342           00001                                    0                                     
014507,000330: 22,6343           00003                                    2                                     
014508,000331: 22,6344           01521                                    OGC                                   
014509,000332: 22,6345           32037                           STORE    30D                                   
014510,000333: 
014511,000334: 22,6346           76776                           ITC      0                                     
014512,000335: 22,6347           04566                                    ACCUROT                               
014513,000336: 
014514,000337: 22,6350           44576                           ITCI     0                                     
014515,000338: 22,6351           00052                                    S2                                    

End of include-file INFLIGHT_ALIGNMENT_PROGRAM.agc.  Parent file is MAIN.agc