Source Code

These source-code files were reconstructed by Mike Stewart from dumps of the RETREAD 50 program stored in physical AGC core-rope modules (B1 and B2) belonging to the Computer History Museum, Mountain View, California. The reconstruction was aided by pre-existing source code for the AGC programs RETREAD 44 and AURORA 12. Read about the process here. Assembling this source code with yaYUL produces core ropes identical to those of the physical modules. Page-number references refer to corresponding sections of RETREAD 44 source code. No printouts of RETREAD 50 program listings are available. New sections of the software (appearing in EXTENDED_VERBS_FOR_MODING.agc) have been disassembled; labels and comments have been either taken from similar code in later programs or, in cases where this was not possible, added by VirtualAGC for clarity.

004161,000002:                                                                                                  ## Copyright:   Public domain.
004162,000003:                                                                                                  ## Filename:    WAITLIST.agc
004163,000004:                                                                                                  ## Purpose:     Part of the source code for AGC program Retread 50. 
004164,000005:                                                                                                  ## Assembler:   yaYUL
004165,000006:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
004166,000007:                                                                                                  ## Website:     www.ibiblio.org/apollo/Restoration.html
004167,000008:                                                                                                  ## Mod history: 2019-06-12 MAS  Recreated from Computer History Museum's
004168,000009:                                                                                                  ##                              physical core-rope modules.
004169,000010:                                                                                                  ##              2021-05-30 ABS  Removed DLY2 symbol not present in
004170,000011:                                                                                                  ##                              Retread 44 or Aurora 12.
004171,000012: 

Page 118

004173,000014: 
004174,000015:                                                                                                  #  GROUNDRULE....DELTA T SHOULD NOT EXCEED 12000 (= 2 MINUTES)
004175,000016: 
004176,000017:    4251                                           SETLOC   ENDEXECF                              
004177,000018: 
004178,000019:    4251  E3,1400                                  EBANK=   LST1                                  #  TASK LISTS IN SWITCHED E BANK.
004179,000020: 
004180,000021:    4251           56002        WAITLIST           XCH      Q                                     #   SAVE DELTA T IN Q AND RETURN IN
004181,000022:    4252           54624                           TS       WAITEXIT                              #  WAITEXIT.
004182,000023:    4253           00006                           EXTEND                                         
004183,000024:    4254           50000                           INDEX    A                                     
004184,000025:    4255           30001                           DCA      0                                     #  PICK UP 2CADR OF TASK.
004185,000026:    4256           54630                           TS       WAITADR                               #  BBCON WILL REMAIN IN L.
004186,000027:    4257           34266                           CAF      WAITBB                                
004187,000028:    4260           56006                           XCH      BBANK                                 
004188,000029:    4261           12557                           TCF      WAIT2                                 
004189,000030: 
004190,000031:                                                                                                  #           RETURN TO CALLER AFTER TASK INSERTION:
004191,000032: 
004192,000033:    4262           30625        LVWTLIST           CA       WAITBANK                              
004193,000034:    4263           54006                           TS       BBANK                                 
004194,000035:    4264           50624                           INDEX    WAITEXIT                              
004195,000036:    4265           00002                           TC       2                                     
004196,000037: 
004197,000038:    4266           02003        WAITBB             BBCON    WAIT2                                 
004198,000039: 
004199,000040:                                                                                                  #  ENDTASK MUST BE ENTERED IN FIXED-FIXED SO IT IS DISTINGUISHABLE BY ITS ADRES ALONE.
004200,000041: 
004201,000042:    4267           73506 73774  ENDTASK            -2CADR   SVCT3                                 
004202,000043: 
004203,000044:    4271           14321        SVCT3              TCF      TASKOVER                              
004204,000045: 

Page 119

004206,000047:                                                                                                  #           BEGIN TASK INSERTION.
004207,000048: 
004208,000049: 01,2557                                           SETLOC   ENDEXECS                              
004209,000050: 
004210,000051: 01,2557           54625        WAIT2              TS       WAITBANK                              #  BBANK OF CALLING PROGRAM.
004211,000052: 01,2560           40026                           CS       TIME3                                 
004212,000053: 01,2561           62562                           AD       +1                                    #  CCS  A  = + 1/4
004213,000054: 01,2562           10000                           CCS      A                                     #  TEST  1/4 - C(TIME3).  IF POSITIVE,
004214,000055:                                                                                                  #          IT MEANS THAT TIME3 OVERFLOW HAS OCCURRED PRIOR TO CS  TIME3 AND THAT
004215,000056:                                                                                                  #          C(TIME3) = T - T1, INSTEAD OF 1.0 - (T1 - T).  THE FOLLOWING FOUR
004216,000057:                                                                                                  #          ORDERS SET C(A) = TD - T1 + 1 IN EITHER CASE.
004217,000058: 
004218,000059: 01,2563           66042                           AD       OCT40001                              #  OVERFLOW HAS OCCURRED.  SET C(A) =
004219,000060: 01,2564           40000                           CS       A                                     #  T - T1 + 3/4 - 1
004220,000061: 
004221,000062:                                                                                                  #  NORMAL CASE (C(A) MINUS) YIELDS SAME C(A)  -(-(1.0-(T1-T))+1/4)-1
004222,000063: 
004223,000064: 01,2565           62657                           AD       OCT50001                              
004224,000065: 01,2566           60002                           AD       Q                                     #  RESULT = TD - T1 + 1.
004225,000066: 
004226,000067: 01,2567           10000                           CCS      A                                     #  TEST TD - T1 + 1
004227,000068: 
004228,000069: 01,2570           61400                           AD       LST1                                  #  IF TD - T1 POS, GO TO WTLST5 WITH
004229,000070: 01,2571           12625                           TCF      WTLST5                                #  C(A) = (TD - T1) + C(LST1) = TD-T2+1
004230,000071: 
004231,000072: 01,2572           12573                           NOOP                                           
004232,000073: 01,2573           40002                           CS       Q                                     
004233,000074: 
004234,000075:                                                                                                  #  NOTE THAT THIS PROGRAM SECTION IS NEVER ENTERED WHEN T-T1 G/E -1,
004235,000076:                                                                                                  #  SINCE TD-T1+1 = (TD-T) + (T-T1+1), AND DELTA T = TD-T G/E +1 .  (G/E
004236,000077:                                                                                                  #  SYMBOL MEANS GREATER THAN OR EQUAL TO).  THUS THERE NEED BE NO CON-
004237,000078:                                                                                                  #  CERN OVER A PREVIOUS OR IMMINENT OVERFLOW OF TIME3 HERE.
004238,000079: 
004239,000080: 01,2574           67631                           AD       POS1/2                                #  WHEN TD IS NEXT, FORM QUANTITY
004240,000081: 01,2575           67631                           AD       POS1/2                                #    1.0 - DELTA T = 1.0 - (TD - T)
004241,000082: 01,2576           56026                           XCH      TIME3                                 
004242,000083: 01,2577           67630                           AD       NEGMAX                                
004243,000084: 01,2600           60002                           AD       Q                                     #  1.0 - DELTAT T NOW COMPLETE.
004244,000085: 01,2601           00006                           EXTEND                                         #  ZERO INDEX Q.
004245,000086: 01,2602           22007                           QXCH     7                                     #  (ZQ)
004246,000087: 

Page 120

004248,000089: 01,2603           57400        WTLST4             XCH      LST1                                  
004249,000090: 01,2604           57401                           XCH      LST1       +1                         
004250,000091: 01,2605           57402                           XCH      LST1       +2                         
004251,000092: 01,2606           57403                           XCH      LST1       +3                         
004252,000093: 01,2607           57404                           XCH      LST1       +4                         
004253,000094: 
004254,000095: 01,2610           30630                           CA       WAITADR                               #  (MINOR PART OF TASK CADR HAS BEEN IN L.)
004255,000096: 01,2611           50002                           INDEX    Q                                     
004256,000097: 01,2612           12613                           TCF      +1                                    
004257,000098: 
004258,000099: 01,2613           53406                           DXCH     LST2                                  
004259,000100: 01,2614           53410                           DXCH     LST2       +2                         
004260,000101: 01,2615           53412                           DXCH     LST2       +4                         
004261,000102: 01,2616           53414                           DXCH     LST2       +6                         
004262,000103: 01,2617           53416                           DXCH     LST2       +8D                        
004263,000104: 01,2620           53420                           DXCH     LST2       +10D                       #  AT END, CHECK THAT C(LST2 +10) IS STD
004264,000105: 01,2621           64267                           AD       ENDTASK                               #    END ITEM, AS CHECK FOR EXCEEDING
004265,000106:                                                                                                  #    THE LENGTH OF THE LIST.
004266,000107: 01,2622           00006                           EXTEND                                         #  DUMMY TASK ADRES SHOULD BE IN FIXED-
004267,000108: 01,2623           14262                           BZF      LVWTLIST                              #  FIXED SO ITS ADRES ALONE DISTINGUISHES
004268,000109: 01,2624           12663                           TCF      WTABORT                               #  IT.
004269,000110: 

Page 121

004271,000112: 
004272,000113: 01,2625           10000        WTLST5             CCS      A                                     #  TEST TD - T2 + 1
004273,000114: 01,2626           61401                           AD       LST1       +1                         
004274,000115: 01,2627           12633                           TCF      +4                                    
004275,000116: 01,2630           67646                           AD       ONE                                   
004276,000117: 01,2631           02664                           TC       WTLST2                                
004277,000118: 01,2632           00001                           OCT      1                                     
004278,000119: 
004279,000120: 01,2633           10000                 +4        CCS      A                                     #  TEST TD - T3 + 1
004280,000121: 01,2634           61402                           AD       LST1       +2                         
004281,000122: 01,2635           12641                           TCF      +4                                    
004282,000123: 01,2636           67646                           AD       ONE                                   
004283,000124: 01,2637           02664                           TC       WTLST2                                
004284,000125: 01,2640           00002                           OCT      2                                     
004285,000126: 
004286,000127: 01,2641           10000                 +4        CCS      A                                     #  TEST TD - T4 + 1
004287,000128: 01,2642           61403                           AD       LST1       +3                         
004288,000129: 01,2643           12647                           TCF      +4                                    
004289,000130: 01,2644           67646                           AD       ONE                                   
004290,000131: 01,2645           02664                           TC       WTLST2                                
004291,000132: 01,2646           00003                           OCT      3                                     
004292,000133: 
004293,000134: 01,2647           10000                 +4        CCS      A                                     #  TEST TD - T5 + 1
004294,000135: 01,2650           61404                           AD       LST1       +4                         
004295,000136: 01,2651           12655                           TCF      +4                                    
004296,000137: 01,2652           67646                           AD       ONE                                   
004297,000138: 01,2653           02664                           TC       WTLST2                                
004298,000139: 01,2654           00004                           OCT      4                                     
004299,000140: 
004300,000141: 01,2655           10000                 +4        CCS      A                                     #  TEST TD - T6 + 1
004301,000142: 01,2656           12663                           TCF      WTABORT                               
004302,000143: 01,2657           50001        OCT50001           OCT      50001                                 
004303,000144: 01,2660           67646                           AD       ONE                                   
004304,000145: 01,2661           02664                           TC       WTLST2                                
004305,000146: 01,2662           00005                           OCT      5                                     
004306,000147: 
004307,000148: 01,2663           02663        WTABORT            TC       -0                                    #  LIST OVERFLOW.
004308,000149: 
004309,000150: 

Page 122

004311,000152:                                                                                                  #  THE ENTRY TO WTLST2 JUST PRECEDING OCT  N  IS FOR T  LE TD LE T   -1.
004312,000153:                                                                                                  #                                                     N           N+1
004313,000154: 
004314,000155:                                                                                                  #  (LE MEANS LESS THAN OR EQUAL TO).  AT ENTRY, C(A) = -(TD - T   + 1)
004315,000156:                                                                                                  #                                                              N+1
004316,000157: 
004317,000158:                                                                                                  #  THE LST1 ENTRY -(T   - T +1) IS TO BE REPLACED BY -(TD - T  + 1), AND
004318,000159:                                                                                                  #                    N+1   N                                 N
004319,000160: 
004320,000161:                                                                                                  #  THE ENTRY -(T   - TD + 1) IS TO BE INSERTED IMMEDIATELY FOLLOWING.
004321,000162:                                                                                                  #               N+1
004322,000163: 
004323,000164: 01,2664           54631        WTLST2             TS       WAITTEMP                              #      C(A) = -(TD - T   + 1)
004324,000165: 01,2665           50002                           INDEX    Q                                     
004325,000166: 01,2666           30000                           CAF      0                                     
004326,000167: 01,2667           54002                           TS       Q                                     #  INDEX VALUE INTO Q.
004327,000168: 
004328,000169: 01,2670           37646                           CAF      ONE                                   
004329,000170: 01,2671           60631                           AD       WAITTEMP                              
004330,000171: 01,2672           50002                           INDEX    Q                                     #  C(A) = -(TD - T ) + 1.
004331,000172: 01,2673           27377                           ADS      LST1       -1                         #                 N
004332,000173: 
004333,000174: 01,2674           40631                           CS       WAITTEMP                              
004334,000175: 01,2675           50002                           INDEX    Q                                     
004335,000176: 01,2676           12603                           TCF      WTLST4                                
004336,000177: 
004337,000178: 01,2677                        ENDWAITS           EQUALS                                         #  LAST SWITCHABLE LOCATION.
004338,000179: 
004339,000180:                                                                                                  #  C(TIME3)  = 1.0 - (T1 - T)
004340,000181: 
004341,000182:                                                                                                  #  C(LST1  ) = - (T2 - T1) + 1
004342,000183:                                                                                                  #  C(LST1+1) = - (T3 - T2) + 1
004343,000184:                                                                                                  #  C(LST1+2) = - (T4 - T3) + 1
004344,000185:                                                                                                  #  C(LST1+3) = - (T5 - T4) + 1
004345,000186:                                                                                                  #  C(LST1+4) = - (T6 - T5) + 1
004346,000187: 
004347,000188:                                                                                                  #  C(LST2   ) = 2CADR  TASK1
004348,000189:                                                                                                  #  C(LST2+2 ) = 2CADR  TASK2
004349,000190:                                                                                                  #  C(LST2+4 ) = 2CADR  TASK3
004350,000191:                                                                                                  #  C(LST2+6 ) = 2CADR  TASK4
004351,000192:                                                                                                  #  C(LST2+8 ) = 2CADR  TASK5
004352,000193:                                                                                                  #  C(LST2+10) = 2CADR  TASK6
004353,000194: 

Page 123

004355,000196:                                                                                                  #           ENTERS HERE ON T3 RUPT TO DISPATCH WAITLISTED TASK.
004356,000197: 
004357,000198:    4272                                           SETLOC   SVCT3      +1                         
004358,000199: 
004359,000200:    4272           54016        T3RUPT             TS       BANKRUPT                              
004360,000201:    4273           00006                           EXTEND                                         
004361,000202:    4274           22012                           QXCH     QRUPT                                 
004362,000203: 
004363,000204:    4275           37627        T3RUPT2            CAF      NEG1/2                                #  DISPATCH WAITLIST TASK.
004364,000205:    4276           57404                           XCH      LST1       +4                         #  1.  MOVE UP LST1 CONTENTS, ENTERING
004365,000206:    4277           57403                           XCH      LST1       +3                         #      A VALUE OF 1/2 +1 AT THE BOTTOM
004366,000207:    4300           57402                           XCH      LST1       +2                         #      FOR T6-T5, CORRESPONDING TO THE
004367,000208:    4301           57401                           XCH      LST1       +1                         #      INTERVAL 81.91 SEC FOR ENDTASK.
004368,000209:    4302           57400                           XCH      LST1                                  
004369,000210:    4303           67626                           AD       POSMAX                                #  2. SET T3 = 1.0 - T2 -T USING LIST 1.
004370,000211:    4304           26026                           ADS      TIME3                                 #  SO T3 WONT TICK DURING UPDATE.
004371,000212:    4305           54636                           TS       RUPTAGN                               
004372,000213:    4306           47653                           CS       ZERO                                  
004373,000214:    4307           54636                           TS       RUPTAGN                               #  SETS RUPTAGN TO +1 ON OVERFLOW.
004374,000215: 
004375,000216:    4310           00006                           EXTEND                                         #  DISPATCH TASK.
004376,000217:    4311           44270                           DCS      ENDTASK                               
004377,000218:    4312           53420                           DXCH     LST2       +10D                       
004378,000219:    4313           53416                           DXCH     LST2       +8D                        
004379,000220:    4314           53414                           DXCH     LST2       +6                         
004380,000221:    4315           53412                           DXCH     LST2       +4                         
004381,000222:    4316           53410                           DXCH     LST2       +2                         
004382,000223:    4317           53406                           DXCH     LST2                                  
004383,000224: 
004384,000225:    4320           52006                           DTCB                                           
004385,000226: 
004386,000227: 
004387,000228: 
004388,000229:                                                                                                  #  RETURN, AFTER EXECUTION OF TIME3 OVERFLOW TASK.
004389,000230: 
004390,000231:    4321           10636        TASKOVER           CCS      RUPTAGN                               #  IF +1 RETURN TO T3RUPT, IF -0 RESUME.
004391,000232:    4322           34266                           CAF      WAITBB                                
004392,000233:    4323           54006                           TS       BBANK                                 
004393,000234:    4324           14275                           TCF      T3RUPT2                               #  DISPATCH NEXT TASK IF IT WAS DUE.
004394,000235: 
004395,000236:    4325           00006        RESUME             EXTEND                                         
004396,000237:    4326           22012                           QXCH     QRUPT                                 
004397,000238:    4327           30016                           CA       BANKRUPT                              
004398,000239:    4330           54006                           TS       BBANK                                 
004399,000240:    4331           52011                           DXCH     ARUPT                                 
004400,000241:    4332           50017                           RESUME                                         
004401,000242: 
004402,000243:    4333                        ENDWAITF           EQUALS                                         #  LAST FIXED-FIXED LOCATION OF T3RUPT.

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