Source Code

These source-code files were transcribed from a printout in Don Eyles's personal collection, scanned by archive.org, and financially sponsored by Mike Higgins. A team of volunteers performed the transcription and proof-reading. Note that the scanned page images are available at the Virtual AGC Project website, as well as higher-quality (but much larger) images at the Virtual AGC Project's section on archive.org. Report any problems by creating "issues" at the Virtual AGC Project's GitHub Repository.

Notations on the program listing read, in part:

	YUL SYSTEM FOR BLK2: REVISION 0 OF PROGRAM RETRED44 BY NASA 2021100
	JUL 9, 1965
Note that the date is the date of the printout, not the date of the program revision.

004212,000002:                                                                                                  ## Copyright:   Public domain.
004213,000003:                                                                                                  ## Filename:    WAITLIST.agc
004214,000004:                                                                                                  ## Purpose:     Part of the source code for Retread 44 (revision 0). It was
004215,000005:                                                                                                  ##              the very first program for the Block II AGC, created as an
004216,000006:                                                                                                  ##              extensive rewrite of the Block I program Sunrise.
004217,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
004218,000008:                                                                                                  ##              that the code format has been changed to conform to the
004219,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
004220,000010:                                                                                                  ##              original YUL assembler.
004221,000011:                                                                                                  ## Reference:   pp. 118-123
004222,000012:                                                                                                  ## Assembler:   yaYUL
004223,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
004224,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
004225,000015:                                                                                                  ## Mod history: 2016-12-13 MAS  Created from Aurora 12 version.
004226,000016:                                                                                                  ##              2016-12-18 MAS  Transcribed.
004227,000017:                                                                                                  ##              2016-12-27 RSB  Proofed comment text using octopus/ProoferComments,
004228,000018:                                                                                                  ##                              and fixed errors found.
004229,000019:                                                                                                  ##              2017-02-09 RSB  Comment-text fixes identified in proofing Artemis 72
004230,000020:                                                                                                  ##              2021-05-30 ABS  Removed DLY2 symbol not present in scans.
004231,000021: 

Page 118 The log section named, WAITLIST, is circled in red.

004234,000024: 
004235,000025:                                                                                                  #  GROUNDRULE....DELTA T SHOULD NOT EXCEED 12000 (= 2 MINUTES)
004236,000026: 
004237,000027:    4251                                           SETLOC   ENDEXECF                              
004238,000028: 
004239,000029:    4251  E3,1400                                  EBANK=   LST1                                  #  TASK LISTS IN SWITCHED E BANK.
004240,000030: 
004241,000031:    4251           56002        WAITLIST           XCH      Q                                     #   SAVE DELTA T IN Q AND RETURN IN
004242,000032:    4252           54624                           TS       WAITEXIT                              #  WAITEXIT.
004243,000033:    4253           00006                           EXTEND                                         
004244,000034:    4254           50000                           INDEX    A                                     
004245,000035:    4255           30001                           DCA      0                                     #  PICK UP 2CADR OF TASK.
004246,000036:    4256           54630                           TS       WAITADR                               #  BBCON WILL REMAIN IN L.
004247,000037:    4257           34266                           CAF      WAITBB                                
004248,000038:    4260           56006                           XCH      BBANK                                 
004249,000039:    4261           12557                           TCF      WAIT2                                 
004250,000040: 
004251,000041:                                                                                                  #           RETURN TO CALLER AFTER TASK INSERTION:
004252,000042: 
004253,000043:    4262           30625        LVWTLIST           CA       WAITBANK                              
004254,000044:    4263           54006                           TS       BBANK                                 
004255,000045:    4264           50624                           INDEX    WAITEXIT                              
004256,000046:    4265           00002                           TC       2                                     
004257,000047: 
004258,000048:    4266           02003        WAITBB             BBCON    WAIT2                                 
004259,000049: 
004260,000050:                                                                                                  #  ENDTASK MUST BE ENTERED IN FIXED-FIXED SO IT IS DISTINGUISHABLE BY ITS ADRES ALONE.

---------------------- ("ENDTASK MUST BE ENTERED" is underlined in red)

004262,000052: 
004263,000053:    4267           73506 73774  ENDTASK            -2CADR   SVCT3                                 
004264,000054: 
004265,000055:    4271           14321        SVCT3              TCF      TASKOVER                              
004266,000056: 

Page 119

004268,000058:                                                                                                  #           BEGIN TASK INSERTION.
004269,000059: 
004270,000060: 01,2557                                           SETLOC   ENDEXECS                              
004271,000061: 
004272,000062: 01,2557           54625        WAIT2              TS       WAITBANK                              #  BBANK OF CALLING PROGRAM.
004273,000063: 01,2560           40026                           CS       TIME3                                 
004274,000064: 01,2561           62562                           AD       +1                                    #  CCS  A  = + 1/4
004275,000065: 01,2562           10000                           CCS      A                                     #  TEST  1/4 - C(TIME3).  IF POSITIVE,
004276,000066:                                                                                                  #          IT MEANS THAT TIME3 OVERFLOW HAS OCCURRED PRIOR TO CS  TIME3 AND THAT
004277,000067:                                                                                                  #          C(TIME3) = T - T1, INSTEAD OF 1.0 - (T1 - T).  THE FOLLOWING FOUR
004278,000068:                                                                                                  #          ORDERS SET C(A) = TD - T1 + 1 IN EITHER CASE.
004279,000069: 
004280,000070: 01,2563           66042                           AD       OCT40001                              #  OVERFLOW HAS OCCURRED.  SET C(A) =
004281,000071: 01,2564           40000                           CS       A                                     #  T - T1 + 3/4 - 1
004282,000072: 
004283,000073:                                                                                                  #  NORMAL CASE (C(A) MINUS) YIELDS SAME C(A)  -(-(1.0-(T1-T))+1/4)-1
004284,000074: 
004285,000075: 01,2565           62657                           AD       OCT50001                              
004286,000076: 01,2566           60002                           AD       Q                                     #  RESULT = TD - T1 + 1.
004287,000077: 
004288,000078: 01,2567           10000                           CCS      A                                     #  TEST TD - T1 + 1
004289,000079: 
004290,000080: 01,2570           61400                           AD       LST1                                  #  IF TD - T1 POS, GO TO WTLST5 WITH
004291,000081: 01,2571           12625                           TCF      WTLST5                                #  C(A) = (TD - T1) + C(LST1) = TD-T2+1
004292,000082: 
004293,000083: 01,2572           12573                           NOOP                                           
004294,000084: 01,2573           40002                           CS       Q                                     
004295,000085: 
004296,000086:                                                                                                  #  NOTE THAT THIS PROGRAM SECTION IS NEVER ENTERED WHEN T-T1 G/E -1,
004297,000087:                                                                                                  #  SINCE TD-T1+1 = (TD-T) + (T-T1+1), AND DELTA T = TD-T G/E +1 .  (G/E
004298,000088:                                                                                                  #  SYMBOL MEANS GREATER THAN OR EQUAL TO).  THUS THERE NEED BE NO CON-
004299,000089:                                                                                                  #  CERN OVER A PREVIOUS OR IMMINENT OVERFLOW OF TIME3 HERE.
004300,000090: 
004301,000091: 01,2574           67631                           AD       POS1/2                                #  WHEN TD IS NEXT, FORM QUANTITY
004302,000092: 01,2575           67631                           AD       POS1/2                                #    1.0 - DELTA T = 1.0 - (TD - T)
004303,000093: 01,2576           56026                           XCH      TIME3                                 
004304,000094: 01,2577           67630                           AD       NEGMAX                                
004305,000095: 01,2600           60002                           AD       Q                                     #  1.0 - DELTAT T NOW COMPLETE.
004306,000096: 01,2601           00006                           EXTEND                                         #  ZERO INDEX Q.
004307,000097: 01,2602           22007                           QXCH     7                                     #  (ZQ)
004308,000098: 

Page 120

004310,000100: 01,2603           57400        WTLST4             XCH      LST1                                  
004311,000101: 01,2604           57401                           XCH      LST1       +1                         
004312,000102: 01,2605           57402                           XCH      LST1       +2                         
004313,000103: 01,2606           57403                           XCH      LST1       +3                         
004314,000104: 01,2607           57404                           XCH      LST1       +4                         
004315,000105: 
004316,000106: 01,2610           30630                           CA       WAITADR                               #  (MINOR PART OF TASK CADR HAS BEEN IN L.)
004317,000107: 01,2611           50002                           INDEX    Q                                     
004318,000108: 01,2612           12613                           TCF      +1                                    
004319,000109: 
004320,000110: 01,2613           53406                           DXCH     LST2                                  
004321,000111: 01,2614           53410                           DXCH     LST2       +2                         
004322,000112: 01,2615           53412                           DXCH     LST2       +4                         
004323,000113: 01,2616           53414                           DXCH     LST2       +6                         
004324,000114: 01,2617           53416                           DXCH     LST2       +8D                        
004325,000115: 01,2620           53420                           DXCH     LST2       +10D                       #  AT END, CHECK THAT C(LST2 +10) IS STD
004326,000116: 01,2621           64267                           AD       ENDTASK                               #    END ITEM, AS CHECK FOR EXCEEDING
004327,000117:                                                                                                  #    THE LENGTH OF THE LIST.
004328,000118: 01,2622           00006                           EXTEND                                         #  DUMMY TASK ADRES SHOULD BE IN FIXED-
004329,000119: 01,2623           14262                           BZF      LVWTLIST                              #  FIXED SO ITS ADRES ALONE DISTINGUISHES
004330,000120: 01,2624           12663                           TCF      WTABORT                               #  IT.
004331,000121: 

Page 121

004333,000123: 
004334,000124: 01,2625           10000        WTLST5             CCS      A                                     #  TEST TD - T2 + 1
004335,000125: 01,2626           61401                           AD       LST1       +1                         
004336,000126: 01,2627           12633                           TCF      +4                                    
004337,000127: 01,2630           67646                           AD       ONE                                   
004338,000128: 01,2631           02664                           TC       WTLST2                                
004339,000129: 01,2632           00001                           OCT      1                                     
004340,000130: 
004341,000131: 01,2633           10000                 +4        CCS      A                                     #  TEST TD - T3 + 1
004342,000132: 01,2634           61402                           AD       LST1       +2                         
004343,000133: 01,2635           12641                           TCF      +4                                    
004344,000134: 01,2636           67646                           AD       ONE                                   
004345,000135: 01,2637           02664                           TC       WTLST2                                
004346,000136: 01,2640           00002                           OCT      2                                     
004347,000137: 
004348,000138: 01,2641           10000                 +4        CCS      A                                     #  TEST TD - T4 + 1
004349,000139: 01,2642           61403                           AD       LST1       +3                         
004350,000140: 01,2643           12647                           TCF      +4                                    
004351,000141: 01,2644           67646                           AD       ONE                                   
004352,000142: 01,2645           02664                           TC       WTLST2                                
004353,000143: 01,2646           00003                           OCT      3                                     
004354,000144: 
004355,000145: 01,2647           10000                 +4        CCS      A                                     #  TEST TD - T5 + 1
004356,000146: 01,2650           61404                           AD       LST1       +4                         
004357,000147: 01,2651           12655                           TCF      +4                                    
004358,000148: 01,2652           67646                           AD       ONE                                   
004359,000149: 01,2653           02664                           TC       WTLST2                                
004360,000150: 01,2654           00004                           OCT      4                                     
004361,000151: 
004362,000152: 01,2655           10000                 +4        CCS      A                                     #  TEST TD - T6 + 1
004363,000153: 01,2656           12663                           TCF      WTABORT                               
004364,000154: 01,2657           50001        OCT50001           OCT      50001                                 
004365,000155: 01,2660           67646                           AD       ONE                                   
004366,000156: 01,2661           02664                           TC       WTLST2                                
004367,000157: 01,2662           00005                           OCT      5                                     
004368,000158: 
004369,000159: 01,2663           02663        WTABORT            TC       -0                                    #  LIST OVERFLOW.
004370,000160: 
004371,000161: 

Page 122

004373,000163:                                                                                                  #  THE ENTRY TO WTLST2 JUST PRECEDING OCT  N  IS FOR T  LE TD LE T   -1.
004374,000164:                                                                                                  #                                                     N           N+1
004375,000165: 
004376,000166:                                                                                                  #  (LE MEANS LESS THAN OR EQUAL TO).  AT ENTRY, C(A) = -(TD - T   + 1)
004377,000167:                                                                                                  #                                                              N+1
004378,000168: 
004379,000169:                                                                                                  #  THE LST1 ENTRY -(T   - T +1) IS TO BE REPLACED BY -(TD - T  + 1), AND
004380,000170:                                                                                                  #                    N+1   N                                 N
004381,000171: 
004382,000172:                                                                                                  #  THE ENTRY -(T   - TD + 1) IS TO BE INSERTED IMMEDIATELY FOLLOWING.
004383,000173:                                                                                                  #               N+1
004384,000174: 
004385,000175: 01,2664           54631        WTLST2             TS       WAITTEMP                              #      C(A) = -(TD - T   + 1)
004386,000176: 01,2665           50002                           INDEX    Q                                     
004387,000177: 01,2666           30000                           CAF      0                                     
004388,000178: 01,2667           54002                           TS       Q                                     #  INDEX VALUE INTO Q.
004389,000179: 
004390,000180: 01,2670           37646                           CAF      ONE                                   
004391,000181: 01,2671           60631                           AD       WAITTEMP                              
004392,000182: 01,2672           50002                           INDEX    Q                                     #  C(A) = -(TD - T ) + 1.
004393,000183: 01,2673           27377                           ADS      LST1       -1                         #                 N
004394,000184: 
004395,000185: 01,2674           40631                           CS       WAITTEMP                              
004396,000186: 01,2675           50002                           INDEX    Q                                     
004397,000187: 01,2676           12603                           TCF      WTLST4                                
004398,000188: 
004399,000189: 01,2677                        ENDWAITS           EQUALS                                         #  LAST SWITCHABLE LOCATION.
004400,000190: 
004401,000191:                                                                                                  #  C(TIME3)  = 1.0 - (T1 - T)
004402,000192: 
004403,000193:                                                                                                  #  C(LST1  ) = - (T2 - T1) + 1
004404,000194:                                                                                                  #  C(LST1+1) = - (T3 - T2) + 1
004405,000195:                                                                                                  #  C(LST1+2) = - (T4 - T3) + 1
004406,000196:                                                                                                  #  C(LST1+3) = - (T5 - T4) + 1
004407,000197:                                                                                                  #  C(LST1+4) = - (T6 - T5) + 1
004408,000198: 
004409,000199:                                                                                                  #  C(LST2   ) = 2CADR  TASK1
004410,000200:                                                                                                  #  C(LST2+2 ) = 2CADR  TASK2
004411,000201:                                                                                                  #  C(LST2+4 ) = 2CADR  TASK3
004412,000202:                                                                                                  #  C(LST2+6 ) = 2CADR  TASK4
004413,000203:                                                                                                  #  C(LST2+8 ) = 2CADR  TASK5
004414,000204:                                                                                                  #  C(LST2+10) = 2CADR  TASK6
004415,000205: 

Page 123

004417,000207:                                                                                                  #           ENTERS HERE ON T3 RUPT TO DISPATCH WAITLISTED TASK.
004418,000208: 
004419,000209:    4272                                           SETLOC   SVCT3      +1                         
004420,000210: 
004421,000211:    4272           54016        T3RUPT             TS       BANKRUPT                              
004422,000212:    4273           00006                           EXTEND                                         
004423,000213:    4274           22012                           QXCH     QRUPT                                 
004424,000214: 
004425,000215:    4275           37627        T3RUPT2            CAF      NEG1/2                                #  DISPATCH WAITLIST TASK.
004426,000216:    4276           57404                           XCH      LST1       +4                         #  1.  MOVE UP LST1 CONTENTS, ENTERING
004427,000217:    4277           57403                           XCH      LST1       +3                         #      A VALUE OF 1/2 +1 AT THE BOTTOM
004428,000218:    4300           57402                           XCH      LST1       +2                         #      FOR T6-T5, CORRESPONDING TO THE
004429,000219:    4301           57401                           XCH      LST1       +1                         #      INTERVAL 81.91 SEC FOR ENDTASK.
004430,000220:    4302           57400                           XCH      LST1                                  
004431,000221:    4303           67626                           AD       POSMAX                                #  2. SET T3 = 1.0 - T2 -T USING LIST 1.
004432,000222:    4304           26026                           ADS      TIME3                                 #  SO T3 WONT TICK DURING UPDATE.
004433,000223:    4305           54636                           TS       RUPTAGN                               
004434,000224:    4306           47653                           CS       ZERO                                  
004435,000225:    4307           54636                           TS       RUPTAGN                               #  SETS RUPTAGN TO +1 ON OVERFLOW.
004436,000226: 
004437,000227:    4310           00006                           EXTEND                                         #  DISPATCH TASK.
004438,000228:    4311           44270                           DCS      ENDTASK                               
004439,000229:    4312           53420                           DXCH     LST2       +10D                       
004440,000230:    4313           53416                           DXCH     LST2       +8D                        
004441,000231:    4314           53414                           DXCH     LST2       +6                         
004442,000232:    4315           53412                           DXCH     LST2       +4                         
004443,000233:    4316           53410                           DXCH     LST2       +2                         
004444,000234:    4317           53406                           DXCH     LST2                                  
004445,000235: 
004446,000236:    4320           52006                           DTCB                                           
004447,000237: 
004448,000238: 
004449,000239: 
004450,000240:                                                                                                  #  RETURN, AFTER EXECUTION OF TIME3 OVERFLOW TASK.
004451,000241: 
004452,000242:    4321           10636        TASKOVER           CCS      RUPTAGN                               #  IF +1 RETURN TO T3RUPT, IF -0 RESUME.
004453,000243:    4322           34266                           CAF      WAITBB                                
004454,000244:    4323           54006                           TS       BBANK                                 
004455,000245:    4324           14275                           TCF      T3RUPT2                               #  DISPATCH NEXT TASK IF IT WAS DUE.
004456,000246: 
004457,000247:    4325           00006        RESUME             EXTEND                                         
004458,000248:    4326           22012                           QXCH     QRUPT                                 
004459,000249:    4327           30016                           CA       BANKRUPT                              
004460,000250:    4330           54006                           TS       BBANK                                 
004461,000251:    4331           52011                           DXCH     ARUPT                                 
004462,000252:    4332           50017                           RESUME                                         
004463,000253: 
004464,000254:    4333                        ENDWAITF           EQUALS                                         #  LAST FIXED-FIXED LOCATION OF T3RUPT.

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