Source Code

These source-code files are part of a reconstructed copy of Comanche 44, the initial release (though not the final mission release) of the Apollo 10 Command Module (CM) Apollo Guidance Computer (AGC) software. Subsequent releases were Comanche 45 and Comanche 45/2 (the flown release on Apollo 10). The reconstruction is believed to be exactly accurate, but in the absence of an actual Apollo-era listing of Comanche 44, some explanation of the reconstruction process is needed to insure confidence in that accuracy.

The starting point was the source code of Comanche 51 (separately previously reconstructed from an Apollo-era listing of Comanche 55, flown on Apollo 11). Comanche 51 source code was then modified by undoing changes known to have been made between revisions 44 and 51. The now-reconstructed Comanche 44 source code was verified by assembling it and checking that the assembled code had the expected known-correct memory-bank checksums. Note that page numbers in the reconstructed code match those on the Comanche 55 printout, although the source code would likely have different page numbers in a contemporary Comanche 44 listing.

Annotations that were not present in the contemporary source code have been added to the reconstructed code to justify each change relative to Comanche 51. Here's a guide to the Apollo documentation referenced in those annotations:
In most cases, only the titles (rather than the full texts) of PCRs are known. In addition to the explanatory annotations, there is also a step-by-step commentary about the reconstruction process.

Comments expected to have been present in the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC Project's GitHub repository.

052471,000002:                                                                                                  ## Copyright:   Public domain.
052472,000003:                                                                                                  ## Filename:    WAITLIST.agc
052473,000004:                                                                                                  ## Purpose:     A section of Comanche revision 044.
052474,000005:                                                                                                  ##              It is part of the reconstructed source code for the
052475,000006:                                                                                                  ##              original release of the flight software for the Command
052476,000007:                                                                                                  ##              Module's (CM) Apollo Guidance Computer (AGC) for Apollo 10.
052477,000008:                                                                                                  ##              The code has been recreated from a copy of Comanche 055. It
052478,000009:                                                                                                  ##              has been adapted such that the resulting bugger words
052479,000010:                                                                                                  ##              exactly match those specified for Comanche 44 in NASA drawing
052480,000011:                                                                                                  ##              2021153D, which gives relatively high confidence that the
052481,000012:                                                                                                  ##              reconstruction is correct.
052482,000013:                                                                                                  ## Assembler:   yaYUL
052483,000014:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
052484,000015:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
052485,000016:                                                                                                  ## Mod history: 2020-12-03 MAS  Created from Comanche 51.
052486,000017: 

Page 1221

052488,000019:                                                                                                  #  PROGRAM DESCRIPTION                                           DATE - 10 OCTOBER 1966
052489,000020:                                                                                                  #  MOD NO - 2                                                    LOG SECTION - WAITLIST
052490,000021:                                                                                                  #  MOD BY - MILLER       (DTMAX INCREASED TO 162.5 SEC)          ASSEMBLY SUNBURST REV 5
052491,000022:                                                                                                  #  MOD 3 BY KERNAN       (INHINT INSERTED AT WAITLIST) 2/28/68 SKIPPER REV 4
052492,000023:                                                                                                  #  MOD 4 BY KERNAN       (TWIDDLE IN 54) 3/28/68 SKIPPER REV 13.
052493,000024: 
052494,000025:                                                                                                  #  FUNCTIONAL DESCRIPTION -
052495,000026:                                                                                                  #        PART OF A SECTION OF PROGRAMS,- WAITLIST, TASKOVER, T3RUPT, USED TO CALL A PROGRAM, (CALLED A TASK),
052496,000027:                                                                                                  #        WHICH IS TO BEGIN IN C(A) CENTISECONDS.  WAITLIST UPDATES TIME3, LST1 AND LST2.  THE MEANING OF THESE LISTS
052497,000028:                                                                                                  #        FOLLOW.
052498,000029: 
052499,000030:                                                                                                  #                C(TIME3) = 16384 -(T1-T) CENTISECONDS, (T=PRESENT TIME, T1-TIME FOR TASK1)
052500,000031: 
052501,000032:                                                                                                  #                        C(LST1)         =       -(T2-T1)+1
052502,000033:                                                                                                  #                        C(LST1 +1)      =       -(T3-T2)+1
052503,000034:                                                                                                  #                        C(LST1 +2)      =       -(T4-T3)+1
052504,000035:                                                                                                  #                                        .
052505,000036:                                                                                                  #                                        .
052506,000037:                                                                                                  #                        C(LST1 +6)      =       -(T8-T7)+1
052507,000038:                                                                                                  #                        C(LST1 +7)      =       -(T9-T8)+1
052508,000039: 
052509,000040:                                                                                                  #                        C(LST2)         =       2CADR OF TASK1
052510,000041:                                                                                                  #                        C(LST2 +2)      =       2CADR OF TASK2
052511,000042:                                                                                                  #                                        .
052512,000043:                                                                                                  #                                        .
052513,000044:                                                                                                  #                        C(LST2 +14)     =       2CADR OF TASK8
052514,000045:                                                                                                  #                        C(LST2 +16)     =       2CADR OF TASK9
052515,000046: 
052516,000047:                                                                                                  #  WARNINGS-
052517,000048:                                                                                                  #  --------
052518,000049:                                                                                                  #        1)      1 <= C(A) <= 16250D (1 CENTISECOND TO 162.5 SEC)
052519,000050:                                                                                                  #        2)      9 TASKS MAXIMUM
052520,000051:                                                                                                  #        3)      TASKS CALLED UNDER INTERRUPT INHIBITED
052521,000052:                                                                                                  #        4)      TASKS END BY TC TASKOVER
052522,000053: 
052523,000054:                                                                                                  #  CALLING SEQUENCE -
052524,000055:                                                                                                  #        L-1     CA      DELTAT  (TIME IN CENTISECONDS TO TASK START)
052525,000056:                                                                                                  #        L       TC      WAITLIST
052526,000057:                                                                                                  #        L+1     2CADR   DESIRED TASK
052527,000058:                                                                                                  #        L+2     (MINOR OF 2CADR)
052528,000059:                                                                                                  #        L+3     RELINT          (RETURNS HERE)
052529,000060: 
052530,000061:                                                                                                  #  TWIDDLE-
052531,000062:                                                                                                  #  -------
052532,000063:                                                                                                  #        TWIDDLE IS FOR USE WHEN THE TASK BEING SET UP IS IN THE SAME EBANK AND FBANK AS THE USER.  IN
052533,000064:                                                                                                  #        SUCH CASES, IT IMPROVES UPON WAITLIST BY ELIMINATING THE NEED FOR THE BBCON HALF OF THE 2CADR,

Page 1222

052535,000066:                                                                                                  #        SAVING A WORD.  TWIDDLE IS LIKE WAITLIST IN EVERY RESPECT EXCEPT CALLING SEQUENCE, TO WIT-
052536,000067:                                                                                                  #                L-1     CA      DELTAT
052537,000068:                                                                                                  #                L       TC      TWIDDLE
052538,000069:                                                                                                  #                L+1     ADRES   DESIRED TASK
052539,000070:                                                                                                  #                L+2     RELINT          (RETURNS HERE)
052540,000071: 
052541,000072:                                                                                                  #  NORMAL EXIT MODES -
052542,000073:                                                                                                  #        AT L+3 OF CALLING SEQUENCE
052543,000074: 
052544,000075:                                                                                                  #  ALARM OR ABORT EXIT MODES -
052545,000076:                                                                                                  #        TC      ABORT
052546,000077:                                                                                                  #        OCT     1203    (WAITLIST OVERFLOW - TOO MANY TASKS)
052547,000078: 
052548,000079:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED -
052549,000080:                                                                                                  #        ACCOMPLISHED BY FRESH START,--  LST2, ..., LST2 +16 = ENDTASK
052550,000081:                                                                                                  #                                        LST1, ..., LST1 +7  = NEG1/2
052551,000082: 
052552,000083:                                                                                                  #  OUTPUT --
052553,000084:                                                                                                  #        LST1 AND LST2 UPDATED WITH NEW TASK AND ASSOCIATED TIME.
052554,000085: 
052555,000086:                                                                                                  #  DEBRIS -
052556,000087:                                                                                                  #        CENTRALS - A,Q,L
052557,000088:                                                                                                  #        OTHER    - WAITEXIT, WAITADR, WAITTEMP, WAITBANK
052558,000089: 
052559,000090:                                                                                                  #  DETAILED ANALYSIS OF TIMING -
052560,000091:                                                                                                  #        CONTROL WILL NOT BE RETURNED TO THE SPECIFIED ADDRESS (2CADR) IN EXACTLY DELTA T CENTISECONDS.
052561,000092:                                                                                                  #        THE APPROXIMATE TIME MAY BE CALCULATED AS FOLLOWS
052562,000093:                                                                                                  #                LET TO = THE TIME OF THE TC WAITLIST
052563,000094:                                                                                                  #                LET TS = TO +147U + COUNTER INCREMENTS (SET UP TIME)
052564,000095:                                                                                                  #                LET X  = TS -(100TS)/100  (VARIANCE FROM COUNTERS)
052565,000096:                                                                                                  #                LET Y  = LENGTH OF TIME OF INHIBIT INTERRUPT AFTER T3RUPT
052566,000097:                                                                                                  #                LET Z  = LENGTH OF TIME TO PROCESS TASKS WHICH ARE DUE THIS T3RUPT BUT DISPATCHED EARLIER.
052567,000098:                                                                                                  #                (Z=0, USUALLY)
052568,000099:                                                                                                  #                LET DELTD = THE ACTUAL TIME TAKEN TO GIVE CONTROL TO 2CADR
052569,000100:                                                                                                  #        THEN DELTD = TS+DELTA T -X +Y +Z +1.05MS* +COUNTERS*
052570,000101:                                                                                                  #                *-THE TIME TAKEN BY WAITLIST ITSELF AND THE COUNTER TICKING DURING THIS WAITLIST TIME.
052571,000102:                                                                                                  #        IN SHORT, THE ACTUAL TIME TO RETURN CONTROL TO A 2CADR IS AUGMENTED BY THE TIME TO SET UP THE TASK:S
052572,000103:                                                                                                  #        INTERRUPT, ALL COUNTERS TICKING, THE T3RUPT PROCESSING TIME, THE WAITLIST PROCESSING TIME AND THE POSSIBILITY
052573,000104:                                                                                                  #        OF OTHER TASKS INHIBITING THE INTERRUPT.
052574,000105: 
052575,000106:    5235                                           BLOCK    02                                    

Page 1223

052577,000108:    5235  E3,1400                                  EBANK=   LST1                                  #  TASK LISTS IN SWITCHED E BANK.
052578,000109: 
052579,000110:    5235                                           COUNT    02/WAIT                               
052580,000111: 
052581,000112:    5235           00004        TWIDDLE            INHINT                                         
052582,000113:    5236           54001                           TS       L                                     #  SAVE DELAY TIME IN L
052583,000114:    5237           34777                           CA       POSMAX                                
052584,000115:    5240           26002                           ADS      Q                                     #  CREATING OVERFLOW AND Q-1 IN Q
052585,000116:    5241           30006                           CA       BBANK                                 
052586,000117:    5242           00006                           EXTEND                                         
052587,000118:    5243           04007                           ROR      SUPERBNK                              
052588,000119:    5244           56001                           XCH      L                                     
052589,000120: 
052590,000121:    5245           00004        WAITLIST           INHINT                                         
052591,000122:    5246           00006                           EXTEND                                         
052592,000123:    5247           65261                           BZMF     WATLST0-                              
052593,000124:    5250           56002                           XCH      Q                                     #  SAVE DELTA T IN Q AND RETURN IN
052594,000125:    5251           54061                           TS       WAITEXIT                              #  WAITEXIT.
052595,000126:    5252           00006                           EXTEND                                         
052596,000127:    5253           50061                           INDEX    WAITEXIT                              #  IF TWIDDLING, THE TS SKIPS TO HERE
052597,000128:    5254           30001                           DCA      0                                     #  PICK UP 2CADR OF TASK.
052598,000129:    5255           54063                 -1        TS       WAITADR                               #  BBCON WILL REMAIN IN L
052599,000130:    5256           35266        DLY2               CAF      WAITBB                                #  ENTRY FROM FIXDELAY AND VARDELAY.
052600,000131:    5257           56006                           XCH      BBANK                                 
052601,000132:    5260           13246                           TCF      WAIT2                                 
052602,000133: 
052603,000134:    5261           05721        WATLST0-           TC       POODOO                                
052604,000135:    5262           01204                           OCT      1204                                  #  WAITLIST CALL WITH ZERO OR NEG DT
052605,000136: 
052606,000137:                                                                                                  #  RETURN TO CALLER AFTER TASK INSERTION:
052607,000138: 
052608,000139:    5263           52062        LVWTLIST           DXCH     WAITEXIT                              
052609,000140:    5264           65016                           AD       TWO                                   
052610,000141:    5265           52006                           DTCB                                           
052611,000142: 
052612,000143:    5266  E3,1400                                  EBANK=   LST1                                  
052613,000144:    5266           02063        WAITBB             BBCON    WAIT2                                 
052614,000145: 
052615,000146:                                                                                                  #  RETURN TO CALLER +2 AFTER WAITING DT SPECIFIED AT CALLER +1.
052616,000147: 
052617,000148:    5267           50002        FIXDELAY           INDEX    Q                                     #  BOTH ROUTINES MUST BE CALLED UNDER
052618,000149:    5270           30000                           CAF      0                                     #  WAITLIST CONTROL AND TERMINATE THE TASK
052619,000150:    5271           24002                           INCR     Q                                     #  IN WHICH THEY WERE CALLED.
052620,000151: 
052621,000152:                                                                                                  #  RETURN TO CALLER +1 AFTER WAITING THE DT AS ARRIVING IN A.
052622,000153: 
052623,000154:    5272           56002        VARDELAY           XCH      Q                                     #  DT TO Q.  TASK ADRES TO WAITADR.
052624,000155:    5273           54063                           TS       WAITADR                               
052625,000156:    5274           30006                           CA       BBANK                                 #  BBANK IS SAVED DURING DELAY.
052626,000157:    5275           00006                           EXTEND                                         

Page 1224

052628,000159:    5276           04007                           ROR      SUPERBNK                              #  ADD SBANK TO BBCON.
052629,000160:    5277           54001                           TS       L                                     
052630,000161:    5300           35303                           CAF      DELAYEX                               
052631,000162:    5301           54061                           TS       WAITEXIT                              #  GO TO TASKOVER AFTER TASK ENTRY.
052632,000163:    5302           15256                           TCF      DLY2                                  
052633,000164: 
052634,000165:    5303           15322        DELAYEX            TCF      TASKOVER   -2                         #  RETURNS TO TASKOVER
052635,000166: 

Page 1225

052637,000168:                                                                                                  #  ENDTASK MUST BE ENTERED IN FIXED-FIXED SO IT IS DISTINGUISHABLE BY ITS ADRES ALONE.
052638,000169: 
052639,000170:    5304  E3,1400                                  EBANK=   LST1                                  
052640,000171:    5304           72471 73714  ENDTASK            -2CADR   SVCT3                                 
052641,000172: 
052642,000173:    5306           10076        SVCT3              CCS      FLAGWRD2                              #  DRIFT FLAG
052643,000174:    5307           15324                           TCF      TASKOVER                              
052644,000175:    5310           15324                           TCF      TASKOVER                              
052645,000176:    5311           15312                           TCF      +1                                    
052646,000177: 
052647,000178:    5312           11322                           CCS      IMUCADR                               #  DON'T DO NBDONLY IF SOMEONE ELSE IS IN
052648,000179:    5313           17717                           TCF      SVCT3X                                
052649,000180:    5314           15317                           TCF      +3                                    
052650,000181:    5315           17717                           TCF      SVCT3X                                
052651,000182:    5316           17717                           TCF      SVCT3X                                
052652,000183:    5317           37672                 +3        CAF      PRIO35                                #  COMPENSATE FOR NBD COEFFICIENTS ONLY.
052653,000184:    5320           05134                           TC       NOVAC                                 #        ENABLE EVERY 81.93 SECONDS
052654,000185:    5321  E3,1460                                  EBANK=   NBDX                                  
052655,000186:    5321           03542 14063                     2CADR    NBDONLY                               
052656,000187: 
052657,000188:    5323           15324                           TCF      TASKOVER                              
052658,000189: 
052659,000190:    6000                                           SETLOC   FFTAG6                                
052660,000191:    6000                                           BANK                                           
052661,000192: 
052662,000193:    7717           05267        SVCT3X             TC       FIXDELAY                              #  DELAY MAX OF 2 TIMES FOR IMU ZERO
052663,000194:    7720           00764                           DEC      500        B-14                       
052664,000195:    7721           05306                           TC       SVCT3                                 #  CHECK DRIFT FLAG AGAIN
052665,000196: 

Page 1226

052667,000198:                                                                                                  #  BEGIN TASK INSERTION.
052668,000199: 
052669,000200: 01,3246                                           BANK     01                                    
052670,000201: 01,3246                                           COUNT    01/WAIT                               
052671,000202: 
052672,000203: 01,3246           54062        WAIT2              TS       WAITBANK                              #  BBANK OF CALLING PROGRAM.
052673,000204: 01,3247           40026                           CS       TIME3                                 
052674,000205: 01,3250           65010                           AD       BIT8                                  #  BIT 8 = OCT 200
052675,000206: 01,3251           10000                           CCS      A                                     #  TEST 200 - C(TIME3).  IF POSITIVE,
052676,000207:                                                                                                  #  IT MEANS THAT TIME3 OVERFLOW HAS OCCURRED PRIOR TO CS TIME3 AND THAT
052677,000208:                                                                                                  #  C(TIME3) = T - T1, INSTEAD OF 1.0 - (T1 - T).  THE FOLLOWING FOUR
052678,000209:                                                                                                  #  ORDERS SET C(A) = TD - T1 + 1 IN EITHER CASE.
052679,000210: 
052680,000211: 01,3252           66056                           AD       OCT40001                              #  OVERFLOW HAS OCCURRED.  SET C(A) =
052681,000212: 01,3253           40000                           CS       A                                     #  T - T1 + 1.0 - 201
052682,000213: 
052683,000214:                                                                                                  #  NORMAL CASE (C(A) NNZ) YIELDS SAME C(A):  -( -(1.0-(T1-T)) + 200) - 1
052684,000215: 
052685,000216: 01,3254           63402                           AD       OCT40201                              
052686,000217: 01,3255           60002                           AD       Q                                     #  RESULT = TD - T1 + 1.
052687,000218: 
052688,000219: 01,3256           10000                           CCS      A                                     #  TEST TD - T1 +1
052689,000220: 
052690,000221: 01,3257           61400                           AD       LST1                                  #  IF TD - T1 POS, GO TO WTLST5 WITH
052691,000222: 01,3260           13322                           TCF      WTLST5                                #  C(A) = (TD - T1) + C(LST1) = TD-T2+1
052692,000223: 
052693,000224: 01,3261           13262                           NOOP                                           
052694,000225: 01,3262           40002                           CS       Q                                     
052695,000226: 
052696,000227:                                                                                                  #  NOTE THAT THIS PROGRAM SECTION IS NEVER ENTERED WHEN T-T1 G/E -1,
052697,000228:                                                                                                  #  SINCE TD-T1+1 = (TD-T) + (T-T1+1), AND DELTA T = TD-T G/E +1.  (G/E
052698,000229:                                                                                                  #  SYMBOL MEANS GREATER THAN OR EQUAL TO).  THUS THERE NEED BE NO CON-
052699,000230:                                                                                                  #  CERN OVER A PREVIOUS OR IMMINENT OVERFLOW OF TIME3 HERE.
052700,000231: 
052701,000232: 01,3263           65002                           AD       POS1/2                                #  WHEN TD IS NEXT, FORM QUANTITY
052702,000233: 01,3264           65002                           AD       POS1/2                                #        1.0 - DELTA T = 1.0 - (TD - T)
052703,000234: 01,3265           56026                           XCH      TIME3                                 
052704,000235: 01,3266           65001                           AD       NEGMAX                                
052705,000236: 01,3267           60002                           AD       Q                                     #  1.0 - DELTAT T NOW COMPLETE.
052706,000237: 01,3270           00006                           EXTEND                                         #  ZERO INDEX Q.
052707,000238: 01,3271           22007                           QXCH     7                                     #  (ZQ)
052708,000239: 

Page 1227

052710,000241: 01,3272           57400        WTLST4             XCH      LST1                                  
052711,000242: 01,3273           57401                           XCH      LST1       +1                         
052712,000243: 01,3274           57402                           XCH      LST1       +2                         
052713,000244: 01,3275           57403                           XCH      LST1       +3                         
052714,000245: 01,3276           57404                           XCH      LST1       +4                         
052715,000246: 01,3277           57405                           XCH      LST1       +5                         
052716,000247: 01,3300           57406                           XCH      LST1       +6                         
052717,000248: 01,3301           57407                           XCH      LST1       +7                         
052718,000249: 
052719,000250: 01,3302           30063                           CA       WAITADR                               #  (MINOR PART OF TASK CADR HAS BEEN IN L.)
052720,000251: 01,3303           50002                           INDEX    Q                                     
052721,000252: 01,3304           13305                           TCF      +1                                    
052722,000253: 
052723,000254: 01,3305           53411                           DXCH     LST2                                  
052724,000255: 01,3306           53413                           DXCH     LST2       +2                         
052725,000256: 01,3307           53415                           DXCH     LST2       +4                         
052726,000257: 01,3310           53417                           DXCH     LST2       +6                         
052727,000258: 01,3311           53421                           DXCH     LST2       +8D                        
052728,000259: 01,3312           53423                           DXCH     LST2       +10D                       #  AT END, CHECK THAT C(LST2 +10) IS STD
052729,000260: 01,3313           53425                           DXCH     LST2       +12D                       
052730,000261: 01,3314           53427                           DXCH     LST2       +14D                       
052731,000262: 01,3315           53431                           DXCH     LST2       +16D                       
052732,000263: 01,3316           65304                           AD       ENDTASK                               #  END ITEM, AS CHECK FOR EXCEEDING
052733,000264:                                                                                                  #  THE LENGTH OF THE LIST.
052734,000265: 01,3317           00006                           EXTEND                                         #  DUMMY TASK ADRES SHOULD BE IN FIXED-
052735,000266: 01,3320           15263                           BZF      LVWTLIST                              #  FIXED SO ITS ADRES ALONE DISTINGUISHES
052736,000267: 01,3321           13375                           TCF      WTABORT                               #  IT.
052737,000268: 

Page 1228

052739,000270: 01,3322           10000        WTLST5             CCS      A                                     #  TEST TD - T2 + 1
052740,000271: 01,3323           61401                           AD       LST1       +1                         
052741,000272: 01,3324           13330                           TCF      +4                                    
052742,000273: 01,3325           65017                           AD       ONE                                   
052743,000274: 01,3326           03403                           TC       WTLST2                                
052744,000275: 01,3327           00001                           OCT      1                                     
052745,000276: 
052746,000277: 01,3330           10000                 +4        CCS      A                                     #  TEST TD - T3 + 1
052747,000278: 01,3331           61402                           AD       LST1       +2                         
052748,000279: 01,3332           13336                           TCF      +4                                    
052749,000280: 01,3333           65017                           AD       ONE                                   
052750,000281: 01,3334           03403                           TC       WTLST2                                
052751,000282: 01,3335           00002                           OCT      2                                     
052752,000283: 
052753,000284: 01,3336           10000                 +4        CCS      A                                     #  TEST TD - T4 + 1
052754,000285: 01,3337           61403                           AD       LST1       +3                         
052755,000286: 01,3340           13344                           TCF      +4                                    
052756,000287: 01,3341           65017                           AD       ONE                                   
052757,000288: 01,3342           03403                           TC       WTLST2                                
052758,000289: 01,3343           00003                           OCT      3                                     
052759,000290: 
052760,000291: 01,3344           10000                 +4        CCS      A                                     #  TEST TD - T5 + 1
052761,000292: 01,3345           61404                           AD       LST1       +4                         
052762,000293: 01,3346           13352                           TCF      +4                                    
052763,000294: 01,3347           65017                           AD       ONE                                   
052764,000295: 01,3350           03403                           TC       WTLST2                                
052765,000296: 01,3351           00004                           OCT      4                                     
052766,000297: 
052767,000298: 01,3352           10000                 +4        CCS      A                                     #  TEST TD - T6 + 1
052768,000299: 01,3353           61405                           AD       LST1       +5                         
052769,000300: 01,3354           13360                           TCF      +4                                    
052770,000301: 01,3355           65017                           AD       ONE                                   
052771,000302: 01,3356           03403                           TC       WTLST2                                
052772,000303: 01,3357           00005                           OCT      5                                     
052773,000304: 
052774,000305: 01,3360           10000                 +4        CCS      A                                     #  TEST TD - T7 + 1
052775,000306: 01,3361           61406                           AD       LST1       +6                         
052776,000307: 01,3362           13366                           TCF      +4                                    
052777,000308: 01,3363           65017                           AD       ONE                                   
052778,000309: 01,3364           03403                           TC       WTLST2                                
052779,000310: 01,3365           00006                           OCT      6                                     
052780,000311: 

Page 1229

052782,000313: 01,3366           10000                 +4        CCS      A                                     
052783,000314: 01,3367           61407                           AD       LST1       +7                         
052784,000315: 01,3370           13374                           TCF      +4                                    
052785,000316: 01,3371           65017                           AD       ONE                                   
052786,000317: 01,3372           03403                           TC       WTLST2                                
052787,000318: 01,3373           00007                           OCT      7                                     
052788,000319: 
052789,000320: 01,3374           10000                 +4        CCS      A                                     
052790,000321: 01,3375           07755        WTABORT            TC       BAILOUT                               #  NO ROOM IN THE INN.
052791,000322: 01,3376           01203                           OCT      1203                                  
052792,000323: 
052793,000324: 01,3377           65017                           AD       ONE                                   
052794,000325: 01,3400           03403                           TC       WTLST2                                
052795,000326: 01,3401           00010                           OCT      10                                    
052796,000327: 
052797,000328: 01,3402           40201        OCT40201           OCT      40201                                 
052798,000329: 

Page 1230

052800,000331:                                                                                                  #  THE ENTRY TO WTLST2 JUST PRECEDING OCT N IS FOR T  LE TD LE T   -1.
052801,000332:                                                                                                  #                                                   N           N+1
052802,000333: 
052803,000334:                                                                                                  #  (LE MEANS LESS THAN OR EQUAL TO).  AT ENTRY, C(A) = -(TD - T   + 1)
052804,000335:                                                                                                  #                                                              N+1
052805,000336: 
052806,000337:                                                                                                  #  THE LST1 ENTRY-(T   -T +1) IS TO BE REPLACED BY -(TD - T  + 1), AND
052807,000338:                                                                                                  #                   N+1  N                                 N
052808,000339: 
052809,000340:                                                                                                  #  THE ENTRY-(T   - TD + 1) IS TO BE INSERTED IMMEDIATELY FOLLOWING.
052810,000341:                                                                                                  #              N+1
052811,000342: 
052812,000343: 01,3403           54064        WTLST2             TS       WAITTEMP                              #  C(A) = -(TD - T + 1)
052813,000344: 01,3404           50002                           INDEX    Q                                     
052814,000345: 01,3405           30000                           CAF      0                                     
052815,000346: 01,3406           54002                           TS       Q                                     #  INDEX VALUE INTO Q.
052816,000347: 
052817,000348: 01,3407           35017                           CAF      ONE                                   
052818,000349: 01,3410           60064                           AD       WAITTEMP                              
052819,000350: 01,3411           50002                           INDEX    Q                                     #  C(A) = -(TD - T ) + 1.
052820,000351: 01,3412           27377                           ADS      LST1       -1                         #                 N
052821,000352: 
052822,000353: 01,3413           40064                           CS       WAITTEMP                              
052823,000354: 01,3414           50002                           INDEX    Q                                     
052824,000355: 01,3415           13272                           TCF      WTLST4                                
052825,000356: 
052826,000357:                                                                                                  #  C(TIME3) = 1.0 - (T1 - T)
052827,000358: 
052828,000359:                                                                                                  #  C(LST1  ) = - (T2 - T1) + 1
052829,000360:                                                                                                  #  C(LST1+1) = - (T3 - T2) + 1
052830,000361:                                                                                                  #  C(LST1+2) = - (T4 - T3) + 1
052831,000362:                                                                                                  #  C(LST1+3) = - (T5 - T4) + 1
052832,000363:                                                                                                  #  C(LST1+4) = - (T6 - T5) + 1
052833,000364: 
052834,000365:                                                                                                  #  C(LST2   ) = 2CADR  TASK1
052835,000366:                                                                                                  #  C(LST2+2 ) = 2CADR  TASK2
052836,000367:                                                                                                  #  C(LST2+4 ) = 2CADR  TASK3
052837,000368:                                                                                                  #  C(LST2+6 ) = 2CADR  TASK4
052838,000369:                                                                                                  #  C(LST2+8 ) = 2CADR  TASK5
052839,000370:                                                                                                  #  C(LST2+10) = 2CADR  TASK6
052840,000371: 

Page 1231

052842,000373:                                                                                                  #  ENTERS HERE ON T3 RUPT TO DISPATCH WAITLISTED TASK.
052843,000374: 
052844,000375: 01,3416           00006        T3RUPT             EXTEND                                         
052845,000376: 01,3417           04007                           ROR      SUPERBNK                              #  READ CURRENT SUPERBANK VALUE AND
052846,000377: 01,3420           54016                           TS       BANKRUPT                              #  SAVE WITH E AND F BANK VALUES.
052847,000378: 01,3421           00006                           EXTEND                                         
052848,000379: 01,3422           22012                           QXCH     QRUPT                                 
052849,000380: 
052850,000381: 01,3423           35000        T3RUPT2            CAF      NEG1/2                                #  DISPATCH WAITLIST TASK.
052851,000382: 01,3424           57407                           XCH      LST1       +7                         
052852,000383: 01,3425           57406                           XCH      LST1       +6                         
052853,000384: 01,3426           57405                           XCH      LST1       +5                         
052854,000385: 01,3427           57404                           XCH      LST1       +4                         #  1. MOVE UP LST1 CONTENTS, ENTERING
052855,000386: 01,3430           57403                           XCH      LST1       +3                         #     A VALUE OF 1/2 +1 AT THE BOTTOM
052856,000387: 01,3431           57402                           XCH      LST1       +2                         #     FOR T6-T5, CORRESPONDING TO THE
052857,000388: 01,3432           57401                           XCH      LST1       +1                         #     INTERVAL 81.91 SEC FOR ENDTASK.
052858,000389: 01,3433           57400                           XCH      LST1                                  
052859,000390: 01,3434           64777                           AD       POSMAX                                #  2. SET T3 = 1.0 - T2 - T USING LIST 1.
052860,000391: 01,3435           26026                           ADS      TIME3                                 #  SO T3 WONT TICK DURING UPDATE.
052861,000392: 01,3436           54734                           TS       RUPTAGN                               
052862,000393: 01,3437           45021                           CS       ZERO                                  
052863,000394: 01,3440           54734                           TS       RUPTAGN                               #  SETS RUPTAGN TO +1 ON OVERFLOW.
052864,000395: 
052865,000396: 01,3441           00006                           EXTEND                                         #  DISPATCH TASK.
052866,000397: 01,3442           45305                           DCS      ENDTASK                               
052867,000398: 01,3443           53431                           DXCH     LST2       +16D                       
052868,000399: 01,3444           53427                           DXCH     LST2       +14D                       
052869,000400: 01,3445           53425                           DXCH     LST2       +12D                       
052870,000401: 01,3446           53423                           DXCH     LST2       +10D                       
052871,000402: 01,3447           53421                           DXCH     LST2       +8D                        
052872,000403: 01,3450           53417                           DXCH     LST2       +6                         
052873,000404: 01,3451           53415                           DXCH     LST2       +4                         
052874,000405: 01,3452           53413                           DXCH     LST2       +2                         
052875,000406: 01,3453           53411                           DXCH     LST2                                  
052876,000407: 
052877,000408: 01,3454           56001                           XCH      L                                     
052878,000409: 01,3455           00006                           EXTEND                                         
052879,000410: 01,3456           01007                           WRITE    SUPERBNK                              #  SET SUPERBANK FROM BBCON OF 2CADR
052880,000411: 01,3457           56001                           XCH      L                                     #  RESTORE TO L FOR DXCH Z.
052881,000412: 01,3460           52006                           DTCB                                           
052882,000413: 

Page 1232

052884,000415:                                                                                                  #  RETURN, AFTER EXECUTION OF T3 OVERFLOW TASK:
052885,000416: 
052886,000417:    5324                                           BLOCK    02                                    
052887,000418:    5324                                           COUNT    02/WAIT                               
052888,000419: 
052889,000420:    5324           10734        TASKOVER           CCS      RUPTAGN                               #  IF +1 RETURN TO T3RUPT, IF -0 RESUME.
052890,000421:    5325           35266                           CAF      WAITBB                                
052891,000422:    5326           54006                           TS       BBANK                                 
052892,000423:    5327           13423                           TCF      T3RUPT2                               #  DISPATCH NEXT TASK IF IT WAS DUE.
052893,000424: 
052894,000425:    5330           30016                           CA       BANKRUPT                              
052895,000426:    5331           00006                           EXTEND                                         
052896,000427:    5332           01007                           WRITE    SUPERBNK                              #  RESTORE SUPERBANK BEFORE RESUME IS DONE
052897,000428: 
052898,000429:    5333           00006        RESUME             EXTEND                                         
052899,000430:    5334           22012                           QXCH     QRUPT                                 
052900,000431:    5335           30016        NOQRSM             CA       BANKRUPT                              
052901,000432:    5336           56006                           XCH      BBANK                                 
052902,000433:    5337           52011        NOQBRSM            DXCH     ARUPT                                 
052903,000434:    5340           00003                           RELINT                                         
052904,000435:    5341           50017                           RESUME                                         
052905,000436: 

Page 1233

052907,000438:                                                                                                  #  LONGCALL
052908,000439:                                                                                                  #  PROGRAM DESCRIPTION                           DATE - 17 MARCH 1967
052909,000440:                                                                                                  #  PROGRAM WRITTEN BY W.H.VANDEVER               LOG SECTION WAITLIST
052910,000441:                                                                                                  #  MOD BY - R. MELANSON TO ADD DOCUMENTATION     ASSEMBLY SUNDISK REV. 100
052911,000442: 
052912,000443:                                                                                                  #  FUNCTIONAL DESCRIPTION -
052913,000444:                                                                                                  #        LONGCALL IS CALLED WITH THE DELTA TIME ARRIVING IN A,L SCALED AS TIME2,TIME1 WITH THE 2CADR OF THE TASK
052914,000445:                                                                                                  #        IMMEDIATELY FOLLOWING THE TC LONGCALL.  FOR EXAMPLE, IT MIGHT BE DONE AS FOLLOWS WHERE TIMELOC IS THE NAME OF
052915,000446:                                                                                                  #        A DP REGISTER CONTAINING A DELTA TIME AND WHERE TASKTODO IS THE NAME OF THE LOCATION AT WHICH LONGCALL IS TO
052916,000447:                                                                                                  #        START
052917,000448: 
052918,000449:                                                                                                  #  CALLING SEQUENCE -
052919,000450:                                                                                                  #                EXTEND
052920,000451:                                                                                                  #                DCA     TIMELOC
052921,000452:                                                                                                  #                TC      LONGCALL
052922,000453:                                                                                                  #                2CADR   TASKTODO
052923,000454: 
052924,000455:                                                                                                  #  NORMAL EXIT MODE -
052925,000456:                                                                                                  #        1).     TC      WAITLIST
052926,000457:                                                                                                  #        2).     DTCB    (TO L+3 OF CALLING ROUTINE 1ST PASS THRU LONGCYCL)
052927,000458:                                                                                                  #        3).     DTCB    (TO TASKOVER ON SUBSEQUENT PASSES THRU LONGCYCL)
052928,000459: 
052929,000460:                                                                                                  #  ALARM OR ABORT EXIT MODE -
052930,000461:                                                                                                  #        NONE
052931,000462: 
052932,000463:                                                                                                  #  OUTPUT -
052933,000464:                                                                                                  #        LONGTIME AND LONGTIME+1 = DELTA TIME
052934,000465:                                                                                                  #        LONGEXIT AND LONGEXIT+1 = RETURN 2CADR
052935,000466:                                                                                                  #        LONGCADR AND LONGCADR+1 = TASK 2CADR
052936,000467:                                                                                                  #        A = SINGLE PRECISION TIME FOR WAITLIST
052937,000468: 
052938,000469:                                                                                                  #  ERASABLE INITIALIZATION -
052939,000470:                                                                                                  #        A = MOST SIGNIFICANT PART OF DELTA TIME
052940,000471:                                                                                                  #        L = LEAST SIGNIFICANT PART OF DELTA TIME
052941,000472:                                                                                                  #        Q = ADDRESS OF 2CADR TASK VALUE
052942,000473: 
052943,000474:                                                                                                  #  DEBRIS -
052944,000475:                                                                                                  #        A,Q,L
052945,000476:                                                                                                  #        LONGCADR AND LONGCADR+1
052946,000477:                                                                                                  #        LONGEXIT AND LONGEXIT+1
052947,000478:                                                                                                  #        LONGTIME AND LONGTIME+1
052948,000479: 
052949,000480:                                                                                                  #  *** THE FOLLOWING IS TO BE IN FIXED-FIXED AND UNSWITCHED ERRASIBLE ***
052950,000481: 
052951,000482:    5342                                           BLOCK    02                                    
052952,000483:    5342  E3,1400                                  EBANK=   LST1                                  
052953,000484:    5342           53140        LONGCALL           DXCH     LONGTIME                              #  OBTAIN THE DELTA TIME
052954,000485: 
052955,000486:    5343           00006                           EXTEND                                         #  OBTAIN THE 2CADR

Page 1234

052957,000488:    5344           50002                           NDX      Q                                     
052958,000489:    5345           30001                           DCA      0                                     
052959,000490:    5346           53134                           DXCH     LONGCADR                              
052960,000491: 
052961,000492:    5347           00006                           EXTEND                                         #  NOW GO TO THE APPROPRIATE SWITCHED BANK
052962,000493:    5350           35353                           DCA      LGCL2CDR                              #  FOR THE REST OF LONGCALL
052963,000494:    5351           52006                           DTCB                                           
052964,000495: 
052965,000496:    5352  E3,1400                                  EBANK=   LST1                                  
052966,000497:    5352           03461 02063  LGCL2CDR           2CADR    LNGCALL2                              
052967,000498: 
052968,000499:                                                                                                  #  *** THE FOLLOWING MAY BE IN A SWITCHED BANK, INCLUDING ITS ERASABLE ***
052969,000500: 
052970,000501: 01,3461                                           BANK     01                                    
052971,000502: 01,3461                                           COUNT    01/WAIT                               
052972,000503: 
052973,000504: 01,3461           23435        LNGCALL2           LXCH     LONGEXIT   +1                         #  SAVE THE CORRECT BB FOR RETURN
052974,000505: 01,3462           35016                           CA       TWO                                   #  OBTAIN THE RETURN ADDRESS
052975,000506: 01,3463           26002                           ADS      Q                                     
052976,000507: 01,3464           55434                           TS       LONGEXIT                              
052977,000508: 
052978,000509:                                                                                                  #  *** WAITLIST TASK LONGCYCL ***
052979,000510: 
052980,000511: 01,3465           00006        LONGCYCL           EXTEND                                         #  CAN WE SUCCESFULLY TAKE ABOUT 1.25
052981,000512: 01,3466           43477                           DCS      DPBIT14                               #  MINUTES OFF OF LONGTIME
052982,000513: 01,3467           21140                           DAS      LONGTIME                              
052983,000514: 
052984,000515: 01,3470           11140                           CCS      LONGTIME   +1                         #  THE REASONIBG BEHIND THIS PART IS
052985,000516: 01,3471           13510                           TCF      MUCHTIME                              #  INVOLVED, TAKING INTO ACCOUNT THAT THE
052986,000517:                                                                                                  #  WORDS MAY NOT BE SIGNED CORRECTED (DP
052987,000518:                                                                                                  #  BASIC INSTRUCTIONS
052988,000519:                                                                                                  #  DO NOT SIGN CORRECT) AND THAT WE SUBTRAC
052989,000520:                                                                                                  #  TED BIT14 (1 OVER HALF THE POS. VALUE
052990,000521:                                                                                                  #  REPRESENTIBLE IN SINGLE WORD)
052991,000522: 01,3472           13473                           NOOP                                           #  CAN:T GET HERE    **********
052992,000523: 01,3473           13474                           TCF      +1                                    
052993,000524: 01,3474           11137                           CCS      LONGTIME                              
052994,000525: 01,3475           13510                           TCF      MUCHTIME                              
052995,000526: 01,3476           00000        DPBIT14            OCT      00000                                 
052996,000527: 01,3477           20000                           OCT      20000                                 
052997,000528: 
052998,000529:                                                                                                  #  LONGCALL
052999,000530: 01,3500           35002        LASTTIME           CA       BIT14                                 #  GET BACK THE CORRECT DELTA TFOR WAITLIST
053000,000531: 01,3501           27140                           ADS      LONGTIME   +1                         
053001,000532: 01,3502           05245                           TC       WAITLIST                              
053002,000533: 01,3503  E3,1400                                  EBANK=   LST1                                  
053003,000534: 01,3503           03515 02063                     2CADR    GETCADR                               #  THE ENTRY TO OUR LONGCADR
053004,000535: 
053005,000536: 01,3505           33517        LONGRTRN           CA       TSKOVCDR                              #  SET IT UP SO THAT ONLY THE FIRST EXIT IS

Page 1235

053007,000538: 01,3506           53435                           DXCH     LONGEXIT                              #  TO THE CALLER OF LONGCALL
053008,000539: 01,3507           52006                           DTCB                                           #  THE REST ARE TO TASKOVER
053009,000540: 
053010,000541: 01,3510           35002        MUCHTIME           CA       BIT14                                 #  WE HAVE OVER OUR ABOUT 1.25 MINUTES
053011,000542: 01,3511           05245                           TC       WAITLIST                              #  SO SET UP FOR ANOTHER CYCLE THROUGH HERE
053012,000543: 01,3512  E3,1400                                  EBANK=   LST1                                  
053013,000544: 01,3512           03465 02063                     2CADR    LONGCYCL                              
053014,000545: 
053015,000546: 01,3514           13505                           TCF      LONGRTRN                              #  NOW EXIT PROPERLY
053016,000547: 
053017,000548:                                                                                                  #  *** WAITLIST TASK GETCADR ***
053018,000549: 
053019,000550: 01,3515           53134        GETCADR            DXCH     LONGCADR                              #  GET THE LONGCALL THAT WE WISHED TO START
053020,000551: 01,3516           52006                           DTCB                                           #  AND TRANSFER CONTROL TO IT
053021,000552: 
053022,000553: 01,3517           05324        TSKOVCDR           GENADR   TASKOVER                              
053023,000554: 
053024,000555: 

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