Source Code

These source-code files are part of a reconstructed copy of Sunrise 45, the penultimate release of the Block I Command Module (CM) Apollo Guidance Computer (AGC) system test software.

They have been created via disassembly of binary dumps of original core rope memory modules, part numbers 1003133-18, 1003133-19, and 1003133-20. Corresponding portions of code have been copied from Solarium 55 where applicable. Extensive use was also made of the AGC Information Series documents, which were specifically written about the Sunrise software.

Since only binary dumps (rather than listings) of Sunrise 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.

010744,000002:                                                                                                  ## Copyright:   Public domain.
010745,000003:                                                                                                  ## Filename:    KEYRUPT_UPRUPT_FRESH_START.agc
010746,000004:                                                                                                  ## Purpose:     A section of Sunrise 45.
010747,000005:                                                                                                  ##              It is part of the reconstructed source code for the penultimate
010748,000006:                                                                                                  ##              release of the Block I Command Module system test software. No
010749,000007:                                                                                                  ##              original listings of this program are available; instead, this
010750,000008:                                                                                                  ##              file was created via disassembly of dumps of Sunrise core rope
010751,000009:                                                                                                  ##              memory modules and comparison with the later Block I program
010752,000010:                                                                                                  ##              Solarium 55.
010753,000011:                                                                                                  ## Assembler:   yaYUL --block1
010754,000012:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
010755,000013:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
010756,000014:                                                                                                  ## Mod history: 2022-12-09 MAS  Initial reconstructed source.
010757,000015: 
010758,000016: 
010759,000017: 04,7265                                           BANK     4                                     
010760,000018: 04,7265           72765        KEYRUPT1           MASK     LOW5                                  #  C(IN0) IN A
010761,000019: 04,7266           64504                           AD       BIT11                                 
010762,000020: 04,7267           50702                           TS       TMKEYBUF                              
010763,000021: 04,7270           32774                           CAF      PRIO30                                
010764,000022: 04,7271           02043                           TC       NOVAC                                 
010765,000023: 04,7272           50010                           CADR     CHARIN                                
010766,000024: 04,7273           32765                           CAF      LOW5                                  
010767,000025: 04,7274           70702                           MASK     TMKEYBUF                              
010768,000026: 04,7275           20574                           INDEX    LOCCTR                                
010769,000027: 04,7276           50114                           TS       MPAC                                  #  LEAVE 5 BIT KEY CDE IN MPAC FOR CHARIN
010770,000028: 04,7277           02211                           TC       RESUME                                
010771,000029: 
010772,000030: 
010773,000031: 04,7300           35500        UPRUPTB            CAF      ZERO                                  
010774,000032: 04,7301           30041                           XCH      UPLINK                                #  ZERO UPLINK
010775,000033: 04,7302           50573                           TS       KEYTEMP1                              
010776,000034: 04,7303           10737                           CCS      DSPTAB     +7                         #  TURN ON UPACT LIGHT
010777,000035: 04,7304           07306                           TC       +2                                    #  UPACT = BIT 11 OF DSPTAB +7
010778,000036: 04,7305           37370                           CAF      B12-1                                 #  SAFETY PLAY
010779,000037: 04,7306           64516                           AD       ONE                                   
010780,000038: 04,7307           50564                           TS       KEYTEMP2                              #  MAG OF DSPTAB +7 INTO KEYTEMP2
010781,000039: 04,7310           74504                           MASK     BIT11                                 
010782,000040: 04,7311           10000                           CCS      A                                     
010783,000041: 04,7312           07322                           TC       UPRPT1                                #  BIT 11 ALREADY ONE
010784,000042: 04,7313           30564                           XCH      KEYTEMP2                              #  BIT 11 = 0
010785,000043: 04,7314           64504                           AD       BIT11                                 
010786,000044: 04,7315           40000                           CS       A                                     #  STORE NEGATIVELY
010787,000045: 04,7316           30737                           XCH      DSPTAB     +7                         
010788,000046: 04,7317           10000                           CCS      A                                     
010789,000047: 04,7320           07371                           TC       INCNOUTU                              #  PREVIOUS CONTENTS WAS +
010790,000048: 04,7321           30000                           NOOP                                           #  SAFETY PLAY
010791,000049: 04,7322           32765        UPRPT1             CAF      LOW5                                  #  TEST FOR TRIPLE CHAR REDUNDANCY
010792,000050: 04,7323           70573                           MASK     KEYTEMP1                              #  LOW5 OF WORD
010793,000051: 04,7324           30573                           XCH      KEYTEMP1                              #  LOW5 INTO KEYTEMP1
010794,000052: 04,7325           30021                           XCH      SR                                    #  WHOLE WORD INTO SR
010795,000053: 04,7326           50564                           TS       KEYTEMP2                              #  ORIGINAL SR INTO KEYTEMP2
010796,000054: 04,7327           07352                           TC       SRGHT5                                
010797,000055: 04,7330           72765                           MASK     LOW5                                  #  MID 5
010798,000056: 04,7331           67367                           AD       HI10                                  
010799,000057: 04,7332           07361                           TC       UPTEST                                
010800,000058: 04,7333           07352                           TC       SRGHT5                                
010801,000059: 04,7334           72765                           MASK     LOW5                                  #  HIGH 5
010802,000060: 04,7335           40000                           COM                                            
010803,000061: 04,7336           07361                           TC       UPTEST                                
010804,000062: 04,7337           07346        UPOK               TC       RESTORSR                              #  CODE IS GOOD
010805,000063: 04,7340           30573                           XCH      KEYTEMP1                              
010806,000064: 04,7341           64511                           AD       BIT6                                  
010807,000065: 04,7342           07266                           TC       KEYRUPT1   +1                         
010808,000066: 
010809,000067: 04,7343           07346        TMFAIL2            TC       RESTORSR                              #  CODE IS BAD
010810,000068: 04,7344           02361                           TC       TMFAIL                                
010811,000069: 04,7345           02211                           TC       RESUME                                
010812,000070: 
010813,000071: 04,7346           30564        RESTORSR           XCH      KEYTEMP2                              
010814,000072: 04,7347           60000                           DOUBLE                                         
010815,000073: 04,7350           50021                           TS       SR                                    
010816,000074: 04,7351           00001                           TC       Q                                     
010817,000075: 
010818,000076: 04,7352           40021        SRGHT5             CS       SR                                    
010819,000077: 04,7353           40021                           CS       SR                                    
010820,000078: 04,7354           40021                           CS       SR                                    
010821,000079: 04,7355           40021                           CS       SR                                    
010822,000080: 04,7356           40021                           CS       SR                                    
010823,000081: 04,7357           40000                           CS       A                                     
010824,000082: 04,7360           00001                           TC       Q                                     #  DELIVERS WORD UNCOMPLEMENTED
010825,000083: 
010826,000084: 04,7361           60573        UPTEST             AD       KEYTEMP1                              
010827,000085: 04,7362           10000                           CCS      A                                     
010828,000086: 04,7363           07343                           TC       TMFAIL2                               
010829,000087: 04,7365                                           LOC      +1                                    
010830,000088: 04,7365           07343                           TC       TMFAIL2                               
010831,000089: 04,7366           00001                           TC       Q                                     
010832,000090: 
010833,000091: 04,7367           77740        HI10               OCT      77740                                 
010834,000092: 04,7370     2066               UPBANK             EQUALS   EXECBANK                              #  IN SAME BANK AS EXEC.
010835,000093: 
010836,000094: 04,7370           03777        B12-1              OCT      3777                                  
010837,000095: 
010838,000096: 04,7371           30727        INCNOUTU           XCH      NOUT                                  
010839,000097: 04,7372           64516                           AD       ONE                                   
010840,000098: 04,7373           50727                           TS       NOUT                                  
010841,000099: 04,7374           20001                           INDEX    Q                                     
010842,000100: 04,7375           00001        UPLAST             TC       1                                     
010843,000101: 
010844,000102:                                                                                                  #  UPACT IS TURNED OFF BY VBRELDSP, ALSO BY ERROR LIGHT RESET.
010845,000103: 
010846,000104: 
010847,000105:                                                                                                  #  THE RECEPTION OF A BAD CODE BY UPLINK LOCKS OUT FURTHER UPLINK ACTIVITY 
010848,000106:                                                                                                  #  BY PLACING A 1 INTO UPLOCK (BIT2 OF STATE). BIT9 (AND BIT11) OF TMKEYBUF
010849,000107:                                                                                                  #  IS SET TO 1 TO SEND AN INDICATION OF THIS SITUATION DOWN THE DOWNLINK.
010850,000108:                                                                                                  #  THE UPLINK INTERLOCK IS ALLOWED WHEN AN ERROR LIGHT RESET CODE IS SENT
010851,000109:                                                                                                  #  UP THE UPLINK, OR WHEN A FRESH START IS PERFORMED.
010852,000110: 
010853,000111: 
010854,000112:    3200                                           SETLOC   3200                                  
010855,000113: 
010856,000114:    3200           32066        UPRUPT             CAF      UPBANK                                
010857,000115:    3201           30015                           XCH      BANKREG                               
010858,000116:    3202           50575                           TS       BANKRUPT                              
010859,000117:    3203           07300                           TC       UPRUPTB                               

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