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.

003851,000002:                                                                                                  ## Copyright:   Public domain.
003852,000003:                                                                                                  ## Filename:    FRESH_START_AND_RESTART.agc
003853,000004:                                                                                                  ## Purpose:     A section of Sunrise 45.
003854,000005:                                                                                                  ##              It is part of the reconstructed source code for the penultimate
003855,000006:                                                                                                  ##              release of the Block I Command Module system test software. No
003856,000007:                                                                                                  ##              original listings of this program are available; instead, this
003857,000008:                                                                                                  ##              file was created via disassembly of dumps of Sunrise core rope
003858,000009:                                                                                                  ##              memory modules and comparison with the later Block I program
003859,000010:                                                                                                  ##              Solarium 55.
003860,000011:                                                                                                  ## Assembler:   yaYUL --block1
003861,000012:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
003862,000013:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
003863,000014:                                                                                                  ## Mod history: 2022-12-09 MAS  Initial reconstructed source.
003864,000015: 
003865,000016:                                                                                                  ## Names in this section are largely taken from AGC Information Series Issue 16,
003866,000017:                                                                                                  ## Progress Control and Fresh Start and Restart.
003867,000018: 
003868,000019: 04,6744                                           BANK     4                                     
003869,000020:                                                                                                  #        FRESH START - A KEYBOARD REQUEST TO INITIALIZE THE SYSTEM.
003870,000021: 
003871,000022: 04,6744           20017        SLAP1              INHINT                                         #  COMES HERE FROM THE PINBALL VERB FAN.
003872,000023: 04,6745           35500                           CAF      ZERO                                  #   (ZERO FAILREG IN FRESH START ONLY).
003873,000024: 04,6746           50756                           TS       FAILREG                               
003874,000025: 
003875,000026: 04,6747           07077                           TC       STARTSUB                              #  SUBROUTINE DOES MOST OF THE WORK.
003876,000027: 
003877,000028: 04,6750           45500        NOGO               CS       ZERO                                  
003878,000029: 04,6751           50655                           TS       PHASETAB                              
003879,000030: 04,6752           50656                           TS       PHASETAB   +1                         
003880,000031: 04,6753           50657                           TS       PHASETAB   +2                         
003881,000032: 04,6754           50660                           TS       PHASETAB   +3                         
003882,000033: 04,6755           50661                           TS       BACKPHAS                              
003883,000034: 04,6756           50662                           TS       BACKPHAS   +1                         
003884,000035: 04,6757           50663                           TS       BACKPHAS   +2                         
003885,000036: 04,6760           50664                           TS       BACKPHAS   +3                         
003886,000037: 04,6761           35500                           CAF      ZERO                                  
003887,000038: 04,6762           50665                           TS       PHASEBAR                              
003888,000039: 04,6763           50666                           TS       PHASEBAR   +1                         
003889,000040: 04,6764           50667                           TS       PHASEBAR   +2                         
003890,000041: 04,6765           50670                           TS       PHASEBAR   +3                         
003891,000042: 
003892,000043: 04,6766           51567                           TS       SMODE                                 
003893,000044: 
003894,000045: 04,6767           34500                           CAF      BIT15                                 #  TELL T4RUPT TO TURN OFF ALL C RELAYS.
003895,000046: 04,6770           50743                           TS       DSPTAB     +11D                       
003896,000047: 04,6771           50744                           TS       DSPTAB     +12D                       
003897,000048: 04,6772           50745                           TS       DSPTAB     +13D                       
003898,000049: 
003899,000050: 04,6773           07057                           TC       ENDFRESH                              
003900,000051: 
003901,000052: 04,6774     4516               MAXPROG            EQUALS   ONE                                   
003902,000053: 
003903,000054:                                                                                                  #        WHENEVER A GO SEQUENCE (GOJAM) IS FIRED,  GOPROG  IS CALLED TO RESTART ANY COMPUTER ACTIVITY THAT
003904,000055:                                                                                                  #  MAY HAVE BEEN GOING ON AT THE TIME. (A NUMBER OF ALARMS SUCH AS PARITY FAILURE OR POWER FAILURE CAUSE GOJAM).
003905,000056:                                                                                                  #  THE FUNCTION OF GOPROG IS TO INITIALIZE THE COMPUTER SUB-SYSTEM (I.E., NO C RELAYS ARE CHANGED, ETC.) AND
003906,000057:                                                                                                  #  RESTART ALL MAJOR ROUTINES WHOSE PHASE BITS INDICATE ACTIVITY.
003907,000058: 
003908,000059: 04,6774           07077        GOPROG             TC       STARTSUB                              
003909,000060: 
003910,000061: 04,6775           34473                           CAF      THREE                                 #  PHASE BITS ARE KEPT IN THREE COPIES,
003911,000062: 04,6776           50114        PHASECHK           TS       MPAC                                  #  TWO DIRECT AND ONE COMPLEMENTED. THIS
003912,000063: 04,6777           20000                           INDEX    A                                     #  SECTION MAKES SURE ALL ENTRIES IN EACH
003913,000064: 04,7000           40655                           CS       PHASETAB                              #  SATISFIES THIS RULE AS AN INDICATION OF
003914,000065: 04,7001           50076                           TS       BUF                                   #  THE GOODNESS OF ERASABLE MEMORY. IF THE
003915,000066: 04,7002           20114                           INDEX    MPAC                                  #  TEST FAILS, DO A FRESH START WITH THE
003916,000067: 04,7003           40661                           CS       BACKPHAS                              #  MODE LIGHTS SET TO 00 TO TELL THE STORY.
003917,000068: 04,7004           50077                           TS       BUF        +1                         
003918,000069: 04,7005           40000                           COM                                            
003919,000070: 04,7006           70076                           MASK     BUF                                   
003920,000071: 04,7007           07072                           TC       ZEROTEST                              #  P.(-P) AND (-P).(--P) SHOULD BOTH BE
003921,000072: 04,7010           20114                           INDEX    MPAC                                  #  +0 FOR A LOGICAL MATCH.
003922,000073: 04,7011           60665                           AD       PHASEBAR                              
003923,000074: 04,7012           50100                           TS       BUF        +2                         
003924,000075: 04,7013           40000                           COM                                            
003925,000076: 04,7014           70077                           MASK     BUF        +1                         
003926,000077: 04,7015           07072                           TC       ZEROTEST                              
003927,000078: 04,7016           40100                           CS       BUF        +2                         
003928,000079: 04,7017           70076                           MASK     BUF                                   
003929,000080: 04,7020           07072                           TC       ZEROTEST                              
003930,000081: 04,7021           40076                           CS       BUF                                   
003931,000082: 04,7022           70077                           MASK     BUF        +1                         
003932,000083: 04,7023           07072                           TC       ZEROTEST                              
003933,000084: 04,7024           40076                           CS       BUF                                   
003934,000085: 04,7025           70100                           MASK     BUF        +2                         
003935,000086: 04,7026           07072                           TC       ZEROTEST                              
003936,000087: 04,7027           40077                           CS       BUF        +1                         
003937,000088: 04,7030           70100                           MASK     BUF        +2                         
003938,000089: 04,7031           07072                           TC       ZEROTEST                              
003939,000090: 
003940,000091: 04,7032           10114        ENDVOTE            CCS      MPAC                                  
003941,000092: 04,7033           06776                           TC       PHASECHK                              
003942,000093: 
003943,000094: 04,7034           34516        GOJUMP             CAF      MAXPROG                               
003944,000095: 04,7035           50115                           TS       MPAC       +1                         
003945,000096: 
003946,000097: 04,7036           20016                           RELINT                                         #  OPEN THE INTERRUPT GATE SO THAT EACH
003947,000098: 04,7037           20017                           INHINT                                         #  GO DISPATCH HAS 10 MS.
003948,000099: 
003949,000100: 04,7040           50574                           TS       PHASDATA                              
003950,000101: 04,7041           06502                           TC       REPHASE2                              
003951,000102: 04,7042           06701                           TC       ONSKIP                                
003952,000103: 04,7043           07052                           TC       GORETURN                              
003953,000104: 04,7044           07064                           TC       DEMANDON                              
003954,000105: 
003955,000106: 04,7045           30565                           XCH      PHASE                                 
003956,000107: 04,7046           50114                           TS       MPAC                                  
003957,000108: 04,7047           20566                           INDEX    PROG                                  
003958,000109: 04,7050           37257                           CAF      GOCADR                                
003959,000110: 04,7051           02524                           TC       SWCALL                                
003960,000111: 
003961,000112: 04,7052           10115        GORETURN           CCS      MPAC       +1                         
003962,000113: 04,7053           07035                           TC       GOJUMP     +1                         
003963,000114: 
003964,000115: 04,7054           32650                           CAF      ALARMPR                               #  FIRE UP JOB TO DISPLAY FAILREG
003965,000116: 04,7055           02043                           TC       NOVAC                                 
003966,000117: 04,7056           02634                           CADR     DOALARM                               
003967,000118: 
003968,000119: 04,7057           20016        ENDFRESH           RELINT                                         
003969,000120: 04,7060           02516                           TC       BANKCALL                              #  DISPLAY MAJOR MODES.
003970,000121: 04,7061           42001                           CADR     DSPMM                                 
003971,000122: 
003972,000123: 04,7062           02563                           TC       POSTJUMP                              
003973,000124: 04,7063           13337                           CADR     DUMMYJOB                              #  THIS REVERTS TO THE IDLING JOB.
003974,000125: 
003975,000126: 04,7064           40566        DEMANDON           CS       PROG                                  
003976,000127: 04,7065           20000                           INDEX    A                                     
003977,000128: 04,7066           34516                           CAF      BIT1                                  
003978,000129: 04,7067           60622                           AD       MODREG                                
003979,000130: 04,7070           50622                           TS       MODREG                                
003980,000131: 04,7071           00001                           TC       Q                                     
003981,000132: 
003982,000133: 04,7072           10000        ZEROTEST           CCS      A                                     
003983,000134: 04,7073           06750                           TC       NOGO                                  #  RESTART FROM GO IMPOSSIBLE.
003984,000135: 04,7074           00001                           TC       Q                                     #  OK SO FAR
003985,000136: 04,7075           06750                           TC       NOGO                                  
003986,000137: 04,7076           06750                           TC       NOGO                                  
003987,000138: 
003988,000139:                                                                                                  #        INITIALIZATION SUBROUTINE, CONTAINING INITIALIZATION COMMON TO BOTH FRESH START (KEYBOARD REQUEST) AND
003989,000140:                                                                                                  #  RESTART (IN RESPONSE TO A GO SEQUENCE).
003990,000141: 
003991,000142: 04,7077           30001        STARTSUB           XCH      Q                                     
003992,000143: 04,7100           50076                           TS       BUF                                   #  EXEC TEMPS ARE AVAILABLE TO US.
003993,000144: 
003994,000145: 04,7101           34476                           CAF      POSMAX                                #  T3 AND T4 OVERFLOW AS SOON AS POSSIBLE.
003995,000146: 04,7102           50037                           TS       TIME3                                 #    (POSMAX IS PSEUDO INTERRUPT SIGNAL IN
003996,000147: 04,7103           50040                           TS       TIME4                                 #    CASE RUPT SIGNALLED BEFORE TS TIME3),
003997,000148: 
003998,000149: 04,7104           34517                           CAF      NEG1/2                                #  INITIALIZE WAITLIST DELTA-TS.
003999,000150: 04,7105           50555                           TS       LST1       +4                         
004000,000151: 04,7106           50554                           TS       LST1       +3                         
004001,000152: 04,7107           50553                           TS       LST1       +2                         
004002,000153: 04,7110           50552                           TS       LST1       +1                         
004003,000154: 04,7111           50551                           TS       LST1                                  
004004,000155: 
004005,000156: 04,7112           42202                           CS       ENDTASK                               #  SET ALL TASKS TO DUMMY TASK.
004006,000157: 04,7113           50563                           TS       LST2       +5                         
004007,000158: 04,7114           50562                           TS       LST2       +4                         
004008,000159: 04,7115           50561                           TS       LST2       +3                         
004009,000160: 04,7116           50560                           TS       LST2       +2                         
004010,000161: 04,7117           50557                           TS       LST2       +1                         
004011,000162: 04,7120           50556                           TS       LST2                                  
004012,000163: 
004013,000164: 04,7121           45500                           CS       ZERO                                  #  MAKE ALL EXECUTIVE REGISTER SETS
004014,000165: 04,7122           50133                           TS       PRIORITY   +8D                        #  AVAILABLE (EXCEPT THIS ONE).
004015,000166: 04,7123           50143                           TS       PRIORITY   +16D                       
004016,000167: 04,7124           50153                           TS       PRIORITY   +24D                       
004017,000168: 04,7125           50163                           TS       PRIORITY   +32D                       
004018,000169: 04,7126           50173                           TS       PRIORITY   +40D                       
004019,000170: 04,7127           50203                           TS       PRIORITY   +48D                       
004020,000171: 04,7130           50213                           TS       PRIORITY   +56D                       
004021,000172: 
004022,000173: 04,7131           50703                           TS       DSRUPTSW                              #  -0 GIVES US 40 MS TO GET READY FOR T4.
004023,000174: 04,7132           50704                           TS       CDUIND                                #  MAKE IMU AND OPTICS AVAILABLE.
004024,000175: 04,7133           50723                           TS       OPTIND                                
004025,000176: 
004026,000177: 
004027,000178: 04,7134           37263                           CAF      VAC1ADRC                              #  MAKE ALL VAC AREAS AVAILABLE.
004028,000179: 04,7135           50214                           TS       VAC1USE                               
004029,000180: 04,7136           67264                           AD       LTHVACA                               
004030,000181: 04,7137           50270                           TS       VAC2USE                               
004031,000182: 04,7140           67264                           AD       LTHVACA                               
004032,000183: 04,7141           50344                           TS       VAC3USE                               
004033,000184: 04,7142           67264                           AD       LTHVACA                               
004034,000185: 04,7143           50420                           TS       VAC4USE                               
004035,000186: 04,7144           67264                           AD       LTHVACA                               
004036,000187: 04,7145           50474                           TS       VAC5USE                               
004037,000188: 
004038,000189: 04,7146           34505                           CAF      BIT10                                 #  THIS REGISTER SET BECOMES DUMMY JOB.
004039,000190: 04,7147           50123                           TS       PRIORITY                              
004040,000191: 
004041,000192: 04,7150           34510                           CAF      BIT7                                  
004042,000193: 04,7151           50011                           TS       OUT1                                  
004043,000194: 
004044,000195: 04,7152           33000                           CAF      TEN                                   #  TURN OFF ALL DISPLAY SYSTEM RELAYS.
004045,000196: 04,7153           50114        DSPOFF             TS       MPAC                                  
004046,000197: 04,7154           44503                           CS       BIT12                                 
004047,000198: 04,7155           20114                           INDEX    MPAC                                  
004048,000199: 04,7156           50730                           TS       DSPTAB                                
004049,000200: 04,7157           10114                           CCS      MPAC                                  
004050,000201: 04,7160           07153                           TC       DSPOFF                                
004051,000202: 
004052,000203: 04,7161           50726                           TS       DSPCNT                                #  SKIPS TO HERE WHEN FINISHED WITH C(A)=0.
004053,000204: 04,7162           50550                           TS       NEWJOB                                
004054,000205: 04,7163           50622                           TS       MODREG                                
004055,000206: 04,7164           50640                           TS       CADRSTOR                              
004056,000207: 04,7165           50624                           TS       REQRET                                
004057,000208: 04,7166           50646                           TS       CLPASS                                
004058,000209: 04,7167           50623                           TS       DSPLOCK                               
004059,000210: 04,7170           50636                           TS       MONSAVE                               #  KILL MONITOR
004060,000211: 04,7171           50637                           TS       MONSAVE1                              
004061,000212: 04,7172           50641                           TS       GRABLOCK                              
004062,000213: 04,7173           50612                           TS       VERBREG                               
004063,000214: 04,7174           50613                           TS       NOUNREG                               
004064,000215: 04,7175           50647                           TS       DSPLIST                               
004065,000216: 04,7176           50650                           TS       DSPLIST    +1                         
004066,000217: 04,7177           50651                           TS       DSPLIST    +2                         
004067,000218: 04,7200           50652                           TS       STATE                                 
004068,000219: 04,7201           50653                           TS       STATE      +1                         
004069,000220: 04,7202           50654                           TS       STATE      +2                         
004070,000221: 04,7203           50673                           TS       PWTCADR                               
004071,000222: 04,7204           50674                           TS       PWTCADR    +1                         
004072,000223: 04,7205           50751                           TS       DESKSET                               #  NO COMPUTER COMMAND.
004073,000224: 04,7206           50752                           TS       DESOPSET                              #  (SAME AS IMU).
004074,000225: 04,7207           50753                           TS       IMUCADR                               #  INITIALIZE MODE-SWITCHING.
004075,000226: 04,7210           50754                           TS       OPTCADR                               
004076,000227: 04,7211           50746                           TS       OLDERR                                
004077,000228: 04,7212           50676                           TS       DISPBUF                               
004078,000229: 04,7213           50700                           TS       IDPLACER                              
004079,000230: 04,7214           50701                           TS       TMINDEX                               
004080,000231: 04,7215           50702                           TS       TMKEYBUF                              
004081,000232: 04,7216           50755                           TS       MARKSTAT                              #  MAKE MARK SYSTEM AVAILABLE.
004082,000233: 04,7217           50643                           TS       IN0WORD                               
004083,000234: 04,7220           50011                           TS       OUT1                                  
004084,000235: 
004085,000236: 04,7221           32765                           CAF      LOW5                                  
004086,000237: 04,7222           50671                           TS       PWTPROG                               
004087,000238: 04,7223           50672                           TS       PWTPROG    +1                         
004088,000239: 
004089,000240: 04,7224           30007                           XCH      IN3                                   
004090,000241: 04,7225           30007                           XCH      IN3                                   
004091,000242: 04,7226           50747                           TS       WASKSET                               
004092,000243: 04,7227           74717                           MASK     LOW7                                  
004093,000244: 04,7230           30747                           XCH      WASKSET                               
004094,000245: 04,7231           77254                           MASK     OPTMODES                              
004095,000246: 04,7232           50750                           TS       WASOPSET                              
004096,000247: 
004097,000248: 04,7233           02507                           TC       READIN0                               
004098,000249: 04,7234           10000                           CCS      A                                     
004099,000250: 04,7235           07243                           TC       NOACPT                                
004100,000251: 04,7236           07243                           TC       NOACPT                                
004101,000252: 04,7237           07240                           TC       +1                                    
004102,000253: 04,7240           44503                           CS       BIT12                                 
004103,000254: 04,7241           70750                           MASK     WASOPSET                              
004104,000255: 04,7242           50750                           TS       WASOPSET                              
004105,000256: 
004106,000257: 04,7243           34475        NOACPT             CAF      SIX                                   #  (MAY NOT GET ANY ENDPULSES BEFORE T4).
004107,000258: 04,7244           50675                           TS       TELCOUNT                              
004108,000259: 
004109,000260: 04,7245           37255                           CAF      NOMADR                                
004110,000261: 04,7246           50677                           TS       DNLSTADR                              
004111,000262: 
004112,000263: 04,7247           37256                           CAF      NOUTCON                               
004113,000264: 04,7250           50727                           TS       NOUT                                  
004114,000265: 
004115,000266: 04,7251           42775                           CS       VD1                                   
004116,000267: 04,7252           50625                           TS       DSPCOUNT                              
004117,000268: 04,7253           00076                           TC       BUF                                   #  DONE.
004118,000269: 
004119,000270: 
004120,000271: 04,7254           35000        OPTMODES           OCT      35000                                 
004121,000272: 04,7255           02367        NOMADR             ADRES    DNLST1                                
004122,000273: 04,7256           00013        NOUTCON            DEC      11         B-14                       
004123,000274: 
004124,000275: 04,7257           46726        GOCADR             CADR     PRELGO                                
004125,000276: 04,7260           44255                           CADR     FFGO                                  
004126,000277: 04,7261           11261                           CADR     11261                                 
004127,000278: 04,7262           11262                           CADR     11262                                 
004128,000279: 
004129,000280: 04,7263           00214        VAC1ADRC           ADRES    VAC1USE                               
004130,000281: 04,7264           00054        LTHVACA            DEC      44         B-14                       

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