Source Code

These source-code files are part of a reconstructed copy of Luminary 173, the second (unflown) release of the Apollo 14 Lunar Module (LM) Apollo Guidance Computer (AGC) software.

The reconstruction began with reconstructed source code for Luminary 178. Changes between revision 173 and 178 were backed out, as described by Luminary memo 167 (revision 1). The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152N. Note that page numbers in the reconstructed code match those for the baseline log section mentioned in each file's changelog; the page numbers for a real Luminary 173 listing would be different.

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

046550,000002:                                                                                                  ## Copyright:   Public domain.
046551,000003:                                                                                                  ## Filename:    EXECUTIVE.agc
046552,000004:                                                                                                  ## Purpose:     A section of Luminary revision 173.
046553,000005:                                                                                                  ##              It is part of the reconstructed source code for the second
046554,000006:                                                                                                  ##              (unflown) release of the flight software for the Lunar
046555,000007:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 14.
046556,000008:                                                                                                  ##              The code has been recreated from a reconstructed copy of
046557,000009:                                                                                                  ##              Luminary 178, as well as Luminary memo 167 (revision 1).
046558,000010:                                                                                                  ##              It has been adapted such that the resulting bugger words
046559,000011:                                                                                                  ##              exactly match those specified for Luminary 173 in NASA
046560,000012:                                                                                                  ##              drawing 2021152N, which gives relatively high confidence
046561,000013:                                                                                                  ##              that the reconstruction is correct.
046562,000014:                                                                                                  ## Reference:   pp. 1094-1107
046563,000015:                                                                                                  ## Assembler:   yaYUL
046564,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
046565,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
046566,000018:                                                                                                  ## Mod history: 2019-09-18 MAS  Created from Luminary 178.
046567,000019: 

Page 1094

046569,000021:    5072                                           BLOCK    02                                    
046570,000022:                                                                                                  #           TO ENTER A JOB REQUEST REQUIRING NO VAC AREA:
046571,000023: 
046572,000024:    5072                                           COUNT*   $$/EXEC                               
046573,000025:    5072           00004        NOVAC              INHINT                                         
046574,000026:    5073           65164                           AD       FAKEPRET                              #  LOC(MPAC +6) - LOC(QPRET)
046575,000027:    5074           54063                           TS       NEWPRIO                               #  PRIORITY OF NEW JOB + NOVAC C(FIXLOC)

A blue line is drawn under the last two digits of the assembled octal for the above line.

046577,000029: 
046578,000030:    5075           00006                           EXTEND                                         
046579,000031:    5076           50002                           INDEX    Q                                     #  Q WILL BE UNDISTURBED THROUGHOUT.
046580,000032:    5077           30001                           DCA      0                                     #  2CADR OF JOB ENTERED.
046581,000033:    5100           52066                           DXCH     NEWLOC                                

A blue line is drawn under the last two digits of the assembled octal for the above line.

046583,000035:    5101           35163                           CAF      EXECBANK                              
046584,000036:    5102           56004                           XCH      FBANK                                 
046585,000037:    5103           54061                           TS       EXECTEM1                              

A blue line is drawn under the last two digits of the assembled octal for the above line.

046587,000039:    5104           12631                           TCF      NOVAC2                                #  ENTER EXECUTIVE BANK.
046588,000040: 
046589,000041:                                                                                                  #           TO ENTER A JOB REQUEST REQUIRING A VAC AREA - E.G., ALL (PARTIALLY) INTERPRETIVE JOBS.
046590,000042: 
046591,000043:    5105           00004        FINDVAC            INHINT                                         
046592,000044:    5106           54063                           TS       NEWPRIO                               
046593,000045:    5107           00006                           EXTEND                                         
046594,000046:    5110           50002                           INDEX    Q                                     
046595,000047:    5111           30001                           DCA      0                                     
046596,000048:    5112           52066        SPVACIN            DXCH     NEWLOC                                
046597,000049:    5113           35163                           CAF      EXECBANK                              
046598,000050:    5114           56004                           XCH      FBANK                                 
046599,000051:    5115           12605                           TCF      FINDVAC2                              #  OFF TO EXECUTIVE SWITCHED-BANK.
046600,000052: 
046601,000053:                                                                                                  #           TO ENTER A FINDVAC WITH THE PRIORITY IN NEWPRIO TO THE 2CADR ARRIVING IN A AND L:
046602,000054: 
046603,000055:                                                                                                  #           USERS OF SPVAC MUST INHINT BEFORE STORING IN NEWPRIO.
046604,000056: 
046605,000057:    5116           56002        SPVAC              XCH      Q                                     
046606,000058:    5117           67751                           AD       NEG2                                  
046607,000059:    5120           56002                           XCH      Q                                     
046608,000060:    5121           15112                           TCF      SPVACIN                               
046609,000061: 
046610,000062:                                                                                                  #           TO SUSPEND A BASIC JOB SO A HIGHER PRIORITY JOB MAY BE SERVICED:
046611,000063: 
046612,000064:    5122           22002        CHANG1             LXCH     Q                                     
046613,000065:    5123           35163                           CAF      EXECBANK                              
046614,000066:    5124           56006                           XCH      BBANK                                 
046615,000067:    5125           12712                           TCF      CHANJOB                               
046616,000068: 
046617,000069:                                                                                                  #           TO SUSPEND AN INTERPRETIVE JOB:
046618,000070: 
046619,000071:    5126           40164        CHANG2             CS       LOC                                   #  NEGATIVE LOC SHOWS JOB = INTERPRETIVE.
046620,000072:                                                                                                  #           ITRACE (4) REFERS TO "CHANG2".
046621,000073:    5127           54001                           TS       L                                     

Page 1095

046623,000075:    5130           35163                 +2        CAF      EXECBANK                              
046624,000076:    5131           54006                           TS       BBANK                                 
046625,000077:    5132           12711                           TCF      CHANJOB    -1                         
046626,000078: 

Page 1096

046628,000080:                                                                                                  #           TO VOLUNTARILY SUSPEND A JOB UNTIL THE COMPLETION OF SOME ANTICIPATED EVENT (I/O EVENT ETC.):
046629,000081: 
046630,000082:    5133           54164        JOBSLEEP           TS       LOC                                   
046631,000083:    5134           35163                           CAF      EXECBANK                              
046632,000084:    5135           54004                           TS       FBANK                                 
046633,000085:    5136           13002                           TCF      JOBSLP1                               
046634,000086: 
046635,000087:                                                                                                  #           TO AWAKEN A JOB PUT TO SLEEP IN THE ABOVE FASHION:
046636,000088: 
046637,000089:    5137           00004        JOBWAKE            INHINT                                         
046638,000090:    5140           54065                           TS       NEWLOC                                
046639,000091:    5141           44752                           CS       TWO                                   #  EXIT IS VIA FINDVAC/NOVAC PROCEDURES.
046640,000092:    5142           26002                           ADS      Q                                     
046641,000093:    5143           35163                           CAF      EXECBANK                              
046642,000094:    5144           56004                           XCH      FBANK                                 
046643,000095:    5145           13027                           TCF      JOBWAKE2                              
046644,000096: 
046645,000097:                                                                                                  #           TO CHANGE THE PRIORITY OF A JOB CURRENTLY UNDER EXECUTION:
046646,000098: 
046647,000099:    5146           00004        PRIOCHNG           INHINT                                         #  NEW PRIORITY ARRIVES IN A. RETURNS TO
046648,000100:    5147           54063                           TS       NEWPRIO                               #  CALLER AS SOON AS NEW JOB PRIORITY IS
046649,000101:    5150           35163                           CAF      EXECBANK                              #  HIGHEST. PREPARE FOR POSSIBLE BASIC-
046650,000102:    5151           56006                           XCH      BBANK                                 #  STYLE CHANGE-JOB.
046651,000103:    5152           54165                           TS       BANKSET                               
046652,000104:    5153           30002                           CA       Q                                     
046653,000105:    5154           13076                           TCF      PRIOCH2                               
046654,000106: 
046655,000107:                                                                                                  #           TO REMOVE A JOB FROM EXECUTIVE CONSIDERATIONS:
046656,000108: 
046657,000109:    5155           35163        ENDOFJOB           CAF      EXECBANK                              
046658,000110:    5156           54004                           TS       FBANK                                 
046659,000111:    5157           13107                           TCF      ENDJOB1                               
046660,000112: 
046661,000113:    5160           30061        ENDFIND            CA       EXECTEM1                              #  RETURN TO CALLER AFTER JOB ENTRY
046662,000114:    5161           54004                           TS       FBANK                                 #  COMPLETE.
046663,000115:    5162           16744                           TCF      Q+2                                   
046664,000116:    5163           02605        EXECBANK           CADR     FINDVAC2                              
046665,000117: 
046666,000118:    5164           00110        FAKEPRET           ADRES    MPAC       -36D                       #  LOC(MPAC +6) - LOC(QPRET)
046667,000119: 
046668,000120:                                                                                                  #           TO CHANGE A "FINDVAC" JOB TO A "NOVAC" -- RELEASE ITS VAC AREA:
046669,000121:    5165           30167        VACRLEAS           CA       PRIORITY                              #  CHANGE TO NOVAC VALUE
046670,000122:    5166           77730                           MASK     PRIO37                                
046671,000123:    5167           65164                           AD       FAKEPRET                              
046672,000124:    5170           56167                           XCH      PRIORITY                              
046673,000125:    5171           75004                           MASK     LOW9                                  
046674,000126:    5172           10000                           CCS      A                                     
046675,000127:    5173           50000                           INDEX    A                                     
046676,000128:    5174           54000                           TS       0                                     #  RELEASE VAC AREA
046677,000129:    5175           00002                           TC       Q                                     
046678,000130: 

Page 1097

046680,000132:                                                                                                  #           LOCATE AN AVAILABLE VAC AREA.
046681,000133: 
046682,000134: 01,2605                                           BANK     01                                    
046683,000135: 01,2605                                           COUNT*   $$/EXEC                               
046684,000136: 01,2605           54061        FINDVAC2           TS       EXECTEM1                              #  (SAVE CALLER'S BANK FIRST.)
046685,000137: 01,2606           10400                           CCS      VAC1USE                               
046686,000138: 01,2607           12624                           TCF      VACFOUND                              
046687,000139: 01,2610           10454                           CCS      VAC2USE                               
046688,000140: 01,2611           12624                           TCF      VACFOUND                              
046689,000141: 01,2612           10530                           CCS      VAC3USE                               
046690,000142: 01,2613           12624                           TCF      VACFOUND                              
046691,000143: 01,2614           10604                           CCS      VAC4USE                               
046692,000144: 01,2615           12624                           TCF      VACFOUND                              
046693,000145: 01,2616           10660                           CCS      VAC5USE                               
046694,000146: 01,2617           12624                           TCF      VACFOUND                              
046695,000147: 01,2620           22061                           LXCH     EXECTEM1                              
046696,000148: 01,2621           30002                           CA       Q                                     
046697,000149: 01,2622           05717                           TC       BAILOUT1                              
046698,000150: 01,2623           31201                           OCT      31201                                 #  NO VAC AREAS
046699,000151: 
046700,000152: 01,2624           64752        VACFOUND           AD       TWO                                   #  RESERVE THIS VAC AREA BY STORING A ZERO
046701,000153: 01,2625           22007                           ZL                                             #  IN ITS VAC USE REGISTER AND STORE THE
046702,000154: 01,2626           50000                           INDEX    A                                     #  ADDRESS OF THE FIRST WORD OF IT IN THE
046703,000155: 01,2627           21777                           LXCH     0          -1                         #  LOW NINE BITS OF THE PRIORITY WORD.
046704,000156: 01,2630           26063                           ADS      NEWPRIO                               
046705,000157: 
046706,000158: 01,2631           34755        NOVAC2             CAF      ZERO                                  #  NOVAC ENTERS HERE. FIND A CORE SET.
046707,000159: 01,2632           54064                           TS       LOCCTR                                
046708,000160: 01,2633           32640                           CAF      NO.CORES                              #  SEVEN SETS OF ELEVEN REGISTERS EACH.
046709,000161: 01,2634           54062        NOVAC3             TS       EXECTEM2                              
046710,000162: 01,2635           50064                           INDEX    LOCCTR                                
046711,000163: 01,2636           10167                           CCS      PRIORITY                              #  EACH PRIORITY REGISTER CONTAINS -0 IF
046712,000164: 01,2637           12700                           TCF      NEXTCORE                              #  THE CORRESPONDING CORE SET IS AVAILABLE.
046713,000165: 01,2640           00007        NO.CORES           DEC      7          B-14                       
046714,000166: 01,2641           12700                           TCF      NEXTCORE                              #  AN ACTIVE JOB HAS A POSITIVE PRIORITY
046715,000167:                                                                                                  #  BUT A DORMANT JOB'S PRIORITY IS NEGATIVE
046716,000168: 

Page 1098

046718,000170: 01,2642           30063        CORFOUND           CA       NEWPRIO                               #  SET THE PRIORITY OF THIS JOB IN THE CORE
046719,000171: 01,2643           50064                           INDEX    LOCCTR                                #  SET'S PRIORITY REGISTER AND SET THE
046720,000172: 01,2644           54167                           TS       PRIORITY                              #  JOB'S PUSH-DOWN POINTER AT THE BEGINNING
046721,000173: 01,2645           75004                           MASK     LOW9                                  #  OF THE WORK AREA AND OVERFLOW INDICATOR
046722,000174: 01,2646           50064                           INDEX    LOCCTR                                
046723,000175: 01,2647           54166                           TS       PUSHLOC                               #  OFF TO PREPARE FOR INTERPRETIVE PROGRAMS
046724,000176: 
046725,000177: 01,2650           10064                           CCS      LOCCTR                                #  IF CORE SET ZERO IS BEING LOADED, SET UP
046726,000178: 01,2651           12665                           TCF      SETLOC                                #  OVFIND AND FIXLOC IMMEDIATELY .
046727,000179: 01,2652           54121                           TS       OVFIND                                
046728,000180: 01,2653           30166                           CA       PUSHLOC                               
046729,000181: 01,2654           54120                           TS       FIXLOC                                
046730,000182: 
046731,000183: 01,2655           10067        SPECTEST           CCS      NEWJOB                                #  SEE IF ANY ACTIVE JOBS WAITING (RARE).
046732,000184: 01,2656           12665                           TCF      SETLOC                                #  MUST BE AWAKENED BUT UNCHANGED JOB.
046733,000185: 01,2657           05706                           TC       CCSHOLE                               
046734,000186: 01,2660           05706                           TC       CCSHOLE                               
046735,000187: 01,2661           54067                           TS       NEWJOB                                #  +0 SHOWS ACTIVE JOB ALREADY SET.
046736,000188: 01,2662           52066                           DXCH     NEWLOC                                
046737,000189: 01,2663           52165                           DXCH     LOC                                   
046738,000190: 01,2664           15160                           TCF      ENDFIND                               
046739,000191: 
046740,000192: 01,2665           52066        SETLOC             DXCH     NEWLOC                                #  SET UP THE LOCATION REGISTERS FOR THIS
046741,000193: 01,2666           50064                           INDEX    LOCCTR                                
046742,000194: 01,2667           52165                           DXCH     LOC                                   
046743,000195: 01,2670           50067                           INDEX    NEWJOB                                #  THIS INDEX INSTRUCTION INSURES THAT THE
046744,000196: 01,2671           40167                           CS       PRIORITY                              #  HIGHEST ACTIVE PRIORITY WILL BE COMPARED
046745,000197: 01,2672           60063                           AD       NEWPRIO                               #  WITH THE NEW PRIORITY TO SEE IF NEWJOB
046746,000198: 01,2673           00006                           EXTEND                                         #  SHOULD BE SET TO SIGNAL A SWITCH.
046747,000199: 01,2674           65160                           BZMF     ENDFIND                               
046748,000200: 01,2675           30064                           CA       LOCCTR                                #  LOCCTR IS LEFT SET AT THIS CORE SET IF
046749,000201: 01,2676           54067                           TS       NEWJOB                                #  THE CALLER WANTS TO LOAD ANY MPAC
046750,000202: 01,2677           15160                           TCF      ENDFIND                               #  REGISTERS, ETC.
046751,000203: 
046752,000204: 01,2700           33037        NEXTCORE           CAF      COREINC                               
046753,000205: 01,2701           26064                           ADS      LOCCTR                                
046754,000206: 01,2702           10062                           CCS      EXECTEM2                              
046755,000207: 01,2703           12634                           TCF      NOVAC3                                
046756,000208: 01,2704           22061                           LXCH     EXECTEM1                              
046757,000209: 01,2705           30002                           CA       Q                                     
046758,000210: 01,2706           05717                           TC       BAILOUT1                              #  NO CORE SETS AVAILABLE.
046759,000211: 01,2707           31202                           OCT      31202                                 

Page 1099

046761,000213:                                                                                                  #           THE FOLLOWING ROUTINE SWAPS CORE SET 0 WITH THAT WHOSE RELATIVE ADDRESS IS IN NEWJOB.
046762,000214: 
046763,000215: 01,2710           22164                 -2        LXCH     LOC                                   
046764,000216: 01,2711           30165                 -1        CAE      BANKSET                               #  BANKSET, NOT BBANK, HAS RIGHT CONTENTS.
046765,000217: 01,2712           00004        CHANJOB            INHINT                                         
046766,000218: 01,2713           00006                           EXTEND                                         

The following instruction is underlined in blue.

046768,000220: 01,2714           04007                           ROR      SUPERBNK                              #  PICK UP CURRENT SBANK FOR BBCON
046769,000221: 01,2715           56001                           XCH      L                                     #  LOC IN A AND BBCON IN L.
046770,000222: 01,2716           50067                 +4        INDEX    NEWJOB                                #  SWAP LOC AND BANKSET.
046771,000223: 01,2717           52165                           DXCH     LOC                                   

The following instruction is underlined in blue.

046773,000225: 01,2720           52165                           DXCH     LOC                                   
046774,000226: 
046775,000227: 01,2721           30165                           CAE      BANKSET                               
046776,000228: 01,2722           00006                           EXTEND                                         

The following instruction is underlined in blue.

046778,000230: 01,2723           01007                           WRITE    SUPERBNK                              #  SET SBANK FOR NEW JOB.
046779,000231: 01,2724           52155                           DXCH     MPAC                                  #  SWAP MULTI-PURPOSE ACCUMULATOR AREAS.
046780,000232: 01,2725           50067                           INDEX    NEWJOB                                
046781,000233: 01,2726           52155                           DXCH     MPAC                                  

The following instruction is underlined in blue.

046783,000235: 01,2727           52155                           DXCH     MPAC                                  
046784,000236: 01,2730           52157                           DXCH     MPAC       +2                         
046785,000237: 01,2731           50067                           INDEX    NEWJOB                                
046786,000238: 01,2732           52157                           DXCH     MPAC       +2                         

The following two instructions are underlined in blue.

046788,000240: 01,2733           52157                           DXCH     MPAC       +2                         
046789,000241: 01,2734           52161                           DXCH     MPAC       +4                         
046790,000242: 01,2735           50067                           INDEX    NEWJOB                                
046791,000243: 01,2736           52161                           DXCH     MPAC       +4                         

The following instruction is underlined in blue.

046793,000245: 01,2737           52161                           DXCH     MPAC       +4                         
046794,000246: 01,2740           52163                           DXCH     MPAC       +6                         
046795,000247: 01,2741           50067                           INDEX    NEWJOB                                
046796,000248: 01,2742           52163                           DXCH     MPAC       +6                         

The following instruction is underlined in blue.

046798,000250: 01,2743           52163                           DXCH     MPAC       +6                         
046799,000251: 
046800,000252: 01,2744           34755                           CAF      ZERO                                  
046801,000253: 01,2745           56121                           XCH      OVFIND                                #  MAKE PUSHLOC NEGATIVE IF OVFIND NZ.
046802,000254: 01,2746           00006                           EXTEND                                         
046803,000255: 01,2747           12752                           BZF      +3                                    
046804,000256: 01,2750           40166                           CS       PUSHLOC                               
046805,000257: 01,2751           54166                           TS       PUSHLOC                               
046806,000258: 
046807,000259: 01,2752           52167                           DXCH     PUSHLOC                               
046808,000260: 01,2753           50067                           INDEX    NEWJOB                                
046809,000261: 01,2754           52167                           DXCH     PUSHLOC                               

The following instruction is underlined in blue.

046811,000263: 01,2755           52167                           DXCH     PUSHLOC                               #  SWAPS PUSHLOC AND PRIORITY.
046812,000264: 01,2756           35004                           CAF      LOW9                                  #  SET FIXLOC TO BASE OF VAC AREA.
046813,000265: 01,2757           70167                           MASK     PRIORITY                              
046814,000266: 01,2760           54120                           TS       FIXLOC                                
046815,000267: 
046816,000268: 01,2761           10166                           CCS      PUSHLOC                               #  SET OVERFLOW INDICATOR ACCORDING TO
046817,000269: 01,2762           34755                           CAF      ZERO                                  
046818,000270: 01,2763           12770                           TCF      ENDPRCHG   -1                         
046819,000271: 

Page 1100

046821,000273: 01,2764           40166                           CS       PUSHLOC                               
046822,000274: 01,2765           54166                           TS       PUSHLOC                               
046823,000275: 01,2766           34753                           CAF      ONE                                   
046824,000276: 01,2767           56121                           XCH      OVFIND                                
046825,000277: 01,2770           54067                           TS       NEWJOB                                
046826,000278: 
046827,000279: 01,2771           00003        ENDPRCHG           RELINT                                         
046828,000280: 01,2772           52165                           DXCH     LOC                                   #  BASIC JOBS HAVE POSITIVE ADDRESSES, SO
046829,000281: 01,2773           00006                           EXTEND                                         #  DISPATCH WITH A DTCB.
046830,000282: 01,2774           62776                           BZMF     +2                                    #  IF INTERPRETIVE, SET UP EBANK, ETC.
046831,000283: 01,2775           52006                           DTCB                                           
046832,000284: 

Page 1101

046834,000286: 01,2776           40000                           COM                                            #  EPILOGUE TO JOB CHANGE FOR INTERPRETIVE
046835,000287: 01,2777           64753                           AD       ONE                                   
046836,000288: 01,3000           54164                           TS       LOC                                   #  RESUME.
046837,000289: 01,3001           16053                           TCF      INTRSM                                
046838,000290: 
046839,000291:                                                                                                  #           COMPLETE JOBSLEEP PREPARATIONS.
046840,000292: 
046841,000293: 01,3002           00004        JOBSLP1            INHINT                                         
046842,000294: 01,3003           40167                           CS       PRIORITY                              #  NNZ PRIORITY SHOWS JOB ASLEEP.
046843,000295: 01,3004           54167                           TS       PRIORITY                              
046844,000296: 01,3005           36077                           CAF      LOW7                                  
046845,000297: 01,3006           70006                           MASK     BBANK                                 
046846,000298: 01,3007           00006                           EXTEND                                         
046847,000299: 01,3010           04007                           ROR      SUPERBNK                              #  SAVE OLD SUPERBANK VALUE.
046848,000300: 01,3011           54165                           TS       BANKSET                               
046849,000301: 01,3012           44755                           CS       ZERO                                  
046850,000302: 01,3013           54131        JOBSLP2            TS       BUF        +1                         #  HOLDS - HIGHEST PRIORITY.
046851,000303: 01,3014           13124                           TCF      EJSCAN                                #  SCAN FOR HIGHEST PRIORITY ALA ENDOFJOB.
046852,000304: 
046853,000305: 01,3015           00004        NUCHANG2           INHINT                                         #  QUICK... DONT LET NEWJOB CHANGE TO +0 .
046854,000306: 01,3016           10067                           CCS      NEWJOB                                
046855,000307: 01,3017           13022                           TCF      +3                                    #  NEWJOB STILL PNZ
046856,000308: 01,3020           00003                           RELINT                                         #  NEWJOB HAS CHANGED TO +0. WAKE UP JOB
046857,000309: 01,3021           13220                           TCF      ADVAN      +2                         #  VIA NUDIRECT. (VERY RARE CASE.)
046858,000310: 
046859,000311: 01,3022           34752                           CAF      TWO                                   
046860,000312: 01,3023           00006                           EXTEND                                         
046861,000313: 01,3024           05011                           WOR      DSALMOUT                              #  TURN ON ACTIVITY LIGHT
046862,000314: 01,3025           52165                           DXCH     LOC                                   #  AND SAVE ADDRESS INFO FOR BENEFIT OF
046863,000315: 01,3026           12716                           TCF      CHANJOB    +4                         #   POSSIBLE SLEEPING JOB.
046864,000316: 

Page 1102

046866,000318:                                                                                                  #           TO WAKE UP A JOB, EACH CORE SET IS FOUND TO LOCATE ALL JOBS WHICH ARE ASLEEP. IF THE FCADR IN THE
046867,000319:                                                                                                  #  LOC REGISTER OF ANY SUCH JOB MATCHES THAT SUPPLIED BY THE CALLER, THAT JOB IS AWAKENED. IF NO JOB IS FOUND,
046868,000320:                                                                                                  #  LOCCTR IS SET TO -1 AND NO FURTHER ACTION TAKES PLACE.
046869,000321: 
046870,000322: 01,3027           54061        JOBWAKE2           TS       EXECTEM1                              
046871,000323: 01,3030           34755                           CAF      ZERO                                  #  BEGIN CORE SET SCAN.
046872,000324: 01,3031           54064                           TS       LOCCTR                                
046873,000325: 01,3032           32640                           CAF      NO.CORES                              
046874,000326: 01,3033           54062        JOBWAKE4           TS       EXECTEM2                              
046875,000327: 01,3034           50064                           INDEX    LOCCTR                                
046876,000328: 01,3035           10167                           CCS      PRIORITY                              
046877,000329: 01,3036           13041                           TCF      JOBWAKE3                              #  ACTIVE JOB - CHECK NEXT CORE SET.
046878,000330: 01,3037           00014        COREINC            DEC      12         B-14                       #  12 REGISTERS PER CORE SET.
046879,000331: 01,3040           13050                           TCF      WAKETEST                              #  SLEEPING JOB - SEE IF CADR MATCHES.
046880,000332: 
046881,000333: 01,3041           33037        JOBWAKE3           CAF      COREINC                               
046882,000334: 01,3042           26064                           ADS      LOCCTR                                
046883,000335: 01,3043           10062                           CCS      EXECTEM2                              
046884,000336: 01,3044           13033                           TCF      JOBWAKE4                              
046885,000337: 01,3045           44753                           CS       ONE                                   #  EXIT IF SLEEPING JOB NOT FOUND.
046886,000338: 01,3046           54064                           TS       LOCCTR                                
046887,000339: 01,3047           15160                           TCF      ENDFIND                               
046888,000340: 
046889,000341: 01,3050           40065        WAKETEST           CS       NEWLOC                                
046890,000342: 01,3051           50064                           INDEX    LOCCTR                                
046891,000343: 01,3052           60164                           AD       LOC                                   
046892,000344: 01,3053           00006                           EXTEND                                         
046893,000345: 01,3054           13056                           BZF      +2                                    #  IF MATCH.
046894,000346: 01,3055           13041                           TCF      JOBWAKE3                              #  EXAMINE NEXT CORE SET IF NO MATCH.
046895,000347: 
046896,000348: 01,3056           50064                           INDEX    LOCCTR                                #  RE-COMPLEMENT PRIORITY TO SHOW JOB AWAKE
046897,000349: 01,3057           40167                           CS       PRIORITY                              
046898,000350: 01,3060           54063                           TS       NEWPRIO                               
046899,000351: 01,3061           50064                           INDEX    LOCCTR                                
046900,000352: 01,3062           54167                           TS       PRIORITY                              
046901,000353: 
046902,000354: 01,3063           44350                           CS       FBANKMSK                              #  MAKE UP THE 2CADR OF THE WAKE ADDRESS
046903,000355: 01,3064           70065                           MASK     NEWLOC                                #  USING THE CADR IN NEWLOC AND THE EBANK
046904,000356: 01,3065           64741                           AD       2K                                    #  HALF OF BBANK SAVED IN BANKSET.
046905,000357: 01,3066           56065                           XCH      NEWLOC                                
046906,000358: 01,3067           74350                           MASK     FBANKMSK                              
046907,000359: 01,3070           50064                           INDEX    LOCCTR                                
046908,000360: 01,3071           60165                           AD       BANKSET                               
046909,000361: 01,3072           54066                           TS       NEWLOC     +1                         
046910,000362: 
046911,000363: 01,3073           10064                           CCS      LOCCTR                                #  SPECIAL TREATMENT IF THIS JOB WAS
046912,000364: 01,3074           12665                           TCF      SETLOC                                #  ALREADY IN THE RUN (0) POSITION.
046913,000365: 01,3075           12655                           TCF      SPECTEST                              
046914,000366: 

Page 1103

046916,000368:                                                                                                  #           PRIORITY CHANGE. CHANGE THE CONTENTS OF PRIORITY AND SCAN FOR THE JOB OF HIGHEST PRIORITY.
046917,000369: 
046918,000370: 01,3076           54164        PRIOCH2            TS       LOC                                   
046919,000371: 01,3077           34755                           CAF      ZERO                                  #  SET FLAG TO TELL ENDJOB SCANNER IF THIS
046920,000372: 01,3100           54130                           TS       BUF                                   #  JOB IS STILL HIGHEST PRIORITY.
046921,000373: 01,3101           35004                           CAF      LOW9                                  
046922,000374: 01,3102           70167                           MASK     PRIORITY                              
046923,000375: 01,3103           60063                           AD       NEWPRIO                               
046924,000376: 01,3104           54167                           TS       PRIORITY                              
046925,000377: 01,3105           40000                           COM                                            
046926,000378: 01,3106           13013                           TCF      JOBSLP2                               #  AND TO EJSCAN.
046927,000379: 

Page 1104

046929,000381:                                                                                                  #           RELEASE THIS CORE SET AND VAC AREA AND SCAN FOR THE JOB OF HIGHEST ACTIVE PRIORITY.
046930,000382: 
046931,000383: 01,3107           00004        ENDJOB1            INHINT                                         
046932,000384: 01,3110           44755                           CS       ZERO                                  
046933,000385: 01,3111           54131                           TS       BUF        +1                         
046934,000386: 01,3112           56167                           XCH      PRIORITY                              
046935,000387: 01,3113           75004                           MASK     LOW9                                  
046936,000388: 01,3114           54001                           TS       L                                     
046937,000389: 
046938,000390: 01,3115           45164                           CS       FAKEPRET                              
046939,000391: 01,3116           60001                           AD       L                                     
046940,000392: 
046941,000393: 01,3117           00006                           EXTEND                                         
046942,000394: 01,3120           63124                           BZMF     EJSCAN                                #  NOVAC ENDOFJOB
046943,000395: 
046944,000396: 01,3121           10001                           CCS      L                                     
046945,000397: 01,3122           50000                           INDEX    A                                     
046946,000398: 01,3123           54000                           TS       0                                     
046947,000399: 
046948,000400: 01,3124           10203        EJSCAN             CCS      PRIORITY   +12D                       
046949,000401: 01,3125           03175                           TC       EJ1                                   
046950,000402: 01,3126           05706                           TC       CCSHOLE                               
046951,000403: 01,3127           13130                           TCF      +1                                    
046952,000404: 
046953,000405: 01,3130           10217                           CCS      PRIORITY   +24D                       #  EXAMINE EACH PRIORITY REGISTER TO FIND
046954,000406: 01,3131           03175                           TC       EJ1                                   #  THE JOB OF HIGHEST ACTIVE PRIORITY.
046955,000407: 01,3132           05706                           TC       CCSHOLE                               
046956,000408: 01,3133           13134                           TCF      +1                                    
046957,000409: 
046958,000410: 01,3134           10233                           CCS      PRIORITY   +36D                       
046959,000411: 01,3135           03175                           TC       EJ1                                   
046960,000412: 01,3136           67610        -CCSPR             -CCS     PRIORITY                              
046961,000413: 01,3137           13140                           TCF      +1                                    
046962,000414: 
046963,000415: 01,3140           10247                           CCS      PRIORITY   +48D                       
046964,000416: 01,3141           03175                           TC       EJ1                                   
046965,000417: 01,3142           05706                           TC       CCSHOLE                               
046966,000418: 01,3143           13144                           TCF      +1                                    
046967,000419: 
046968,000420: 01,3144           10263                           CCS      PRIORITY   +60D                       
046969,000421: 01,3145           03175                           TC       EJ1                                   
046970,000422: 01,3146           05706                           TC       CCSHOLE                               
046971,000423: 01,3147           13150                           TCF      +1                                    
046972,000424: 
046973,000425: 01,3150           10277                           CCS      PRIORITY   +72D                       
046974,000426: 01,3151           03175                           TC       EJ1                                   
046975,000427: 01,3152           05706                           TC       CCSHOLE                               
046976,000428: 01,3153           13154                           TCF      +1                                    
046977,000429: 
046978,000430: 01,3154           10313                           CCS      PRIORITY   +84D                       

Page 1105

046980,000432: 01,3155           03175                           TC       EJ1                                   
046981,000433: 01,3156           05706                           TC       CCSHOLE                               
046982,000434: 01,3157           13160                           TCF      +1                                    
046983,000435: 

Page 1106

046985,000437:                                                                                                  #           EVALUATE THE RESULTS OF THE SCAN.
046986,000438: 
046987,000439: 01,3160           10131                           CCS      BUF        +1                         #  SEE IF THERE ARE ANY ACTIVE JOBS WAITING
046988,000440: 01,3161           05706                           TC       CCSHOLE                               
046989,000441: 01,3162           05706                           TC       CCSHOLE                               
046990,000442: 
046991,000443: 01,3163           13165                           TCF      +2                                    
046992,000444: 01,3164           13210                           TCF      DUMMYJOB                              
046993,000445: 01,3165           10130                           CCS      BUF                                   #  BUF IS ZERO IF THIS IS A PRIOCHNG AND
046994,000446: 01,3166           13170                           TCF      +2                                    #  CHANGED PRIORITY IS STILL HIGHEST.
046995,000447: 01,3167           12770                           TCF      ENDPRCHG   -1                         
046996,000448: 
046997,000449: 01,3170           50000                           INDEX    A                                     #  OTHERWISE, SET NEWJOB TO THE RELATIVE
046998,000450: 01,3171           27777                           CAF      0          -1                         #  ADDRESS OF THE NEW JOB'S CORE SET.
046999,000451: 01,3172           63136                           AD       -CCSPR                                
047000,000452: 01,3173           54067                           TS       NEWJOB                                
047001,000453: 01,3174           12710                           TCF      CHANJOB    -2                         
047002,000454: 
047003,000455: 01,3175           54132        EJ1                TS       BUF        +2                         
047004,000456: 01,3176           60131                           AD       BUF        +1                         #  - OLD HIGH PRIORITY.
047005,000457: 01,3177           10000                           CCS      A                                     
047006,000458: 01,3200           40132                           CS       BUF        +2                         
047007,000459: 01,3201           13204                           TCF      EJ2                                   #  NEW HIGH PRIORITY.
047008,000460: 01,3202           13203                           NOOP                                           
047009,000461: 01,3203           16744                           TCF      Q+2                                   
047010,000462: 
047011,000463: 01,3204           54131        EJ2                TS       BUF        +1                         
047012,000464: 01,3205           30002                           CA       Q                                     
047013,000465: 01,3206           54130                           TS       BUF                                   
047014,000466: 01,3207           16744                           TCF      Q+2                                   
047015,000467: 

Page 1107

047017,000469:                                                                                                  #           IDLING AND COMPUTER ACTIVITY (GREEN) LIGHT MAINTENANCE. THE IDLING ROUTINE IS NOT A JOB IN ITSELF,
047018,000470:                                                                                                  #  BUT RATHER A SUBROUTINE OF THE EXECUTIVE.
047019,000471: 
047020,000472: 01,3210     1361                                  EBANK=   SELFRET                               #  SELF-CHECK STORAGE IN EBANK.
047021,000473: 
047022,000474: 01,3210           44755        DUMMYJOB           CS       ZERO                                  #  SET NEWJOB TO -0 FOR IDLING.
047023,000475: 01,3211           54067                           TS       NEWJOB                                
047024,000476: 01,3212           00003                           RELINT                                         
047025,000477: 01,3213           44752                           CS       TWO                                   #  TURN OFF THE ACTIVITY LIGHT.
047026,000478: 01,3214           00006                           EXTEND                                         
047027,000479: 01,3215           03011                           WAND     DSALMOUT                              
047028,000480: 01,3216           10067        ADVAN              CCS      NEWJOB                                #  IS A NEWJOB ACTIVE ?
047029,000481: 01,3217           13015                           TCF      NUCHANG2                              #  YES... ONE REQUIRING A CHANGE JOB.
047030,000482: 01,3220           34752                           CAF      TWO                                   #  NEW JOB ALREADY IN POSITION FOR
047031,000483: 01,3221           13230                           TCF      NUDIRECT                              #  EXECUTION.
047032,000484: 
047033,000485: 01,3222           25356                           INCR     DUMLOOPS                              #  COUNT DUMMYJOB LOOPS FOR DOWNLINK
047034,000486: 
047035,000487: 01,3223           31361                           CA       SELFRET                               
047036,000488: 01,3224           54001                           TS       L                                     #  PUT RETURN ADDRESS IN L.
047037,000489: 01,3225           33227                           CAF      SELFBANK                              
047038,000490: 01,3226           15177                           TCF      SUPDXCHZ   +1                         #   AND DISPATCH JOB.
047039,000491: 
047040,000492: 01,3227     1361                                  EBANK=   SELFRET                               
047041,000493: 01,3227           66102        SELFBANK           BBCON    SELFCHK                               
047042,000494: 
047043,000495: 01,3230           00006        NUDIRECT           EXTEND                                         #  TURN THE GREEN LIGHT BACK ON.
047044,000496: 01,3231           05011                           WOR      DSALMOUT                              
047045,000497: 01,3232           52165                           DXCH     LOC                                   #  JOBS STARTED IN THIS FASHION MUST BE
047046,000498: 01,3233           15176                           TCF      SUPDXCHZ                              
047047,000499: 
047048,000500:    5176                                           BLOCK    2                                     #  IN FIXED-FIXED SO OTHERS MAY USE.
047049,000501: 
047050,000502:    5176                                           COUNT*   $$/EXEC                               
047051,000503:                                                                                                  #  SUPDXCHZ - ROUTINE TO TRANSFER TO SUPERBANK.
047052,000504:                                                                                                  #  CALLING SEQUENCE
047053,000505:                                                                                                  #                                                 TCF     SUPDXCHZ         WITH 2CADR OF DESIRED LOCATION IN A + L.
047054,000506: 
047055,000507:    5176           56001        SUPDXCHZ           XCH      L                                     #  BASIC.
047056,000508:    5177           00006                 +1        EXTEND                                         
047057,000509:    5200           01007                           WRITE    SUPERBNK                              
047058,000510:    5201           54006                           TS       BBANK                                 
047059,000511:    5202           00001                           TC       L                                     
047060,000512: 
047061,000513:    5203           77677        NEG100             OCT      77677                                 

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