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.

013625,000002:                                                                                                  ## Copyright:   Public domain.
013626,000003:                                                                                                  ## Filename:    MIDCOURSE_INITIALIZATION.agc
013627,000004:                                                                                                  ## Purpose:     A section of Corona revision 261.
013628,000005:                                                                                                  ##              It is part of the source code for the Apollo Guidance Computer
013629,000006:                                                                                                  ##              (AGC) for AS-202. No original listings of this software are
013630,000007:                                                                                                  ##              available; instead, this file was created via disassembly of
013631,000008:                                                                                                  ##              the core rope modules actually flown on the mission.
013632,000009:                                                                                                  ## Assembler:   yaYUL
013633,000010:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
013634,000011:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
013635,000012:                                                                                                  ## Mod history: 2023-06-19 MAS  Created.
013636,000013: 
013637,000014:                                                                                                  ## MAS 2023: This log section is a part of the MIDCOURSE NAVIGATION GAME, which
013638,000015:                                                                                                  ## appears to be a very early implementation of P22, P29, and possibly some other
013639,000016:                                                                                                  ## navigation programs. It was deleted in Solarium, and its documentation that
013640,000017:                                                                                                  ## mentions it is nearly nonexistent outside of some MIT status reports (from
013641,000018:                                                                                                  ## which the name of this log section is taken). Reverse-engineering it is a work
013642,000019:                                                                                                  ## in progress; all labels and comments are modern guesses. Double-# comments
013643,000020:                                                                                                  ## are annotations to aid in reverse engineering. Any labels that have not yet
013644,000021:                                                                                                  ## been given modern names are given placeholders with the pattern UBB,SSSS,
013645,000022:                                                                                                  ## where BB,SSSS is the full bank and address of the label.
013646,000023: 
013647,000024: 13,6717                                           BANK     13                                    
013648,000025: 
013649,000026: 13,6717           03310        MIDINIT            TC       GRABDSP                               
013650,000027: 13,6720           03316                           TC       PREGBSY                               
013651,000028: 

Zero everything between DELTAV and DELVEL +5

013653,000030: 13,6721           47010                           CS       LDELTAV                               
013654,000031: 13,6722           67011                           AD       LDELVEL5                              
013655,000032: 
013656,000033: 13,6723           51302        ZEROLOP            TS       WORDIDX                               
013657,000034: 13,6724           35501                           CAF      ZERO                                  
013658,000035: 13,6725           21302                           INDEX    WORDIDX                               
013659,000036: 13,6726           51001                           TS       DELTAV                                
013660,000037: 13,6727           11302                           CCS      WORDIDX                               
013661,000038: 13,6730           06723                           TC       ZEROLOP                               
013662,000039: 

Set SXT-ON flag in WASOPSET

013664,000041: 13,6731           34502                           CAF      BIT13                                 
013665,000042: 13,6732           50730                           TS       WASOPSET                              
013666,000043: 

Clear MIDFLAG and MOONFLAG

013668,000045: 13,6733           47016                           CS       MINITMSK                              
013669,000046: 13,6734           70645                           MASK     STATE                                 
013670,000047: 13,6735           50645                           TS       STATE                                 
013671,000048: 

Ask user to load DELR

013673,000050: 13,6736           37017                           CAF      VN2572                                
013674,000051: 13,6737           03106                           TC       NVSUB                                 
013675,000052: 13,6740           03323                           TC       PRENVBSY                              
013676,000053: 13,6741           03165                           TC       DATAWAIT                              
013677,000054: 13,6742           07006                           TC       BACK2MID                              
013678,000055: 13,6743           06744                           TC       +1                                    
013679,000056: 

Ask user to load DELVEL

013681,000058: 13,6744           37020                           CAF      VN2573                                
013682,000059: 13,6745           03106                           TC       NVSUB                                 
013683,000060: 13,6746           03323                           TC       PRENVBSY                              
013684,000061: 13,6747           03165                           TC       DATAWAIT                              
013685,000062: 13,6750           07006                           TC       BACK2MID                              
013686,000063: 13,6751           06752                           TC       +1                                    
013687,000064: 

Initialize REFSMMAT to hardcoded initial values

013689,000066: 13,6752           37012                           CAF      DEC17                                 
013690,000067: 13,6753           51302        RFSMLOOP           TS       WORDIDX                               
013691,000068: 13,6754           21302                           INDEX    WORDIDX                               
013692,000069: 13,6755           37133                           CAF      INITRFSM                              
013693,000070: 13,6756           21302                           INDEX    WORDIDX                               
013694,000071: 13,6757           51051                           TS       REFSMMAT                              
013695,000072: 13,6760           11302                           CCS      WORDIDX                               
013696,000073: 13,6761           06753                           TC       RFSMLOOP                              
013697,000074: 

Initialize TE and TET with hardcoded initial value

013699,000076: 13,6762           37021                           CAF      INITTET                               
013700,000077: 13,6763           51033                           TS       TE                                    
013701,000078: 13,6764           51146                           TS       TET                                   
013702,000079: 13,6765           37022                           CAF      INITTET    +1                         
013703,000080: 13,6766           51034                           TS       TE         +1                         
013704,000081: 13,6767           51147                           TS       TET        +1                         
013705,000082: 

Initialize scales with initial values

013707,000084: 13,6770           37014                           CAF      DEC18                                 
013708,000085: 13,6771           51310                           TS       SCALEDT                               
013709,000086: 13,6772           35502                           CAF      FOUR                                  
013710,000087: 13,6773           51311                           TS       SCALDELT                              
013711,000088: 13,6774           37013                           CAF      DEC14                                 
013712,000089: 13,6775           51312                           TS       SCALER                                
013713,000090: 

Initialize W to hardcoded initial values

013715,000092: 13,6776           37015                           CAF      DEC71                                 
013716,000093: 13,6777           51302        WLOOP              TS       WORDIDX                               
013717,000094: 13,7000           21302                           INDEX    WORDIDX                               
013718,000095: 13,7001           37023                           CAF      INITW                                 
013719,000096: 13,7002           21302                           INDEX    WORDIDX                               
013720,000097: 13,7003           51561                           TS       W                                     
013721,000098: 13,7004           11302                           CCS      WORDIDX                               
013722,000099: 13,7005           06777                           TC       WLOOP                                 
013723,000100: 

Back to MNG when done. TERMINATE on the load VERBs sends you straight back.

013725,000102: 13,7006           05654        BACK2MID           TC       BANKCALL                              
013726,000103: 13,7007           50013                           CADR     MIDINRET                              
013727,000104: 
013728,000105: 13,7010           01001        LDELTAV            ADRES    DELTAV                                
013729,000106: 13,7011           01165        LDELVEL5           ADRES    DELVEL     +5                         
013730,000107: 13,7012           00021        DEC17              DEC      17         B-14                       
013731,000108: 13,7013           00016        DEC14              DEC      14         B-14                       
013732,000109: 13,7014           00022        DEC18              DEC      18         B-14                       
013733,000110: 13,7015           00107        DEC71              DEC      71         B-14                       
013734,000111: 13,7016           30000        MINITMSK           OCT      30000                                 
013735,000112: 13,7017           02572        VN2572             OCT      02572                                 
013736,000113: 13,7020           02573        VN2573             OCT      02573                                 
013737,000114: 13,7021           02365 25204  INITTET            2DEC     .077494159                            
013738,000115: 
013739,000116: 13,7023           04000 00000  INITW              2DEC     .125                                  
013740,000117: 13,7025           00000 00000                     2DEC     0          B-28                       
013741,000118: 13,7027           00000 00000                     2DEC     0          B-28                       
013742,000119: 
013743,000120: 13,7031           00000 00000                     2DEC     0          B-28                       
013744,000121: 13,7033           04000 00000                     2DEC     .125                                  
013745,000122: 13,7035           00000 00000                     2DEC     0          B-28                       
013746,000123: 
013747,000124: 13,7037           00000 00000                     2DEC     0          B-28                       
013748,000125: 13,7041           00000 00000                     2DEC     0          B-28                       
013749,000126: 13,7043           04000 00000                     2DEC     .125                                  
013750,000127: 
013751,000128: 13,7045           00000 00000                     2DEC     0          B-28                       
013752,000129: 13,7047           00000 00000                     2DEC     0          B-28                       
013753,000130: 13,7051           00000 00000                     2DEC     0          B-28                       
013754,000131: 
013755,000132: 13,7053           00000 00000                     2DEC     0          B-28                       
013756,000133: 13,7055           00000 00000                     2DEC     0          B-28                       
013757,000134: 13,7057           00000 00000                     2DEC     0          B-28                       
013758,000135: 
013759,000136: 13,7061           00000 00000                     2DEC     0          B-28                       
013760,000137: 13,7063           00000 00000                     2DEC     0          B-28                       
013761,000138: 13,7065           00000 00000                     2DEC     0          B-28                       
013762,000139: 
013763,000140: 13,7067           00000 00000                     2DEC     0          B-28                       
013764,000141: 13,7071           00000 00000                     2DEC     0          B-28                       
013765,000142: 13,7073           00000 00000                     2DEC     0          B-28                       
013766,000143: 
013767,000144: 13,7075           00000 00000                     2DEC     0          B-28                       
013768,000145: 13,7077           00000 00000                     2DEC     0          B-28                       
013769,000146: 13,7101           00000 00000                     2DEC     0          B-28                       
013770,000147: 
013771,000148: 13,7103           00000 00000                     2DEC     0          B-28                       
013772,000149: 13,7105           00000 00000                     2DEC     0          B-28                       
013773,000150: 13,7107           00000 00000                     2DEC     0          B-28                       
013774,000151: 
013775,000152: 13,7111           01522 13237                     2DEC     .051901456                            
013776,000153: 13,7113           00000 00000                     2DEC     0          B-28                       
013777,000154: 13,7115           00000 00000                     2DEC     0          B-28                       
013778,000155: 
013779,000156: 13,7117           00000 00000                     2DEC     0          B-28                       
013780,000157: 13,7121           01522 13237                     2DEC     .051901456                            
013781,000158: 13,7123           00000 00000                     2DEC     0          B-28                       
013782,000159: 
013783,000160: 13,7125           00000 00000                     2DEC     0          B-28                       
013784,000161: 13,7127           00000 00000                     2DEC     0          B-28                       
013785,000162: 13,7131           01522 13237                     2DEC     .051901456                            
013786,000163: 
013787,000164: 13,7133           65432 45301  INITRFSM           2DEC     -.326527826                            
013788,000165: 13,7135           63706 63306                     2DEC     -.378503058                            
013789,000166: 13,7137           00257 26526                     2DEC     .010724388                            
013790,000167: 
013791,000168: 13,7141           71225 42367                     2DEC     -.209651023                            
013792,000169: 13,7143           05317 25121                     2DEC     .168924633                            
013793,000170: 13,7145           62411 42576                     2DEC     -.421320442                            
013794,000171: 
013795,000172: 13,7147           12056 05734                     2DEC     .315318927                            
013796,000173: 13,7151           67032 52641                     2DEC     -.279642455                            
013797,000174: 13,7153           67310 51624                     2DEC     -.269024294                            

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