Source Code

These source code files are an attempted reconstruction of Sundance revision 306, the Apollo 9 LM (Lunar Module) AGC (Apollo Guidance Computer) flight software, created from binary dumps of original core rope program modules, as follows:
  • B1 — Revision 292
  • B2 — Revision 302
  • B3 — Revision 302
  • B4 — Revision 302
  • B5 — Revision 292
  • B6 — Revision 306
These dumps were then modified using memos, checklists, observed address changes, and the Sundance GSOPs to get the entire program to match Sundance revision 306 as closely as possible. Without more information, it is not possible to say how close it actually is; however, this code should be quite close. It is capable of flying the whole Apollo 9 mission using the original checklists and padload. Since only binary dumps (rather than listings) of Sundance are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing.

042672,000002:                                                                                                  ## Copyright:   Public domain.
042673,000003:                                                                                                  ## Filename:    EXECUTIVE.agc
042674,000004:                                                                                                  ## Purpose:     A section of an attempt to reconstruct Sundance revision 306
042675,000005:                                                                                                  ##              as closely as possible with available information. Sundance
042676,000006:                                                                                                  ##              306 is the source code for the Lunar Module's (LM) Apollo
042677,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 9. This program was created
042678,000008:                                                                                                  ##              using the mixed-revision SundanceXXX as a starting point, and
042679,000009:                                                                                                  ##              pulling back features from Luminary 69 believed to have been
042680,000010:                                                                                                  ##              added based on memos, checklists, observed address changes,
042681,000011:                                                                                                  ##              or the Sundance GSOPs.
042682,000012:                                                                                                  ## Assembler:   yaYUL
042683,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
042684,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
042685,000015:                                                                                                  ## Mod history: 2020-07-24 MAS  Created from SundanceXXX.
042686,000016: 
042687,000017: 
042688,000018: 
042689,000019:    5142                                           BLOCK    02                                    
042690,000020:                                                                                                  #           TO ENTER A JOB REQUEST REQUIRING NO VAC AREA:
042691,000021: 
042692,000022:    5142                                           COUNT*   $$/EXEC                               
042693,000023:    5142           00004        NOVAC              INHINT                                         
042694,000024:    5143           65234                           AD       FAKEPRET                              #  LOC(MPAC +6) - LOC(QPRET)
042695,000025:    5144           54063                           TS       NEWPRIO                               #  PRIORITY OF NEW JOB + NOVAC C(FIXLOC)
042696,000026: 
042697,000027:    5145           00006                           EXTEND                                         
042698,000028:    5146           50002                           INDEX    Q                                     #  Q WILL BE UNDISTURBED THROUGHOUT.
042699,000029:    5147           30001                           DCA      0                                     #  2CADR OF JOB ENTERED.
042700,000030:    5150           52066                           DXCH     NEWLOC                                
042701,000031:    5151           35233                           CAF      EXECBANK                              
042702,000032:    5152           56004                           XCH      FBANK                                 
042703,000033:    5153           54061                           TS       EXECTEM1                              
042704,000034:    5154           12444                           TCF      NOVAC2                                #  ENTER EXECUTIVE BANK.
042705,000035: 
042706,000036:                                                                                                  #           TO ENTER A JOB REQUEST REQUIRING A VAC AREA - E.G., ALL (PARTIALLY) INTERPRETIVE JOBS.
042707,000037: 
042708,000038:    5155           00004        FINDVAC            INHINT                                         
042709,000039:    5156           54063                           TS       NEWPRIO                               
042710,000040:    5157           00006                           EXTEND                                         
042711,000041:    5160           50002                           INDEX    Q                                     
042712,000042:    5161           30001                           DCA      0                                     
042713,000043:    5162           52066        SPVACIN            DXCH     NEWLOC                                
042714,000044:    5163           35233                           CAF      EXECBANK                              
042715,000045:    5164           56004                           XCH      FBANK                                 
042716,000046:    5165           12422                           TCF      FINDVAC2                              #  OFF TO EXECUTIVE SWITCHED-BANK.
042717,000047: 
042718,000048:                                                                                                  #           TO ENTER A FINDVAC WITH THE PRIORITY IN NEWPRIO TO THE 2CADR ARRIVING IN A AND L:
042719,000049: 
042720,000050:                                                                                                  #           USERS OF SPVAC MUST INHINT BEFORE STORING IN NEWPRIO.
042721,000051: 
042722,000052:    5166           56002        SPVAC              XCH      Q                                     
042723,000053:    5167           67720                           AD       NEG2                                  
042724,000054:    5170           56002                           XCH      Q                                     
042725,000055:    5171           15162                           TCF      SPVACIN                               
042726,000056: 
042727,000057:                                                                                                  #           TO SUSPEND A BASIC JOB SO A HIGHER PRIORITY JOB MAY BE SERVICED:
042728,000058: 
042729,000059:    5172           22002        CHANG1             LXCH     Q                                     
042730,000060:    5173           35233                           CAF      EXECBANK                              
042731,000061:    5174           56006                           XCH      BBANK                                 
042732,000062:    5175           12523                           TCF      CHANJOB                               
042733,000063: 
042734,000064:                                                                                                  #           TO SUSPEND AN INTERPRETIVE JOB:
042735,000065: 
042736,000066:    5176           40164        CHANG2             CS       LOC                                   #  NEGATIVE LOC SHOWS JOB = INTERPRETIVE.
042737,000067:                                                                                                  #           ITRACE (4) REFERS TO "CHANG2".
042738,000068:    5177           54001                           TS       L                                     
042739,000069: 
042740,000070:    5200           35233                 +2        CAF      EXECBANK                              
042741,000071:    5201           54006                           TS       BBANK                                 
042742,000072:    5202           12522                           TCF      CHANJOB    -1                         
042743,000073: 
042744,000074:                                                                                                  #           TO VOLUNTARILY SUSPEND A JOB UNTIL THE COMPLETION OF SOME ANTICIPATED EVENT (I/O EVENT ETC.):
042745,000075: 
042746,000076:    5203           54164        JOBSLEEP           TS       LOC                                   
042747,000077:    5204           35233                           CAF      EXECBANK                              
042748,000078:    5205           54004                           TS       FBANK                                 
042749,000079:    5206           12613                           TCF      JOBSLP1                               
042750,000080: 
042751,000081:                                                                                                  #           TO AWAKEN A JOB PUT TO SLEEP IN THE ABOVE FASHION:
042752,000082: 
042753,000083:    5207           00004        JOBWAKE            INHINT                                         
042754,000084:    5210           54065                           TS       NEWLOC                                
042755,000085:    5211           45025                           CS       TWO                                   #  EXIT IS VIA FINDVAC/NOVAC PROCEDURES.
042756,000086:    5212           26002                           ADS      Q                                     
042757,000087:    5213           35233                           CAF      EXECBANK                              
042758,000088:    5214           56004                           XCH      FBANK                                 
042759,000089:    5215           12640                           TCF      JOBWAKE2                              
042760,000090: 
042761,000091:                                                                                                  #           TO CHANGE THE PRIORITY OF A JOB CURRENTLY UNDER EXECUTION:
042762,000092: 
042763,000093:    5216           00004        PRIOCHNG           INHINT                                         #  NEW PRIORITY ARRIVES IN A. RETURNS TO
042764,000094:    5217           54063                           TS       NEWPRIO                               #  CALLER AS SOON AS NEW JOB PRIORITY IS
042765,000095:    5220           35233                           CAF      EXECBANK                              #  HIGHEST.  PREPARE FOR POSSIBLE BASIC-
042766,000096:    5221           56006                           XCH      BBANK                                 #  STYLE CHANGE-JOB.
042767,000097:    5222           54165                           TS       BANKSET                               
042768,000098:    5223           30002                           CA       Q                                     
042769,000099:    5224           12707                           TCF      PRIOCH2                               
042770,000100: 
042771,000101:                                                                                                  #           TO REMOVE A JOB FROM EXECUTIVE CONSIDERATIONS:
042772,000102: 
042773,000103:    5225           35233        ENDOFJOB           CAF      EXECBANK                              
042774,000104:    5226           54004                           TS       FBANK                                 
042775,000105:    5227           12720                           TCF      ENDJOB1                               
042776,000106: 
042777,000107:    5230           30061        ENDFIND            CA       EXECTEM1                              #  RETURN TO CALLER AFTER JOB ENTRY
042778,000108:    5231           54004                           TS       FBANK                                 #  COMPLETE.
042779,000109:    5232           16715                           TCF      Q+2                                   
042780,000110:    5233           02422        EXECBANK           CADR     FINDVAC2                              
042781,000111: 
042782,000112:    5234           00110        FAKEPRET           ADRES    MPAC       -36D                       #  LOC(MPAC +6) - LOC(QPRET)
042783,000113: 
042784,000114:                                                                                                  #           LOCATE AN AVAILABLE VAC AREA.
042785,000115: 
042786,000116: 01,2422                                           BANK     01                                    
042787,000117: 01,2422                                           COUNT*   $$/EXEC                               
042788,000118: 01,2422           54061        FINDVAC2           TS       EXECTEM1                              #  (SAVE CALLER'S BANK FIRST.)
042789,000119: 01,2423           10400                           CCS      VAC1USE                               
042790,000120: 01,2424           12437                           TCF      VACFOUND                              
042791,000121: 01,2425           10454                           CCS      VAC2USE                               
042792,000122: 01,2426           12437                           TCF      VACFOUND                              
042793,000123: 01,2427           10530                           CCS      VAC3USE                               
042794,000124: 01,2430           12437                           TCF      VACFOUND                              
042795,000125: 01,2431           10604                           CCS      VAC4USE                               
042796,000126: 01,2432           12437                           TCF      VACFOUND                              
042797,000127: 01,2433           10660                           CCS      VAC5USE                               
042798,000128: 01,2434           12437                           TCF      VACFOUND                              
042799,000129: 01,2435           05716                           TC       ABORT                                 
042800,000130: 01,2436           01201                           OCT      1201                                  #  NO VAC AREAS.
042801,000131: 
042802,000132: 01,2437           65025        VACFOUND           AD       TWO                                   #  RESERVE THIS VAC AREA BY STORING A ZERO
042803,000133: 01,2440           22007                           ZL                                             #  IN ITS VAC USE REGISTER AND STORE THE
042804,000134: 01,2441           50000                           INDEX    A                                     #  ADDRESS OF THE FIRST WORD OF IT IN THE
042805,000135: 01,2442           21777                           LXCH     0          -1                         #  LOW NINE BITS OF THE PRIORITY WORD.
042806,000136: 01,2443           26063                           ADS      NEWPRIO                               
042807,000137: 
042808,000138: 01,2444           35030        NOVAC2             CAF      ZERO                                  #  NOVAC ENTERS HERE. FIND A CORE SET.
042809,000139: 01,2445           54064                           TS       LOCCTR                                
042810,000140: 01,2446           32453                           CAF      NO.CORES                              #  SEVEN SETS OF ELEVEN REGISTERS EACH.
042811,000141: 01,2447           54062        NOVAC3             TS       EXECTEM2                              
042812,000142: 01,2450           50064                           INDEX    LOCCTR                                
042813,000143: 01,2451           10167                           CCS      PRIORITY                              #  EACH PRIORITY REGISTER CONTAINS -0 IF
042814,000144: 01,2452           12513                           TCF      NEXTCORE                              #  THE CORRESPONDING CORE SET IS AVAILABLE.
042815,000145: 01,2453           00006        NO.CORES           DEC      6          B-14                       
042816,000146: 01,2454           12513                           TCF      NEXTCORE                              #  AN ACTIVE JOB HAS A POSITIVE PRIORITY
042817,000147:                                                                                                  #  BUT A DORMANT JOB'S PRIORITY IS NEGATIVE
042818,000148: 
042819,000149: 01,2455           30063        CORFOUND           CA       NEWPRIO                               #  SET THE PRIORITY OF THIS JOB IN THE CORE
042820,000150: 01,2456           50064                           INDEX    LOCCTR                                #  SET'S PRIORITY REGISTER AND SET THE
042821,000151: 01,2457           54167                           TS       PRIORITY                              #  JOB'S PUSH-DOWN POINTER AT THE BEGINNING
042822,000152: 01,2460           75054                           MASK     LOW9                                  #  OF THE WORK AREA AND OVERFLOW INDICATOR
042823,000153: 01,2461           50064                           INDEX    LOCCTR                                
042824,000154: 01,2462           54166                           TS       PUSHLOC                               #  OFF TO PREPARE FOR INTERPRETIVE PROGRAMS
042825,000155: 
042826,000156: 01,2463           10064                           CCS      LOCCTR                                #  IF CORE SET ZERO IS BEING LOADED, SET UP
042827,000157: 01,2464           12500                           TCF      SETLOC                                #  OVFIND AND FIXLOC IMMEDIATELY.
042828,000158: 01,2465           54121                           TS       OVFIND                                
042829,000159: 01,2466           30166                           CA       PUSHLOC                               
042830,000160: 01,2467           54120                           TS       FIXLOC                                
042831,000161: 
042832,000162: 01,2470           10067        SPECTEST           CCS      NEWJOB                                #  SEE IF ANY ACTIVE JOBS WAITING (RARE).
042833,000163: 01,2471           12500                           TCF      SETLOC                                #  MUST BE AWAKENED BUT UNCHANGED JOB.
042834,000164: 01,2472           05726                           TC       CCSHOLE                               
042835,000165: 01,2473           05726                           TC       CCSHOLE                               
042836,000166: 01,2474           54067                           TS       NEWJOB                                #  +0 SHOWS ACTIVE JOB ALREADY SET.
042837,000167: 01,2475           52066                           DXCH     NEWLOC                                
042838,000168: 01,2476           52165                           DXCH     LOC                                   
042839,000169: 01,2477           15230                           TCF      ENDFIND                               
042840,000170: 
042841,000171: 01,2500           52066        SETLOC             DXCH     NEWLOC                                #  SET UP THE LOCATION REGISTERS FOR THIS
042842,000172: 01,2501           50064                           INDEX    LOCCTR                                
042843,000173: 01,2502           52165                           DXCH     LOC                                   
042844,000174: 01,2503           50067                           INDEX    NEWJOB                                #  THIS INDEX INSTRUCTION INSURES THAT THE
042845,000175: 01,2504           40167                           CS       PRIORITY                              #  HIGHEST ACTIVE PRIORITY WILL BE COMPARED
042846,000176: 01,2505           60063                           AD       NEWPRIO                               #  WITH THE NEW PRIORITY TO SEE IF NEWJOB
042847,000177: 01,2506           00006                           EXTEND                                         #  SHOULD BE SET TO SIGNAL A SWITCH.
042848,000178: 01,2507           65230                           BZMF     ENDFIND                               
042849,000179: 01,2510           30064                           CA       LOCCTR                                #  LOCCTR IS LEFT SET AT THIS CORE SET IF
042850,000180: 01,2511           54067                           TS       NEWJOB                                #  THE CALLER WANTS TO LOAD ANY MPAC
042851,000181: 01,2512           15230                           TCF      ENDFIND                               #  REGISTERS, ETC.
042852,000182: 
042853,000183: 01,2513           32650        NEXTCORE           CAF      COREINC                               
042854,000184: 01,2514           26064                           ADS      LOCCTR                                
042855,000185: 01,2515           10062                           CCS      EXECTEM2                              
042856,000186: 01,2516           12447                           TCF      NOVAC3                                
042857,000187: 01,2517           05716                           TC       ABORT                                 #  NO CORE SETS.
042858,000188: 01,2520           01202                           OCT      1202                                  
042859,000189: 
042860,000190:                                                                                                  #           THE FOLLOWING ROUTINE SWAPS CORE SET 0 WITH THAT WHOSE RELATIVE ADDRESS IS IN NEWJOB.
042861,000191: 
042862,000192: 01,2521           22164                 -2        LXCH     LOC                                   
042863,000193: 01,2522           30165                 -1        CAE      BANKSET                               #  BANKSET, NOT BBANK, HAS RIGHT CONTENTS.
042864,000194: 01,2523           00004        CHANJOB            INHINT                                         
042865,000195: 01,2524           00006                           EXTEND                                         
042866,000196: 01,2525           04007                           ROR      SUPERBNK                              #  PICK UP CURRENT SBANK FOR BBCON
042867,000197: 01,2526           56001                           XCH      L                                     #  LOC IN A AND BBCON IN L.
042868,000198: 01,2527           50067                 +4        INDEX    NEWJOB                                #  SWAP LOC AND BANKSET.
042869,000199: 01,2530           52165                           DXCH     LOC                                   
042870,000200: 01,2531           52165                           DXCH     LOC                                   
042871,000201: 
042872,000202: 01,2532           30165                           CAE      BANKSET                               
042873,000203: 01,2533           00006                           EXTEND                                         
042874,000204: 01,2534           01007                           WRITE    SUPERBNK                              #  SET SBANK FOR NEW JOB.
042875,000205: 01,2535           52155                           DXCH     MPAC                                  #  SWAP MULTI-PURPOSE ACCUMULATOR AREAS.
042876,000206: 01,2536           50067                           INDEX    NEWJOB                                
042877,000207: 01,2537           52155                           DXCH     MPAC                                  
042878,000208: 01,2540           52155                           DXCH     MPAC                                  
042879,000209: 01,2541           52157                           DXCH     MPAC       +2                         
042880,000210: 01,2542           50067                           INDEX    NEWJOB                                
042881,000211: 01,2543           52157                           DXCH     MPAC       +2                         
042882,000212: 01,2544           52157                           DXCH     MPAC       +2                         
042883,000213: 01,2545           52161                           DXCH     MPAC       +4                         
042884,000214: 01,2546           50067                           INDEX    NEWJOB                                
042885,000215: 01,2547           52161                           DXCH     MPAC       +4                         
042886,000216: 01,2550           52161                           DXCH     MPAC       +4                         
042887,000217: 01,2551           52163                           DXCH     MPAC       +6                         
042888,000218: 01,2552           50067                           INDEX    NEWJOB                                
042889,000219: 01,2553           52163                           DXCH     MPAC       +6                         
042890,000220: 01,2554           52163                           DXCH     MPAC       +6                         
042891,000221: 
042892,000222: 01,2555           35030                           CAF      ZERO                                  
042893,000223: 01,2556           56121                           XCH      OVFIND                                #  MAKE PUSHLOC NEGATIVE IF OVFIND NZ.
042894,000224: 01,2557           00006                           EXTEND                                         
042895,000225: 01,2560           12563                           BZF      +3                                    
042896,000226: 01,2561           40166                           CS       PUSHLOC                               
042897,000227: 01,2562           54166                           TS       PUSHLOC                               
042898,000228: 
042899,000229: 01,2563           52167                           DXCH     PUSHLOC                               
042900,000230: 01,2564           50067                           INDEX    NEWJOB                                
042901,000231: 01,2565           52167                           DXCH     PUSHLOC                               
042902,000232: 01,2566           52167                           DXCH     PUSHLOC                               #  SWAPS PUSHLOC AND PRIORITY.
042903,000233: 01,2567           35054                           CAF      LOW9                                  #  SET FIXLOC TO BASE OF VAC AREA.
042904,000234: 01,2570           70167                           MASK     PRIORITY                              
042905,000235: 01,2571           54120                           TS       FIXLOC                                
042906,000236: 
042907,000237: 01,2572           10166                           CCS      PUSHLOC                               #  SET OVERFLOW INDICATOR ACCORDING TO
042908,000238: 01,2573           35030                           CAF      ZERO                                  
042909,000239: 01,2574           12601                           TCF      ENDPRCHG   -1                         
042910,000240: 
042911,000241: 01,2575           40166                           CS       PUSHLOC                               
042912,000242: 01,2576           54166                           TS       PUSHLOC                               
042913,000243: 01,2577           35026                           CAF      ONE                                   
042914,000244: 01,2600           56121                           XCH      OVFIND                                
042915,000245: 01,2601           54067                           TS       NEWJOB                                
042916,000246: 
042917,000247: 01,2602           00003        ENDPRCHG           RELINT                                         
042918,000248: 01,2603           52165                           DXCH     LOC                                   #  BASIC JOBS HAVE POSITIVE ADDRESSES, SO
042919,000249: 01,2604           00006                           EXTEND                                         #  DISPATCH WITH A DTCB.
042920,000250: 01,2605           62607                           BZMF     +2                                    #  IF INTERPRETIVE, SET UP EBANK, ETC.
042921,000251: 01,2606           52006                           DTCB                                           
042922,000252: 
042923,000253: 01,2607           40000                           COM                                            #  EPILOGUE TO JOB CHANGE FOR INTERPRETIVE
042924,000254: 01,2610           65026                           AD       ONE                                   
042925,000255: 01,2611           54164                           TS       LOC                                   #  RESUME.
042926,000256: 01,2612           16024                           TCF      INTRSM                                
042927,000257: 
042928,000258:                                                                                                  #           COMPLETE JOBSLEEP PREPARATIONS.
042929,000259: 
042930,000260: 01,2613           00004        JOBSLP1            INHINT                                         
042931,000261: 01,2614           40167                           CS       PRIORITY                              #  NNZ PRIORITY SHOWS JOB ASLEEP.
042932,000262: 01,2615           54167                           TS       PRIORITY                              
042933,000263: 01,2616           36050                           CAF      LOW7                                  
042934,000264: 01,2617           70006                           MASK     BBANK                                 
042935,000265: 01,2620           00006                           EXTEND                                         
042936,000266: 01,2621           04007                           ROR      SUPERBNK                              #  SAVE OLD SUPERBANK VALUE.
042937,000267: 01,2622           54165                           TS       BANKSET                               
042938,000268: 01,2623           45030                           CS       ZERO                                  
042939,000269: 01,2624           54131        JOBSLP2            TS       BUF        +1                         #  HOLDS - HIGHEST PRIORITY.
042940,000270: 01,2625           12735                           TCF      EJSCAN                                #  SCAN FOR HIGHEST PRIORITY ALA ENDOFJOB.
042941,000271: 
042942,000272: 01,2626           00004        NUCHANG2           INHINT                                         #  QUICK... DONT LET NEWJOB CHANGE TO +0.
042943,000273: 01,2627           10067                           CCS      NEWJOB                                
042944,000274: 01,2630           12633                           TCF      +3                                    #  NEWJOB STILL PNZ
042945,000275: 01,2631           00003                           RELINT                                         #  NEW JOB HAS CHANGED TO +0. WAKE UP JOB
042946,000276: 01,2632           13027                           TCF      ADVAN      +2                         #  VIA NUDIRECT. (VERY RARE CASE.)
042947,000277: 
042948,000278: 01,2633           35025                           CAF      TWO                                   
042949,000279: 01,2634           00006                           EXTEND                                         
042950,000280: 01,2635           05011                           WOR      DSALMOUT                              #  TURN ON ACTIVITY LIGHT
042951,000281: 01,2636           52165                           DXCH     LOC                                   #  AND SAVE ADDRESS INFO FOR BENEFIT OF
042952,000282: 01,2637           12527                           TCF      CHANJOB    +4                         #   POSSIBLE SLEEPING JOB.
042953,000283: 
042954,000284:                                                                                                  #           TO WAKE UP A JOB, EACH CORE SET IS FOUND TO LOCATE ALL JOBS WHICH ARE ASLEEP. IF THE FCADR IN THE
042955,000285:                                                                                                  #  LOC REGISTER OF ANY SUCH JOB MATCHES THAT SUPPLIED BY THE CALLER, THAT JOB IS AWAKENED. IF NO JOB IS FOUND,
042956,000286:                                                                                                  #  LOCCTR IS SET TO -1 AND NO FURTHER ACTION TAKES PLACE.
042957,000287: 
042958,000288: 01,2640           54061        JOBWAKE2           TS       EXECTEM1                              
042959,000289: 01,2641           35030                           CAF      ZERO                                  #  BEGIN CORE SET SCAN.
042960,000290: 01,2642           54064                           TS       LOCCTR                                
042961,000291: 01,2643           32453                           CAF      NO.CORES                              
042962,000292: 01,2644           54062        JOBWAKE4           TS       EXECTEM2                              
042963,000293: 01,2645           50064                           INDEX    LOCCTR                                
042964,000294: 01,2646           10167                           CCS      PRIORITY                              
042965,000295: 01,2647           12652                           TCF      JOBWAKE3                              #  ACTIVE JOB - CHECK NEXT CORE SET.
042966,000296: 01,2650           00014        COREINC            DEC      12         B-14                       #  12 REGISTERS PER CORE SET.
042967,000297: 01,2651           12661                           TCF      WAKETEST                              #  SLEEPING JOB - SEE IF CADR MATCHES.
042968,000298: 
042969,000299: 01,2652           32650        JOBWAKE3           CAF      COREINC                               
042970,000300: 01,2653           26064                           ADS      LOCCTR                                
042971,000301: 01,2654           10062                           CCS      EXECTEM2                              
042972,000302: 01,2655           12644                           TCF      JOBWAKE4                              
042973,000303: 01,2656           45026                           CS       ONE                                   #  EXIT IF SLEEPING JOB NOT FOUND.
042974,000304: 01,2657           54064                           TS       LOCCTR                                
042975,000305: 01,2660           15230                           TCF      ENDFIND                               
042976,000306: 
042977,000307: 01,2661           40065        WAKETEST           CS       NEWLOC                                
042978,000308: 01,2662           50064                           INDEX    LOCCTR                                
042979,000309: 01,2663           60164                           AD       LOC                                   
042980,000310: 01,2664           00006                           EXTEND                                         
042981,000311: 01,2665           12667                           BZF      +2                                    #  IF MATCH.
042982,000312: 01,2666           12652                           TCF      JOBWAKE3                              #  EXAMINE NEXT CORE SET IF NO MATCH.
042983,000313: 
042984,000314: 01,2667           50064                           INDEX    LOCCTR                                #  RE-COMPLEMENT PRIORITY TO SHOW JOB AWAKE
042985,000315: 01,2670           40167                           CS       PRIORITY                              
042986,000316: 01,2671           54063                           TS       NEWPRIO                               
042987,000317: 01,2672           50064                           INDEX    LOCCTR                                
042988,000318: 01,2673           54167                           TS       PRIORITY                              
042989,000319: 
042990,000320: 01,2674           44362                           CS       FBANKMSK                              #  MAKE UP THE 2CADR OF THE WAKE ADDRESS
042991,000321: 01,2675           70065                           MASK     NEWLOC                                #  USING THE CADR IN NEWLOC AND THE EBANK
042992,000322: 01,2676           65014                           AD       2K                                    #  HALF OF BBANK SAVED IN BANKSET.
042993,000323: 01,2677           56065                           XCH      NEWLOC                                
042994,000324: 01,2700           74362                           MASK     FBANKMSK                              
042995,000325: 01,2701           50064                           INDEX    LOCCTR                                
042996,000326: 01,2702           60165                           AD       BANKSET                               
042997,000327: 01,2703           54066                           TS       NEWLOC     +1                         
042998,000328: 
042999,000329: 01,2704           10064                           CCS      LOCCTR                                #  SPECIAL TREATMENT IF THIS JOB WAS
043000,000330: 01,2705           12500                           TCF      SETLOC                                #  ALREADY IN THE RUN (0) POSITION.
043001,000331: 01,2706           12470                           TCF      SPECTEST                              
043002,000332: 
043003,000333:                                                                                                  #           PRIORITY CHANGE.  CHANGE THE CONTENTS OF PRIORITY AND SCAN FOR THE JOB OF HIGHEST PRIORITY.
043004,000334: 
043005,000335: 01,2707           54164        PRIOCH2            TS       LOC                                   
043006,000336: 01,2710           35030                           CAF      ZERO                                  #  SET FLAG TO TELL ENDJOB SCANNER IF THIS
043007,000337: 01,2711           54130                           TS       BUF                                   #  JOB IS STILL HIGHEST PRIORITY.
043008,000338: 01,2712           35054                           CAF      LOW9                                  
043009,000339: 01,2713           70167                           MASK     PRIORITY                              
043010,000340: 01,2714           60063                           AD       NEWPRIO                               
043011,000341: 01,2715           54167                           TS       PRIORITY                              
043012,000342: 01,2716           40000                           COM                                            
043013,000343: 01,2717           12624                           TCF      JOBSLP2                               #  AND TO EJSCAN.
043014,000344: 
043015,000345:                                                                                                  #           RELEASE THIS CORE SET AND VAC AREA AND SCAN FOR THE JOB OF HIGHEST ACTIVE PRIORITY.
043016,000346: 
043017,000347: 01,2720           00004        ENDJOB1            INHINT                                         
043018,000348: 01,2721           45030                           CS       ZERO                                  
043019,000349: 01,2722           54131                           TS       BUF        +1                         
043020,000350: 01,2723           56167                           XCH      PRIORITY                              
043021,000351: 01,2724           75054                           MASK     LOW9                                  
043022,000352: 01,2725           54001                           TS       L                                     
043023,000353: 
043024,000354: 01,2726           45234                           CS       FAKEPRET                              
043025,000355: 01,2727           60001                           AD       L                                     
043026,000356: 
043027,000357: 01,2730           00006                           EXTEND                                         
043028,000358: 01,2731           62735                           BZMF     EJSCAN                                #  NOVAC ENDOFJOB
043029,000359: 
043030,000360: 01,2732           10001                           CCS      L                                     
043031,000361: 01,2733           50000                           INDEX    A                                     
043032,000362: 01,2734           54000                           TS       0                                     
043033,000363: 
043034,000364: 01,2735           10203        EJSCAN             CCS      PRIORITY   +12D                       
043035,000365: 01,2736           03002                           TC       EJ1                                   
043036,000366: 01,2737           05726                           TC       CCSHOLE                               
043037,000367: 01,2740           12741                           TCF      +1                                    
043038,000368: 
043039,000369: 01,2741           10217                           CCS      PRIORITY   +24D                       #  EXAMINE EACH PRIORITY REGISTER TO FIND
043040,000370: 01,2742           03002                           TC       EJ1                                   #  THE JOB OF HIGHEST ACTIVE PRIORITY.
043041,000371: 01,2743           05726                           TC       CCSHOLE                               
043042,000372: 01,2744           12745                           TCF      +1                                    
043043,000373: 
043044,000374: 01,2745           10233                           CCS      PRIORITY   +36D                       
043045,000375: 01,2746           03002                           TC       EJ1                                   
043046,000376: 01,2747           67610        -CCSPR             -CCS     PRIORITY                              
043047,000377: 01,2750           12751                           TCF      +1                                    
043048,000378: 
043049,000379: 01,2751           10247                           CCS      PRIORITY   +48D                       
043050,000380: 01,2752           03002                           TC       EJ1                                   
043051,000381: 01,2753           05726                           TC       CCSHOLE                               
043052,000382: 01,2754           12755                           TCF      +1                                    
043053,000383: 
043054,000384: 01,2755           10263                           CCS      PRIORITY   +60D                       
043055,000385: 01,2756           03002                           TC       EJ1                                   
043056,000386: 01,2757           05726                           TC       CCSHOLE                               
043057,000387: 01,2760           12761                           TCF      +1                                    
043058,000388: 
043059,000389: 01,2761           10277                           CCS      PRIORITY   +72D                       
043060,000390: 01,2762           03002                           TC       EJ1                                   
043061,000391: 01,2763           05726                           TC       CCSHOLE                               
043062,000392: 01,2764           12765                           TCF      +1                                    
043063,000393: 
043064,000394:                                                                                                  #           EVALUATE THE RESULTS OF THE SCAN.
043065,000395: 
043066,000396: 01,2765           10131                           CCS      BUF        +1                         #  SEE IF THERE ARE ANY ACTIVE JOBS WAITING
043067,000397: 01,2766           05726                           TC       CCSHOLE                               
043068,000398: 01,2767           05726                           TC       CCSHOLE                               
043069,000399: 
043070,000400: 01,2770           12772                           TCF      +2                                    
043071,000401: 01,2771           13017                           TCF      DUMMYJOB                              
043072,000402: 01,2772           10130                           CCS      BUF                                   #  BUF IS ZERO IF THIS IS A PRIOCHNG AND
043073,000403: 01,2773           12775                           TCF      +2                                    #  CHANGED PRIORITY IS STILL HIGHEST.
043074,000404: 01,2774           12601                           TCF      ENDPRCHG   -1                         
043075,000405: 
043076,000406: 01,2775           50000                           INDEX    A                                     #  OTHERWISE, SET NEWJOB TO THE RELATIVE
043077,000407: 01,2776           27777                           CAF      0          -1                         #  ADDRESS OF THE NEW JOB'S CORE SET.
043078,000408: 01,2777           62747                           AD       -CCSPR                                
043079,000409: 01,3000           54067                           TS       NEWJOB                                
043080,000410: 01,3001           12521                           TCF      CHANJOB    -2                         
043081,000411: 
043082,000412: 01,3002           54132        EJ1                TS       BUF        +2                         
043083,000413: 01,3003           60131                           AD       BUF        +1                         #  - OLD HIGH PRIORITY.
043084,000414: 01,3004           10000                           CCS      A                                     
043085,000415: 01,3005           40132                           CS       BUF        +2                         
043086,000416: 01,3006           13012                           TCF      EJ2                                   #  NEW HIGH PRIORITY.
043087,000417: 01,3007           13010                           NOOP                                           
043088,000418: 01,3010           50002                           INDEX    Q                                     
043089,000419: 01,3011           00002                           TC       2                                     #  PROCEED WITH SEARCH.
043090,000420: 
043091,000421: 01,3012           54131        EJ2                TS       BUF        +1                         
043092,000422: 01,3013           00006                           EXTEND                                         
043093,000423: 01,3014           22130                           QXCH     BUF                                   #  FOR LOCATING CCS PRIORITY + X INSTR.
043094,000424: 01,3015           50130                           INDEX    BUF                                   
043095,000425: 01,3016           00002                           TC       2                                     
043096,000426: 
043097,000427:                                                                                                  #           IDLING AND COMPUTER ACTIVITY (GREEN) LIGHT MAINTENANCE. THE IDLING ROUTINE IS NOT A JOB IN ITSELF,
043098,000428:                                                                                                  #  BUT RATHER A SUBROUTINE OF THE EXECUTIVE.
043099,000429: 
043100,000430: 01,3017     1361                                  EBANK=   SELFRET                               #  SELF-CHECK STORAGE IN EBANK.
043101,000431: 
043102,000432: 01,3017           45030        DUMMYJOB           CS       ZERO                                  #  SET NEWJOB TO -0 FOR IDLING.
043103,000433: 01,3020           54067                           TS       NEWJOB                                
043104,000434: 01,3021           00003                           RELINT                                         
043105,000435: 01,3022           45025                           CS       TWO                                   #  TURN OFF THE ACTIVITY LIGHT.
043106,000436: 01,3023           00006                           EXTEND                                         
043107,000437: 01,3024           03011                           WAND     DSALMOUT                              
043108,000438: 01,3025           10067        ADVAN              CCS      NEWJOB                                #  IS A NEWJOB ACTIVE?
043109,000439: 01,3026           12626                           TCF      NUCHANG2                              #  YES... ONE REQUIRING A CHANGE JOB.
043110,000440: 01,3027           35025                           CAF      TWO                                   #  NEW JOB ALREADY IN POSITION FOR
043111,000441: 01,3030           13036                           TCF      NUDIRECT                              #  EXECUTION.
043112,000442: 
043113,000443: 01,3031           31361                           CA       SELFRET                               
043114,000444: 01,3032           54001                           TS       L                                     #  PUT RETURN ADDRESS IN L.
043115,000445: 01,3033           33035                           CAF      SELFBANK                              
043116,000446: 01,3034           15236                           TCF      SUPDXCHZ   +1                         #   AND DISPATCH JOB.
043117,000447: 
043118,000448: 01,3035     1361                                  EBANK=   SELFRET                               
043119,000449: 01,3035           66102        SELFBANK           BBCON    SELFCHK                               
043120,000450: 
043121,000451: 01,3036           00006        NUDIRECT           EXTEND                                         #  TURN THE GREEN LIGHT BACK ON.
043122,000452: 01,3037           05011                           WOR      DSALMOUT                              
043123,000453: 01,3040           52165                           DXCH     LOC                                   #  JOBS STARTED IN THIS FASHION MUST BE
043124,000454: 01,3041           15235                           TCF      SUPDXCHZ                              
043125,000455: 
043126,000456:    5235                                           BLOCK    2                                     #  IN FIXED-FIXED SO OTHERS MAY USE.
043127,000457: 
043128,000458:    5235                                           COUNT*   $$/EXEC                               
043129,000459:                                                                                                  #  SUPDXCHZ - ROUTINE TO TRANSFER TO SUPERBANK.
043130,000460:                                                                                                  #  CALLING SEQUENCE
043131,000461:                                                                                                  #                TCF     SUPDXCHZ        WITH 2CADR OF DESIRED LOCATION IN A + L.
043132,000462: 
043133,000463:    5235           56001        SUPDXCHZ           XCH      L                                     #  BASIC.
043134,000464:    5236           00006                 +1        EXTEND                                         
043135,000465:    5237           01007                           WRITE    SUPERBNK                              
043136,000466:    5240           54006                           TS       BBANK                                 
043137,000467:    5241           00001                           TC       L                                     
043138,000468: 
043139,000469:    5242           77677        NEG100             OCT      77677                                 

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