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.

003288,000002:                                                                                                  ## Copyright:   Public domain.
003289,000003:                                                                                                  ## Filename:    WAITLIST.agc
003290,000004:                                                                                                  ## Purpose:     A section of Sunrise 45.
003291,000005:                                                                                                  ##              It is part of the reconstructed source code for the penultimate
003292,000006:                                                                                                  ##              release of the Block I Command Module system test software. No
003293,000007:                                                                                                  ##              original listings of this program are available; instead, this
003294,000008:                                                                                                  ##              file was created via disassembly of dumps of Sunrise core rope
003295,000009:                                                                                                  ##              memory modules and comparison with the later Block I program
003296,000010:                                                                                                  ##              Solarium 55.
003297,000011:                                                                                                  ## Assembler:   yaYUL --block1
003298,000012:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
003299,000013:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
003300,000014:                                                                                                  ## Mod history: 2022-12-09 MAS  Initial reconstructed source.
003301,000015: 
003302,000016: 
003303,000017:                                                                                                  #  CHECK-OUT STATUS - UNIT VERIFICATION COMPLETE MAY, 1965               EXCEPT LONGCALL SECTION.
003304,000018: 
003305,000019:                                                                                                  #  DO NOT CHANGE THIS SECTION WITHOUT PRB APPROVAL.
003306,000020: 
003307,000021:                                                                                                  #  GROUNDRULE....DELTA T SHOULD NOT EXCEED 12000 (= 2 MINUTES)
003308,000022: 
003309,000023:    2124                                           BANK     1                                     
003310,000024:    2124           50572        WAITLIST           TS       DELT                                  #  STORE DELTA T = TD - T (TD = DESIRED
003311,000025:    2125           30001                           XCH      Q                                     #    TIME FOR FUTURE ACTION).
003312,000026:    2126           02056                           TC       EXECCOM                               #  PICK UP TASK ADDRESS AND SAVE BANKREG.
003313,000027:    2127           06352                           TC       WTLST3                                
003314,000028: 
003315,000029: 04,6352                                           BANK     4                                     
003316,000030: 04,6352           40037        WTLST3             CS       TIME3                                 
003317,000031: 04,6353           66354                           AD       +1                                    #  CCS  A  = + 1/4
003318,000032: 04,6354           10000                           CCS      A                                     #  TEST  1/4 - C(TIME3).  IF POSITIVE,
003319,000033:                                                                                                  #  IT MEANS THAT TIME3 OVERFLOW HAS OCCURRED PRIOR TO CS  TIME3 AND THAT
003320,000034:                                                                                                  #  C(TIME3) = T - T1, INSTEAD OF 1.0 - (T1 - T).  THE FOLLOWING FOUR
003321,000035:                                                                                                  #  ORDERS SET C(A) = TD - T1 + 1 IN EITHER CASE.  C(CSQ) = CS  Q = 40001
003322,000036:                                                                                                  #  AND  C(TSQ) = TS  Q = 50001   NOTATION...   1 - 00001,  1.0 = 37777+1
003323,000037: 
003324,000038: 04,6355           64663                           AD       CSQ                                   #  OVERFLOW HAS OCCURRED.  SET C(A) = 
003325,000039: 04,6356           40000                           CS       A                                     #  T - T1 + 3/4 - 1
003326,000040: 
003327,000041:                                                                                                  #  NORMAL CASE (C(A) MINUS) YIELDS SAME C(A)  -(-(1.0-(T1-T))+1/4)-1
003328,000042: 
003329,000043: 04,6357           64560                           AD       TSQ                                   #  TS  Q  = - 3/4 + 2
003330,000044: 04,6360           60572                           AD       DELT                                  #  RESULT = TD - T1 + 1
003331,000045:                                                                                                  #                10W             
003332,000046: 04,6361           10000                           CCS      A                                     #  TEST TD - T1 + 1
003333,000047: 
003334,000048: 04,6362           60551                           AD       LST1                                  #  IF TD - T1 POS, GO TO WTLST5 WITH
003335,000049: 04,6363           06423                           TC       WTLST5                                #  C(A) = (TD - T1) + C(LST1) = TD-T2+1
003336,000050: 
003337,000051: 04,6364           06365                           TC       +1                                    
003338,000052: 04,6365           40572                           CS       DELT                                  
003339,000053: 
003340,000054:                                                                                                  #  NOTE THAT THIS PROGRAM SECTION IS NEVER ENTERED WHEN T-T1 G/E -1, 
003341,000055:                                                                                                  #  SINCE TD-T1+1 = (TD-T) + (T-T1+1), AND DELTA T = TD-T G/E +1.  (G/E
003342,000056:                                                                                                  #  SYMBOL MEANS GREATER THAN OR EQUAL TO).  THUS THERE NEED BE NO CON-
003343,000057:                                                                                                  #  CERN OVER A PREVIOUS OR IMMINENT OVERFLOW OF TIME3 HERE.
003344,000058: 
003345,000059: 04,6366           64521                           AD       POS1/2                                #  WHEN TD IS NEXT, FORM QUANTITY
003346,000060: 04,6367           64521                           AD       POS1/2                                #    1.0 - DELTA T = 1.0 - (TD - T)
003347,000061: 04,6370           30037                           XCH      TIME3                                 
003348,000062: 04,6371           64562                           AD       MSIGN                                 
003349,000063: 04,6372           60572                           AD       DELT                                  
003350,000064: 04,6373           50572                           TS       DELT                                  
003351,000065: 04,6374           35500                           CAF      ZERO                                  
003352,000066: 04,6375           30572                           XCH      DELT                                  
003353,000067: 04,6376           30551        WTLST4             XCH      LST1                                  
003354,000068: 04,6377           30552                           XCH      LST1       +1                         
003355,000069: 04,6400           30553                           XCH      LST1       +2                         
003356,000070: 04,6401           30554                           XCH      LST1       +3                         
003357,000071: 04,6402           30555                           XCH      LST1       +4                         
003358,000072: 04,6403           30566                           XCH      EXECTEM2                              #  TASK ADDRESS.
003359,000073: 04,6404           20572                           INDEX    NVAL                                  
003360,000074: 04,6405           06406                           TC       +1                                    
003361,000075: 04,6406           30556                           XCH      LST2                                  
003362,000076: 04,6407           30557                           XCH      LST2       +1                         
003363,000077: 04,6410           30560                           XCH      LST2       +2                         
003364,000078: 04,6411           30561                           XCH      LST2       +3                         
003365,000079: 04,6412           30562                           XCH      LST2       +4                         
003366,000080: 04,6413           30563                           XCH      LST2       +5                         #  AT END, CHECK THAT C(LST2+5) IS STD
003367,000081: 04,6414           62202                           AD       ENDTASK                               #    END ITEM, AS CHECK FOR EXCEEDING
003368,000082:                                                                                                  #    THE LENGTH OF THE LIST.
003369,000083: 04,6415           10000                           CCS      A                                     
003370,000084: 04,6416           02652                           TC       ABORT                                 #  WAITLIST OVERFLOW.
003371,000085: 04,6417           01203                           OCT      01203                                 
003372,000086: 04,6420           06416                           TC       -2                                    
003373,000087: 
003374,000088: 04,6421           30565                           XCH      EXECTEM1                              #  RETURN TO CALLER.
003375,000089: 04,6422           02067                           TC       LVWTLIST                              #  SAME ROUTINE AS FINDVAC, ETC., EXIT.
003376,000090: 
003377,000091: 
003378,000092: 04,6423           10000        WTLST5             CCS      A                                     #  TEST  TD - T2 + 1
003379,000093: 04,6424           60552                           AD       LST1       +1                         
003380,000094: 04,6425           06431                           TC       +4                                    
003381,000095: 04,6426           64516                           AD       ONE                                   
003382,000096: 04,6427           06464                           TC       WTLST2                                
003383,000097: 04,6430           00001                           OCT      1                                     
003384,000098: 
003385,000099: 04,6431           10000                 +4        CCS      A                                     #  TEST  TD - T3 + 1
003386,000100: 04,6432           60553                           AD       LST1       +2                         
003387,000101: 04,6433           06437                           TC       +4                                    
003388,000102: 04,6434           64516                           AD       ONE                                   
003389,000103: 04,6435           06464                           TC       WTLST2                                
003390,000104: 04,6436           00002                           OCT      2                                     
003391,000105: 
003392,000106: 04,6437           10000                 +4        CCS      A                                     #  TEST  TD - T4 + 1
003393,000107: 04,6440           60554                           AD       LST1       +3                         
003394,000108: 04,6441           06445                           TC       +4                                    
003395,000109: 04,6442           64516                           AD       ONE                                   
003396,000110: 04,6443           06464                           TC       WTLST2                                
003397,000111: 04,6444           00003                           OCT      3                                     
003398,000112: 
003399,000113: 04,6445           10000                 +4        CCS      A                                     #  TEST  TD - T5 + 1
003400,000114: 04,6446           60555                           AD       LST1       +4                         
003401,000115: 04,6447           06453                           TC       +4                                    
003402,000116: 04,6450           64516                           AD       ONE                                   
003403,000117: 04,6451           06464                           TC       WTLST2                                
003404,000118: 04,6452           00004                           OCT      4                                     
003405,000119: 
003406,000120: 04,6453           10000                 +4        CCS      A                                     #  TEST  TD - T6 + 1
003407,000121: 04,6454           06461                           TC       WTALARM                               
003408,000122: 04,6455           30000                           NOOP                                           
003409,000123: 04,6456           64516                           AD       ONE                                   
003410,000124: 04,6457           06464                           TC       WTLST2                                
003411,000125: 04,6460           00005                           OCT      5                                     
003412,000126: 
003413,000127: 04,6461           02652        WTALARM            TC       ABORT                                 
003414,000128: 04,6462           01204                           OCT      01204                                 
003415,000129: 
003416,000130: 04,6463     2067               LVWTLIST           EQUALS   FOUNDVAC                              
003417,000131: 
003418,000132: 04,6463           02203        SVCT3              TC       TASKOVER                              
003419,000133: 
003420,000134:                                                                                                  #  C(TIME3) = 1.0 - (T1 - T)
003421,000135: 
003422,000136:                                                                                                  #  C(LST1  ) = - (T2 - T1) + 1
003423,000137:                                                                                                  #  C(LST1+1) = - (T3 - T2) + 1
003424,000138:                                                                                                  #  C(LST1+2) = - (T4 - T3) + 1
003425,000139:                                                                                                  #  C(LST1+3) = - (T5 - T4) + 1
003426,000140:                                                                                                  #  C(LST1+4) = - (T6 - T5) + 1
003427,000141: 
003428,000142:                                                                                                  #  C(LST2  ) = TC  TASK1
003429,000143:                                                                                                  #  C(LST2+1) = TC  TASK2
003430,000144:                                                                                                  #  C(LST2+2) = TC  TASK3
003431,000145:                                                                                                  #  C(LST2+3) = TC  TASK4
003432,000146:                                                                                                  #  C(LST2+4) = TC  TASK5
003433,000147:                                                                                                  #  C(LST2+5) = TC  TASK6                                         11W
003434,000148: 
003435,000149: 
003436,000150:                                                                                                  #  THE ENTRY TO WTLST2 JUST PRECEDING OCT  N  IS FOR T  LE TD LE T   -1.
003437,000151:                                                                                                  #                                                     N           N+1
003438,000152:                                                                                                  #  (LE MEANS LESS THAN OR EQUAL TO).  AT ENTRY, C(A) = -(TD - T   + 1)
003439,000153:                                                                                                  #                                                              N+1
003440,000154: 
003441,000155:                                                                                                  #  THE LST1 ENTRY -(T   - T +1) IS TO BE REPLACED BY -(TD - T + 1), AND
003442,000156:                                                                                                  #                    N+1   N                                 N
003443,000157: 
003444,000158:                                                                                                  #  THE ENTRY -(T   - TD + 1) IS TO BE INSERTED IMMEDIATELY FOLLOWING.
003445,000159:                                                                                                  #               N+1
003446,000160: 
003447,000161: 04,6464           30001        WTLST2             XCH      Q                                     #  NEW C(Q) = -(TD - T   + 1)
003448,000162: 04,6465           20000                           INDEX    A                                     #                     N+1
003449,000163: 04,6466           30000                           CAF      0                                     
003450,000164: 04,6467           50572                           TS       NVAL                                  #  VALUE OF N INTO NVAL
003451,000165: 
003452,000166: 04,6470           20572                           INDEX    NVAL                                  
003453,000167: 04,6471           40550                           CS       LST1       -1                         
003454,000168: 04,6472           40000                           COM                                            
003455,000169: 04,6473           60001                           AD       Q                                     
003456,000170: 04,6474           64516                           AD       ONE                                   
003457,000171: 04,6475           20572                           INDEX    NVAL                                  #  C(A) = -(TD - T ) + 1.
003458,000172: 04,6476           50550                           TS       LST1       -1                         #                 N
003459,000173: 
003460,000174: 04,6477           40001                           CS       Q                                     #  -C(Q) = -(T    - TD) + 1
003461,000175: 04,6500           20572                           INDEX    NVAL                                  #             N+1
003462,000176: 04,6501           06376                           TC       WTLST4                                
003463,000177: 
003464,000178: 
003465,000179:                                                                                                  #        ENTERS HERE ON T3 RUPT TO DISPATCH WAITLISTED TASK.
003466,000180: 
003467,000181:    2130                                           SETLOC   WAITLIST   +4                         #  BACK TO FF.
003468,000182: 
003469,000183:    2130           77762        NEG13              DEC      -13        B-14                       
003470,000184: 
003471,000185:    2131           30015        T3RUPT             XCH      BANKREG                               #   TIME 3 OVERFLOW INTERRUPT PROGRAM
003472,000186:    2132           50575                           TS       BANKRUPT                              
003473,000187:    2133           30034                           XCH      OVCTR                                 #  1.  PICK UP CONTENTS OF THE OVERFLOW
003474,000188:    2134           50576                           TS       OVRUPT                                #     AND SAVE IN OVRUPT FOR ENTIRE T3RUPT.
003475,000189: 
003476,000190:    2135           45500        T3RUPT2            CS       ZERO                                  #  2.  SET T3 TO -0 WHILE WE MAKE UP ITS NEW
003477,000191:    2136           30037                           XCH      TIME3                                 #     CONTENTS SO WE CAN DETECT AN INCREMENT
003478,000192:    2137           64516                           AD       ONE                                   #     OCCURING IN THE PROCESS.
003479,000193:    2140           50572                           TS       ITEMP1                                
003480,000194:    2141           02143                           TC       +2                                    
003481,000195:    2142           50572                           TS       ITEMP1                                
003482,000196: 
003483,000197:    2143           34517                           CAF      NEG1/2                                
003484,000198:    2144           30555                           XCH      LST1       +4                         #  3.  MOVE UP LST1 CONTENTS, ENTERING
003485,000199:    2145           30554                           XCH      LST1       +3                         #      A VALUE OF 1/2 +1 AT THE BOTTOM
003486,000200:    2146           30553                           XCH      LST1       +2                         #      FOR T6-T5, CORRESPONDING TO THE
003487,000201:    2147           30552                           XCH      LST1       +1                         #      INTERVAL 81.93 SEC FOR ENDTASK.
003488,000202:    2150           30551                           XCH      LST1                                  
003489,000203:    2151           60572                           AD       ITEMP1                                #  4. SET T3 = 1.0 - T2 -T USING LIST 1.
003490,000204:    2152           62205                           AD       OCT17777                              
003491,000205:    2153           62205                           AD       OCT17777                              
003492,000206:    2154           60037                           AD       TIME3                                 
003493,000207:    2155           50037                           TS       TIME3                                 
003494,000208:    2156           45500                           CS       ZERO                                  
003495,000209:    2157           50564                           TS       RUPTAGN                               
003496,000210: 
003497,000211:    2160           42202                           CS       ENDTASK                               
003498,000212:    2161           30563                           XCH      LST2       +5                         #        ENTERING THE ENDTASK AT BOTTOM.
003499,000213:    2162           30562                           XCH      LST2       +4                         
003500,000214:    2163           30561                           XCH      LST2       +3                         
003501,000215:    2164           30560                           XCH      LST2       +2                         
003502,000216:    2165           30557                           XCH      LST2       +1                         
003503,000217:    2166           30556                           XCH      LST2                                  #  9.  PICK UP TOP TASK ON LIST
003504,000218: 
003505,000219:    2167           50015                           TS       BANKREG                               #  SWITCH BANKS IF NECESSARY
003506,000220:    2170           50572                           TS       ITEMP1                                
003507,000221:    2171           72201                           MASK     70K                                   
003508,000222:    2172           10000                           CCS      A                                     
003509,000223:    2173           02175                           TC       +2                                    #  IF +
003510,000224:    2174           00572                           TC       ITEMP1                                
003511,000225:    2175           30572                           XCH      ITEMP1                                
003512,000226:    2176           74605                           MASK     LOW10                                 
003513,000227:    2177           20000                           INDEX    A                                     
003514,000228:    2200           06000                           TC       6000                                  
003515,000229: 
003516,000230:    2201           70000        70K                OCT      70000                                 
003517,000231:    2202           67314        ENDTASK           -CADR     SVCT3                                 
003518,000232: 
003519,000233:                                                                                                  #  RETURN, AFTER EXECUTION OF TIME3 OVERFLOW TASK.
003520,000234:    2203           10564        TASKOVER           CCS      RUPTAGN                               #  IF +1 RETURN TO T3RUPT, IF -0 RESUME.
003521,000235:    2204           02135                           TC       T3RUPT2                               #  DISPATCH NEXT TASK IF IT WAS DUE.
003522,000236: 
003523,000237:    2205           17777        OCT17777           OCT      17777                                 
003524,000238:    2206           76000        BANKMASK           OCT      76000                                 
003525,000239: 
003526,000240:    2207           30576        OVRESUME           XCH      OVRUPT                                #  OVCTR RESTORE AND BANKREG RESTORE.
003527,000241:    2210           50034                           TS       OVCTR                                 
003528,000242: 
003529,000243:    2211           30575        RESUME             XCH      BANKRUPT                              #  STANDARD BANK-SWITCH RESUME.
003530,000244:    2212           50015                           TS       BANKREG                               
003531,000245: 
003532,000246:    2213           30027        NBRESUME           XCH      QRUPT                                 #  NO-BANK-SWITCH RESUME.
003533,000247:    2214           50001                           TS       Q                                     
003534,000248:    2215           30026                           XCH      ARUPT                                 
003535,000249:    2216           20025                           RESUME                                         

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