Source Code

These source-code files are part of a reconstructed copy of Sunrise 69, the final 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, 1003133-20, and 1003733-071. 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.

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

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