Source Code

These source-code files derive from a printout of Luminary 210 (Apollo 15-17 Lunar Module guidance computer program), from the personal library of original AGC developer Don Eyles, digitally photographed at archive.org, financially sponsored by Jim Lawton, and transcribed to source code by a team of volunteers. This colorized, syntax-highlighted form was created by assembling that transcribed source code. Note that the full page images are available on the Virtual AGC project page at archive.org, while reduced-size images are presented at the VirtualAGC project website. Report or fix any transcription errors at the Virtual AGC project code repository.

Notations on the program listing read, in part:

	GAP: ASSEMBLE REVISION 210 OF AGC PROGRAM LUMINARY 
	BY NASA 2021112-161 17:11 MAR. 19,1971
Note that the date is the date of the printout, not the date of the program revision.

047464,000002:                                                                                                  ## Copyright:   Public domain.
047465,000003:                                                                                                  ## Filename:    EXECUTIVE.agc
047466,000004:                                                                                                  ## Purpose:     A section of Luminary revision 210.
047467,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
047468,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 15-17.
047469,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
047470,000008:                                                                                                  ##              that the code format has been changed to conform to the
047471,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
047472,000010:                                                                                                  ##              original YUL assembler.
047473,000011:                                                                                                  ## Reference:   pp. 1101-1114
047474,000012:                                                                                                  ## Assembler:   yaYUL
047475,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
047476,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
047477,000015:                                                                                                  ## Mod history: 2016-11-17 JL   Created from Luminary131 version.
047478,000016:                                                                                                  ##              2016-11-18 MAS  Transcribed.
047479,000017:                                                                                                  ##              2016-12-26 RSB  Comment-text proofed using ProoferComments
047480,000018:                                                                                                  ##                              and corrected errors found.
047481,000019:                                                                                                  ##              2017-03-15 RSB  Comment-text fixes identified in 5-way
047482,000020:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
047483,000021: 

Page 1101

047485,000023:    5063                                           BLOCK    02                                    
047486,000024:                                                                                                  #           TO ENTER A JOB REQUEST REQUIRING NO VAC AREA:
047487,000025: 
047488,000026:    5063                                           COUNT*   $$/EXEC                               
047489,000027:    5063           00004        NOVAC              INHINT                                         
047490,000028:    5064           65155                           AD       FAKEPRET                              #  LOC(MPAC +6) - LOC(QPRET)
047491,000029:    5065           54063                           TS       NEWPRIO                               #  PRIORITY OF NEW JOB + NOVAC C(FIXLOC)
047492,000030: 
047493,000031:    5066           00006                           EXTEND                                         
047494,000032:    5067           50002                           INDEX    Q                                     #  Q WILL BE UNDISTURBED THROUGHOUT.
047495,000033:    5070           30001                           DCA      0                                     #  2CADR OF JOB ENTERED.
047496,000034:    5071           52066                           DXCH     NEWLOC                                
047497,000035:    5072           35154                           CAF      EXECBANK                              
047498,000036:    5073           56004                           XCH      FBANK                                 
047499,000037:    5074           54061                           TS       EXECTEM1                              
047500,000038:    5075           12631                           TCF      NOVAC2                                #  ENTER EXECUTIVE BANK.
047501,000039: 
047502,000040:                                                                                                  #           TO ENTER A JOB REQUEST REQUIRING A VAC AREA - E.G., ALL (PARTIALLY) INTERPRETIVE JOBS.
047503,000041: 
047504,000042:    5076           00004        FINDVAC            INHINT                                         
047505,000043:    5077           54063                           TS       NEWPRIO                               
047506,000044:    5100           00006                           EXTEND                                         
047507,000045:    5101           50002                           INDEX    Q                                     
047508,000046:    5102           30001                           DCA      0                                     
047509,000047:    5103           52066        SPVACIN            DXCH     NEWLOC                                
047510,000048:    5104           35154                           CAF      EXECBANK                              
047511,000049:    5105           56004                           XCH      FBANK                                 
047512,000050:    5106           12605                           TCF      FINDVAC2                              #  OFF TO EXECUTIVE SWITCHED-BANK.
047513,000051: 
047514,000052:                                                                                                  #           TO ENTER A FINDVAC WITH THE PRIORITY IN NEWPRIO TO THE 2CADR ARRIVING IN A AND L:
047515,000053: 
047516,000054:                                                                                                  #           USERS OF SPVAC MUST INHINT BEFORE STORING IN NEWPRIO.
047517,000055: 
047518,000056:    5107           56002        SPVAC              XCH      Q                                     
047519,000057:    5110           67767                           AD       NEG2                                  
047520,000058:    5111           56002                           XCH      Q                                     
047521,000059:    5112           15103                           TCF      SPVACIN                               
047522,000060: 
047523,000061:                                                                                                  #           TO SUSPEND A BASIC JOB SO A HIGHER PRIORITY JOB MAY BE SERVICED:
047524,000062: 
047525,000063:    5113           22002        CHANG1             LXCH     Q                                     
047526,000064:    5114           35154                           CAF      EXECBANK                              
047527,000065:    5115           56006                           XCH      BBANK                                 
047528,000066:    5116           12712                           TCF      CHANJOB                               
047529,000067: 
047530,000068:                                                                                                  #           TO SUSPEND AN INTERPRETIVE JOB:
047531,000069: 
047532,000070:    5117           40164        CHANG2             CS       LOC                                   #  NEGATIVE LOC SHOWS JOB = INTERPRETIVE.
047533,000071:                                                                                                  #           ITRACE (4) REFERS TO "CHANG2".
047534,000072:    5120           54001                           TS       L                                     

Page 1102

047536,000074:    5121           35154                 +2        CAF      EXECBANK                              
047537,000075:    5122           54006                           TS       BBANK                                 
047538,000076:    5123           12711                           TCF      CHANJOB    -1                         
047539,000077: 

Page 1103

047541,000079:                                                                                                  #           TO VOLUNTARILY SUSPEND A JOB UNTIL THE COMPLETION OF SOME ANTICIPATED EVENT (I/O EVENT ETC.):
047542,000080: 
047543,000081:    5124           54164        JOBSLEEP           TS       LOC                                   
047544,000082:    5125           35154                           CAF      EXECBANK                              
047545,000083:    5126           54004                           TS       FBANK                                 
047546,000084:    5127           13002                           TCF      JOBSLP1                               
047547,000085: 
047548,000086:                                                                                                  #           TO AWAKEN A JOB PUT TO SLEEP IN THE ABOVE FASHION:
047549,000087: 
047550,000088:    5130           00004        JOBWAKE            INHINT                                         
047551,000089:    5131           54065                           TS       NEWLOC                                
047552,000090:    5132           44743                           CS       TWO                                   #  EXIT IS VIA FINDVAC/NOVAC PROCEDURES.
047553,000091:    5133           26002                           ADS      Q                                     
047554,000092:    5134           35154                           CAF      EXECBANK                              
047555,000093:    5135           56004                           XCH      FBANK                                 
047556,000094:    5136           13027                           TCF      JOBWAKE2                              
047557,000095: 
047558,000096:                                                                                                  #           TO CHANGE THE PRIORITY OF A JOB CURRENTLY UNDER EXECUTION:
047559,000097: 
047560,000098:    5137           00004        PRIOCHNG           INHINT                                         #  NEW PRIORITY ARRIVES IN A. RETURNS TO
047561,000099:    5140           54063                           TS       NEWPRIO                               #  CALLER AS SOON AS NEW JOB PRIORITY IS
047562,000100:    5141           35154                           CAF      EXECBANK                              #  HIGHEST. PREPARE FOR POSSIBLE BASIC-
047563,000101:    5142           56006                           XCH      BBANK                                 #  STYLE CHANGE-JOB.
047564,000102:    5143           54165                           TS       BANKSET                               
047565,000103:    5144           30002                           CA       Q                                     
047566,000104:    5145           13076                           TCF      PRIOCH2                               
047567,000105: 
047568,000106:                                                                                                  #           TO REMOVE A JOB FROM EXECUTIVE CONSIDERATIONS:
047569,000107: 
047570,000108:    5146           35154        ENDOFJOB           CAF      EXECBANK                              
047571,000109:    5147           54004                           TS       FBANK                                 
047572,000110:    5150           13107                           TCF      ENDJOB1                               
047573,000111: 
047574,000112:    5151           30061        ENDFIND            CA       EXECTEM1                              #  RETURN TO CALLER AFTER JOB ENTRY
047575,000113:    5152           54004                           TS       FBANK                                 #  COMPLETE.
047576,000114:    5153           16762                           TCF      Q+2                                   
047577,000115:    5154           02605        EXECBANK           CADR     FINDVAC2                              
047578,000116: 
047579,000117:    5155           00110        FAKEPRET           ADRES    MPAC       -36D                       #  LOC(MPAC +6) - LOC(QPRET)
047580,000118: 
047581,000119:                                                                                                  #           TO CHANGE A "FINDVAC" JOB TO A "NOVAC" -- RELEASE ITS VAC AREA:
047582,000120:    5156           30167        VACRLEAS           CA       PRIORITY                              #  CHANGE TO NOVAC VALUE
047583,000121:    5157           77746                           MASK     PRIO37                                
047584,000122:    5160           65155                           AD       FAKEPRET                              
047585,000123:    5161           56167                           XCH      PRIORITY                              
047586,000124:    5162           74775                           MASK     LOW9                                  
047587,000125:    5163           10000                           CCS      A                                     
047588,000126:    5164           50000                           INDEX    A                                     
047589,000127:    5165           54000                           TS       0                                     #  RELEASE VAC AREA
047590,000128:    5166           00002                           TC       Q                                     
047591,000129: 

Page 1104

047593,000131:                                                                                                  #           LOCATE AN AVAILABLE VAC AREA.
047594,000132: 
047595,000133: 01,2605                                           BANK     01                                    
047596,000134: 01,2605                                           COUNT*   $$/EXEC                               
047597,000135: 01,2605           54061        FINDVAC2           TS       EXECTEM1                              #  (SAVE CALLER'S BANK FIRST.)
047598,000136: 01,2606           10400                           CCS      VAC1USE                               
047599,000137: 01,2607           12624                           TCF      VACFOUND                              
047600,000138: 01,2610           10454                           CCS      VAC2USE                               
047601,000139: 01,2611           12624                           TCF      VACFOUND                              
047602,000140: 01,2612           10530                           CCS      VAC3USE                               
047603,000141: 01,2613           12624                           TCF      VACFOUND                              
047604,000142: 01,2614           10604                           CCS      VAC4USE                               
047605,000143: 01,2615           12624                           TCF      VACFOUND                              
047606,000144: 01,2616           10660                           CCS      VAC5USE                               
047607,000145: 01,2617           12624                           TCF      VACFOUND                              
047608,000146: 01,2620           22061                           LXCH     EXECTEM1                              
047609,000147: 01,2621           30002                           CA       Q                                     
047610,000148: 01,2622           05712                           TC       BAILOUT1                              
047611,000149: 01,2623           31201                           OCT      31201                                 #  NO VAC AREAS
047612,000150: 
047613,000151: 01,2624           64743        VACFOUND           AD       TWO                                   #  RESERVE THIS VAC AREA BY STORING A ZERO
047614,000152: 01,2625           22007                           ZL                                             #  IN ITS VAC USE REGISTER AND STORE THE
047615,000153: 01,2626           50000                           INDEX    A                                     #  ADDRESS OF THE FIRST WORD OF IT IN THE
047616,000154: 01,2627           21777                           LXCH     0          -1                         #  LOW NINE BITS OF THE PRIORITY WORD.
047617,000155: 01,2630           26063                           ADS      NEWPRIO                               
047618,000156: 
047619,000157: 01,2631           34746        NOVAC2             CAF      ZERO                                  #  NOVAC ENTERS HERE. FIND A CORE SET.
047620,000158: 01,2632           54064                           TS       LOCCTR                                
047621,000159: 01,2633           32640                           CAF      NO.CORES                              #  SEVEN SETS OF ELEVEN REGISTERS EACH.
047622,000160: 01,2634           54062        NOVAC3             TS       EXECTEM2                              
047623,000161: 01,2635           50064                           INDEX    LOCCTR                                
047624,000162: 01,2636           10167                           CCS      PRIORITY                              #  EACH PRIORITY REGISTER CONTAINS -0 IF
047625,000163: 01,2637           12700                           TCF      NEXTCORE                              #  THE CORRESPONDING CORE SET IS AVAILABLE.
047626,000164: 01,2640           00007        NO.CORES           DEC      7          B-14                       
047627,000165: 01,2641           12700                           TCF      NEXTCORE                              #  AN ACTIVE JOB HAS A POSITIVE PRIORITY
047628,000166:                                                                                                  #  BUT A DORMANT JOB'S PRIORITY IS NEGATIVE
047629,000167: 

Page 1105

047631,000169: 01,2642           30063        CORFOUND           CA       NEWPRIO                               #  SET THE PRIORITY OF THIS JOB IN THE CORE
047632,000170: 01,2643           50064                           INDEX    LOCCTR                                #  SET'S PRIORITY REGISTER AND SET THE
047633,000171: 01,2644           54167                           TS       PRIORITY                              #  JOB'S PUSH-DOWN POINTER AT THE BEGINNING
047634,000172: 01,2645           74775                           MASK     LOW9                                  #  OF THE WORK AREA AND OVERFLOW INDICATOR
047635,000173: 01,2646           50064                           INDEX    LOCCTR                                
047636,000174: 01,2647           54166                           TS       PUSHLOC                               #  OFF TO PREPARE FOR INTERPRETIVE PROGRAMS
047637,000175: 
047638,000176: 01,2650           10064                           CCS      LOCCTR                                #  IF CORE SET ZERO IS BEING LOADED, SET UP
047639,000177: 01,2651           12665                           TCF      SETLOC                                #  OVFIND AND FIXLOC IMMEDIATELY .
047640,000178: 01,2652           54121                           TS       OVFIND                                
047641,000179: 01,2653           30166                           CA       PUSHLOC                               
047642,000180: 01,2654           54120                           TS       FIXLOC                                
047643,000181: 
047644,000182: 01,2655           10067        SPECTEST           CCS      NEWJOB                                #  SEE IF ANY ACTIVE JOBS WAITING (RARE).
047645,000183: 01,2656           12665                           TCF      SETLOC                                #  MUST BE AWAKENED BUT UNCHANGED JOB.
047646,000184: 01,2657           05701                           TC       CCSHOLE                               
047647,000185: 01,2660           05701                           TC       CCSHOLE                               
047648,000186: 01,2661           54067                           TS       NEWJOB                                #  +0 SHOWS ACTIVE JOB ALREADY SET.
047649,000187: 01,2662           52066                           DXCH     NEWLOC                                
047650,000188: 01,2663           52165                           DXCH     LOC                                   
047651,000189: 01,2664           15151                           TCF      ENDFIND                               
047652,000190: 
047653,000191: 01,2665           52066        SETLOC             DXCH     NEWLOC                                #  SET UP THE LOCATION REGISTERS FOR THIS
047654,000192: 01,2666           50064                           INDEX    LOCCTR                                
047655,000193: 01,2667           52165                           DXCH     LOC                                   
047656,000194: 01,2670           50067                           INDEX    NEWJOB                                #  THIS INDEX INSTRUCTION INSURES THAT THE
047657,000195: 01,2671           40167                           CS       PRIORITY                              #  HIGHEST ACTIVE PRIORITY WILL BE COMPARED
047658,000196: 01,2672           60063                           AD       NEWPRIO                               #  WITH THE NEW PRIORITY TO SEE IF NEWJOB
047659,000197: 01,2673           00006                           EXTEND                                         #  SHOULD BE SET TO SIGNAL A SWITCH.
047660,000198: 01,2674           65151                           BZMF     ENDFIND                               
047661,000199: 01,2675           30064                           CA       LOCCTR                                #  LOCCTR IS LEFT SET AT THIS CORE SET IF
047662,000200: 01,2676           54067                           TS       NEWJOB                                #  THE CALLER WANTS TO LOAD ANY MPAC
047663,000201: 01,2677           15151                           TCF      ENDFIND                               #  REGISTERS, ETC.
047664,000202: 
047665,000203: 01,2700           33037        NEXTCORE           CAF      COREINC                               
047666,000204: 01,2701           26064                           ADS      LOCCTR                                
047667,000205: 01,2702           10062                           CCS      EXECTEM2                              
047668,000206: 01,2703           12634                           TCF      NOVAC3                                
047669,000207: 01,2704           22061                           LXCH     EXECTEM1                              
047670,000208: 01,2705           30002                           CA       Q                                     
047671,000209: 01,2706           05712                           TC       BAILOUT1                              #  NO CORE SETS AVAILABLE.
047672,000210: 01,2707           31202                           OCT      31202                                 

Page 1106

047674,000212:                                                                                                  #           THE FOLLOWING ROUTINE SWAPS CORE SET 0 WITH THAT WHOSE RELATIVE ADDRESS IS IN NEWJOB.
047675,000213: 
047676,000214: 01,2710           22164                 -2        LXCH     LOC                                   
047677,000215: 01,2711           30165                 -1        CAE      BANKSET                               #  BANKSET, NOT BBANK, HAS RIGHT CONTENTS.
047678,000216: 01,2712           00004        CHANJOB            INHINT                                         
047679,000217: 01,2713           00006                           EXTEND                                         
047680,000218: 01,2714           04007                           ROR      SUPERBNK                              #  PICK UP CURRENT SBANK FOR BBCON
047681,000219: 01,2715           56001                           XCH      L                                     #  LOC IN A AND BBCON IN L.
047682,000220: 01,2716           50067                 +4        INDEX    NEWJOB                                #  SWAP LOC AND BANKSET.
047683,000221: 01,2717           52165                           DXCH     LOC                                   
047684,000222: 01,2720           52165                           DXCH     LOC                                   
047685,000223: 
047686,000224: 01,2721           30165                           CAE      BANKSET                               
047687,000225: 01,2722           00006                           EXTEND                                         
047688,000226: 01,2723           01007                           WRITE    SUPERBNK                              #  SET SBANK FOR NEW JOB.
047689,000227: 01,2724           52155                           DXCH     MPAC                                  #  SWAP MULTI-PURPOSE ACCUMULATOR AREAS.
047690,000228: 01,2725           50067                           INDEX    NEWJOB                                
047691,000229: 01,2726           52155                           DXCH     MPAC                                  
047692,000230: 01,2727           52155                           DXCH     MPAC                                  
047693,000231: 01,2730           52157                           DXCH     MPAC       +2                         
047694,000232: 01,2731           50067                           INDEX    NEWJOB                                
047695,000233: 01,2732           52157                           DXCH     MPAC       +2                         
047696,000234: 01,2733           52157                           DXCH     MPAC       +2                         
047697,000235: 01,2734           52161                           DXCH     MPAC       +4                         
047698,000236: 01,2735           50067                           INDEX    NEWJOB                                
047699,000237: 01,2736           52161                           DXCH     MPAC       +4                         
047700,000238: 01,2737           52161                           DXCH     MPAC       +4                         
047701,000239: 01,2740           52163                           DXCH     MPAC       +6                         
047702,000240: 01,2741           50067                           INDEX    NEWJOB                                
047703,000241: 01,2742           52163                           DXCH     MPAC       +6                         
047704,000242: 01,2743           52163                           DXCH     MPAC       +6                         
047705,000243: 
047706,000244: 01,2744           34746                           CAF      ZERO                                  
047707,000245: 01,2745           56121                           XCH      OVFIND                                #  MAKE PUSHLOC NEGATIVE IF OVFIND NZ.
047708,000246: 01,2746           00006                           EXTEND                                         
047709,000247: 01,2747           12752                           BZF      +3                                    
047710,000248: 01,2750           40166                           CS       PUSHLOC                               
047711,000249: 01,2751           54166                           TS       PUSHLOC                               
047712,000250: 
047713,000251: 01,2752           52167                           DXCH     PUSHLOC                               
047714,000252: 01,2753           50067                           INDEX    NEWJOB                                
047715,000253: 01,2754           52167                           DXCH     PUSHLOC                               
047716,000254: 01,2755           52167                           DXCH     PUSHLOC                               #  SWAPS PUSHLOC AND PRIORITY.
047717,000255: 01,2756           34775                           CAF      LOW9                                  #  SET FIXLOC TO BASE OF VAC AREA.
047718,000256: 01,2757           70167                           MASK     PRIORITY                              
047719,000257: 01,2760           54120                           TS       FIXLOC                                
047720,000258: 
047721,000259: 01,2761           10166                           CCS      PUSHLOC                               #  SET OVERFLOW INDICATOR ACCORDING TO
047722,000260: 01,2762           34746                           CAF      ZERO                                  
047723,000261: 01,2763           12770                           TCF      ENDPRCHG   -1                         
047724,000262: 

Page 1107

047726,000264: 01,2764           40166                           CS       PUSHLOC                               
047727,000265: 01,2765           54166                           TS       PUSHLOC                               
047728,000266: 01,2766           34744                           CAF      ONE                                   
047729,000267: 01,2767           56121                           XCH      OVFIND                                
047730,000268: 01,2770           54067                           TS       NEWJOB                                
047731,000269: 
047732,000270: 01,2771           00003        ENDPRCHG           RELINT                                         
047733,000271: 01,2772           52165                           DXCH     LOC                                   #  BASIC JOBS HAVE POSITIVE ADDRESSES, SO
047734,000272: 01,2773           00006                           EXTEND                                         #  DISPATCH WITH A DTCB.
047735,000273: 01,2774           62776                           BZMF     +2                                    #  IF INTERPRETIVE, SET UP EBANK, ETC.
047736,000274: 01,2775           52006                           DTCB                                           
047737,000275: 

Page 1108

047739,000277: 01,2776           40000                           COM                                            #  EPILOGUE TO JOB CHANGE FOR INTERPRETIVE
047740,000278: 01,2777           64744                           AD       ONE                                   
047741,000279: 01,3000           54164                           TS       LOC                                   #  RESUME.
047742,000280: 01,3001           16071                           TCF      INTRSM                                
047743,000281: 
047744,000282:                                                                                                  #           COMPLETE JOBSLEEP PREPARATIONS.
047745,000283: 
047746,000284: 01,3002           00004        JOBSLP1            INHINT                                         
047747,000285: 01,3003           40167                           CS       PRIORITY                              #  NNZ PRIORITY SHOWS JOB ASLEEP.
047748,000286: 01,3004           54167                           TS       PRIORITY                              
047749,000287: 01,3005           36115                           CAF      LOW7                                  
047750,000288: 01,3006           70006                           MASK     BBANK                                 
047751,000289: 01,3007           00006                           EXTEND                                         
047752,000290: 01,3010           04007                           ROR      SUPERBNK                              #  SAVE OLD SUPERBANK VALUE.
047753,000291: 01,3011           54165                           TS       BANKSET                               
047754,000292: 01,3012           44746                           CS       ZERO                                  
047755,000293: 01,3013           54131        JOBSLP2            TS       BUF        +1                         #  HOLDS - HIGHEST PRIORITY.
047756,000294: 01,3014           13124                           TCF      EJSCAN                                #  SCAN FOR HIGHEST PRIORITY ALA ENDOFJOB.
047757,000295: 
047758,000296: 01,3015           00004        NUCHANG2           INHINT                                         #  QUICK... DONT LET NEWJOB CHANGE TO +0 .
047759,000297: 01,3016           10067                           CCS      NEWJOB                                
047760,000298: 01,3017           13022                           TCF      +3                                    #  NEWJOB STILL PNZ
047761,000299: 01,3020           00003                           RELINT                                         #  NEWJOB HAS CHANGED TO +0. WAKE UP JOB
047762,000300: 01,3021           13220                           TCF      ADVAN      +2                         #  VIA NUDIRECT. (VERY RARE CASE.)
047763,000301: 
047764,000302: 01,3022           34743                           CAF      TWO                                   
047765,000303: 01,3023           00006                           EXTEND                                         
047766,000304: 01,3024           05011                           WOR      DSALMOUT                              #  TURN ON ACTIVITY LIGHT
047767,000305: 01,3025           52165                           DXCH     LOC                                   #  AND SAVE ADDRESS INFO FOR BENEFIT OF
047768,000306: 01,3026           12716                           TCF      CHANJOB    +4                         #   POSSIBLE SLEEPING JOB.
047769,000307: 

Page 1109

047771,000309:                                                                                                  #           TO WAKE UP A JOB, EACH CORE SET IS FOUND TO LOCATE ALL JOBS WHICH ARE ASLEEP. IF THE FCADR IN THE
047772,000310:                                                                                                  #  LOC REGISTER OF ANY SUCH JOB MATCHES THAT SUPPLIED BY THE CALLER, THAT JOB IS AWAKENED. IF NO JOB IS FOUND,
047773,000311:                                                                                                  #  LOCCTR IS SET TO -1 AND NO FURTHER ACTION TAKES PLACE.
047774,000312: 
047775,000313: 01,3027           54061        JOBWAKE2           TS       EXECTEM1                              
047776,000314: 01,3030           34746                           CAF      ZERO                                  #  BEGIN CORE SET SCAN.
047777,000315: 01,3031           54064                           TS       LOCCTR                                
047778,000316: 01,3032           32640                           CAF      NO.CORES                              
047779,000317: 01,3033           54062        JOBWAKE4           TS       EXECTEM2                              
047780,000318: 01,3034           50064                           INDEX    LOCCTR                                
047781,000319: 01,3035           10167                           CCS      PRIORITY                              
047782,000320: 01,3036           13041                           TCF      JOBWAKE3                              #  ACTIVE JOB - CHECK NEXT CORE SET.
047783,000321: 01,3037           00014        COREINC            DEC      12         B-14                       #  12 REGISTERS PER CORE SET.
047784,000322: 01,3040           13050                           TCF      WAKETEST                              #  SLEEPING JOB - SEE IF CADR MATCHES.
047785,000323: 
047786,000324: 01,3041           33037        JOBWAKE3           CAF      COREINC                               
047787,000325: 01,3042           26064                           ADS      LOCCTR                                
047788,000326: 01,3043           10062                           CCS      EXECTEM2                              
047789,000327: 01,3044           13033                           TCF      JOBWAKE4                              
047790,000328: 01,3045           44744                           CS       ONE                                   #  EXIT IF SLEEPING JOB NOT FOUND.
047791,000329: 01,3046           54064                           TS       LOCCTR                                
047792,000330: 01,3047           15151                           TCF      ENDFIND                               
047793,000331: 
047794,000332: 01,3050           40065        WAKETEST           CS       NEWLOC                                
047795,000333: 01,3051           50064                           INDEX    LOCCTR                                
047796,000334: 01,3052           60164                           AD       LOC                                   
047797,000335: 01,3053           00006                           EXTEND                                         
047798,000336: 01,3054           13056                           BZF      +2                                    #  IF MATCH.
047799,000337: 01,3055           13041                           TCF      JOBWAKE3                              #  EXAMINE NEXT CORE SET IF NO MATCH.
047800,000338: 
047801,000339: 01,3056           50064                           INDEX    LOCCTR                                #  RE-COMPLEMENT PRIORITY TO SHOW JOB AWAKE
047802,000340: 01,3057           40167                           CS       PRIORITY                              
047803,000341: 01,3060           54063                           TS       NEWPRIO                               
047804,000342: 01,3061           50064                           INDEX    LOCCTR                                
047805,000343: 01,3062           54167                           TS       PRIORITY                              
047806,000344: 
047807,000345: 01,3063           44341                           CS       FBANKMSK                              #  MAKE UP THE 2CADR OF THE WAKE ADDRESS
047808,000346: 01,3064           70065                           MASK     NEWLOC                                #  USING THE CADR IN NEWLOC AND THE EBANK
047809,000347: 01,3065           64732                           AD       2K                                    #  HALF OF BBANK SAVED IN BANKSET.
047810,000348: 01,3066           56065                           XCH      NEWLOC                                
047811,000349: 01,3067           74341                           MASK     FBANKMSK                              
047812,000350: 01,3070           50064                           INDEX    LOCCTR                                
047813,000351: 01,3071           60165                           AD       BANKSET                               
047814,000352: 01,3072           54066                           TS       NEWLOC     +1                         
047815,000353: 
047816,000354: 01,3073           10064                           CCS      LOCCTR                                #  SPECIAL TREATMENT IF THIS JOB WAS
047817,000355: 01,3074           12665                           TCF      SETLOC                                #  ALREADY IN THE RUN (0) POSITION.
047818,000356: 01,3075           12655                           TCF      SPECTEST                              
047819,000357: 

Page 1110

047821,000359:                                                                                                  #           PRIORITY CHANGE. CHANGE THE CONTENTS OF PRIORITY AND SCAN FOR THE JOB OF HIGHEST PRIORITY.
047822,000360: 
047823,000361: 01,3076           54164        PRIOCH2            TS       LOC                                   
047824,000362: 01,3077           34746                           CAF      ZERO                                  #  SET FLAG TO TELL ENDJOB SCANNER IF THIS
047825,000363: 01,3100           54130                           TS       BUF                                   #  JOB IS STILL HIGHEST PRIORITY.
047826,000364: 01,3101           34775                           CAF      LOW9                                  
047827,000365: 01,3102           70167                           MASK     PRIORITY                              
047828,000366: 01,3103           60063                           AD       NEWPRIO                               
047829,000367: 01,3104           54167                           TS       PRIORITY                              
047830,000368: 01,3105           40000                           COM                                            
047831,000369: 01,3106           13013                           TCF      JOBSLP2                               #  AND TO EJSCAN.
047832,000370: 

Page 1111

047834,000372:                                                                                                  #           RELEASE THIS CORE SET AND VAC AREA AND SCAN FOR THE JOB OF HIGHEST ACTIVE PRIORITY.
047835,000373: 
047836,000374: 01,3107           00004        ENDJOB1            INHINT                                         
047837,000375: 01,3110           44746                           CS       ZERO                                  
047838,000376: 01,3111           54131                           TS       BUF        +1                         
047839,000377: 01,3112           56167                           XCH      PRIORITY                              
047840,000378: 01,3113           74775                           MASK     LOW9                                  
047841,000379: 01,3114           54001                           TS       L                                     
047842,000380: 
047843,000381: 01,3115           45155                           CS       FAKEPRET                              
047844,000382: 01,3116           60001                           AD       L                                     
047845,000383: 
047846,000384: 01,3117           00006                           EXTEND                                         
047847,000385: 01,3120           63124                           BZMF     EJSCAN                                #  NOVAC ENDOFJOB
047848,000386: 
047849,000387: 01,3121           10001                           CCS      L                                     
047850,000388: 01,3122           50000                           INDEX    A                                     
047851,000389: 01,3123           54000                           TS       0                                     
047852,000390: 
047853,000391: 01,3124           10203        EJSCAN             CCS      PRIORITY   +12D                       
047854,000392: 01,3125           03175                           TC       EJ1                                   
047855,000393: 01,3126           05701                           TC       CCSHOLE                               
047856,000394: 01,3127           13130                           TCF      +1                                    
047857,000395: 
047858,000396: 01,3130           10217                           CCS      PRIORITY   +24D                       #  EXAMINE EACH PRIORITY REGISTER TO FIND
047859,000397: 01,3131           03175                           TC       EJ1                                   #  THE JOB OF HIGHEST ACTIVE PRIORITY.
047860,000398: 01,3132           05701                           TC       CCSHOLE                               
047861,000399: 01,3133           13134                           TCF      +1                                    
047862,000400: 
047863,000401: 01,3134           10233                           CCS      PRIORITY   +36D                       
047864,000402: 01,3135           03175                           TC       EJ1                                   
047865,000403: 01,3136           67610        -CCSPR             -CCS     PRIORITY                              
047866,000404: 01,3137           13140                           TCF      +1                                    
047867,000405: 
047868,000406: 01,3140           10247                           CCS      PRIORITY   +48D                       
047869,000407: 01,3141           03175                           TC       EJ1                                   
047870,000408: 01,3142           05701                           TC       CCSHOLE                               
047871,000409: 01,3143           13144                           TCF      +1                                    
047872,000410: 
047873,000411: 01,3144           10263                           CCS      PRIORITY   +60D                       
047874,000412: 01,3145           03175                           TC       EJ1                                   
047875,000413: 01,3146           05701                           TC       CCSHOLE                               
047876,000414: 01,3147           13150                           TCF      +1                                    
047877,000415: 
047878,000416: 01,3150           10277                           CCS      PRIORITY   +72D                       
047879,000417: 01,3151           03175                           TC       EJ1                                   
047880,000418: 01,3152           05701                           TC       CCSHOLE                               
047881,000419: 01,3153           13154                           TCF      +1                                    
047882,000420: 
047883,000421: 01,3154           10313                           CCS      PRIORITY   +84D                       

Page 1112

047885,000423: 01,3155           03175                           TC       EJ1                                   
047886,000424: 01,3156           05701                           TC       CCSHOLE                               
047887,000425: 01,3157           13160                           TCF      +1                                    
047888,000426: 

Page 1113

047890,000428:                                                                                                  #           EVALUATE THE RESULTS OF THE SCAN.
047891,000429: 
047892,000430: 01,3160           10131                           CCS      BUF        +1                         #  SEE IF THERE ARE ANY ACTIVE JOBS WAITING
047893,000431: 01,3161           05701                           TC       CCSHOLE                               
047894,000432: 01,3162           05701                           TC       CCSHOLE                               
047895,000433: 
047896,000434: 01,3163           13165                           TCF      +2                                    
047897,000435: 01,3164           13210                           TCF      DUMMYJOB                              
047898,000436: 01,3165           10130                           CCS      BUF                                   #  BUF IS ZERO IF THIS IS A PRIOCHNG AND
047899,000437: 01,3166           13170                           TCF      +2                                    #  CHANGED PRIORITY IS STILL HIGHEST.
047900,000438: 01,3167           12770                           TCF      ENDPRCHG   -1                         
047901,000439: 
047902,000440: 01,3170           50000                           INDEX    A                                     #  OTHERWISE, SET NEWJOB TO THE RELATIVE
047903,000441: 01,3171           27777                           CAF      0          -1                         #  ADDRESS OF THE NEW JOB'S CORE SET.
047904,000442: 01,3172           63136                           AD       -CCSPR                                
047905,000443: 01,3173           54067                           TS       NEWJOB                                
047906,000444: 01,3174           12710                           TCF      CHANJOB    -2                         
047907,000445: 
047908,000446: 01,3175           54132        EJ1                TS       BUF        +2                         
047909,000447: 01,3176           60131                           AD       BUF        +1                         #  - OLD HIGH PRIORITY.
047910,000448: 01,3177           10000                           CCS      A                                     
047911,000449: 01,3200           40132                           CS       BUF        +2                         
047912,000450: 01,3201           13204                           TCF      EJ2                                   #  NEW HIGH PRIORITY.
047913,000451: 01,3202           13203                           NOOP                                           
047914,000452: 01,3203           16762                           TCF      Q+2                                   
047915,000453: 
047916,000454: 01,3204           54131        EJ2                TS       BUF        +1                         
047917,000455: 01,3205           30002                           CA       Q                                     
047918,000456: 01,3206           54130                           TS       BUF                                   
047919,000457: 01,3207           16762                           TCF      Q+2                                   
047920,000458: 

Page 1114

047922,000460:                                                                                                  #           IDLING AND COMPUTER ACTIVITY (GREEN) LIGHT MAINTENANCE. THE IDLING ROUTINE IS NOT A JOB IN ITSELF,
047923,000461:                                                                                                  #  BUT RATHER A SUBROUTINE OF THE EXECUTIVE.
047924,000462: 
047925,000463: 01,3210     1361                                  EBANK=   SELFRET                               #  SELF-CHECK STORAGE IN EBANK.
047926,000464: 
047927,000465: 01,3210           44746        DUMMYJOB           CS       ZERO                                  #  SET NEWJOB TO -0 FOR IDLING.
047928,000466: 01,3211           54067                           TS       NEWJOB                                
047929,000467: 01,3212           00003                           RELINT                                         
047930,000468: 01,3213           44743                           CS       TWO                                   #  TURN OFF THE ACTIVITY LIGHT.
047931,000469: 01,3214           00006                           EXTEND                                         
047932,000470: 01,3215           03011                           WAND     DSALMOUT                              
047933,000471: 01,3216           10067        ADVAN              CCS      NEWJOB                                #  IS A NEWJOB ACTIVE ?
047934,000472: 01,3217           13015                           TCF      NUCHANG2                              #  YES... ONE REQUIRING A CHANGE JOB.
047935,000473: 01,3220           34743                           CAF      TWO                                   #  NEW JOB ALREADY IN POSITION FOR
047936,000474: 01,3221           13230                           TCF      NUDIRECT                              #  EXECUTION.
047937,000475: 
047938,000476: 01,3222           25356                           INCR     DUMLOOPS                              #  COUNT DUMMYJOB LOOPS FOR DOWNLINK
047939,000477: 
047940,000478: 01,3223           31361                           CA       SELFRET                               
047941,000479: 01,3224           54001                           TS       L                                     #  PUT RETURN ADDRESS IN L.
047942,000480: 01,3225           33227                           CAF      SELFBANK                              
047943,000481: 01,3226           15170                           TCF      SUPDXCHZ   +1                         #   AND DISPATCH JOB.
047944,000482: 
047945,000483: 01,3227     1361                                  EBANK=   SELFRET                               
047946,000484: 01,3227           66102        SELFBANK           BBCON    SELFCHK                               
047947,000485: 
047948,000486: 01,3230           00006        NUDIRECT           EXTEND                                         #  TURN THE GREEN LIGHT BACK ON.
047949,000487: 01,3231           05011                           WOR      DSALMOUT                              
047950,000488: 01,3232           52165                           DXCH     LOC                                   #  JOBS STARTED IN THIS FASHION MUST BE
047951,000489: 01,3233           15167                           TCF      SUPDXCHZ                              
047952,000490: 
047953,000491:    5167                                           BLOCK    2                                     #  IN FIXED-FIXED SO OTHERS MAY USE.
047954,000492: 
047955,000493:    5167                                           COUNT*   $$/EXEC                               
047956,000494:                                                                                                  #  SUPDXCHZ - ROUTINE TO TRANSFER TO SUPERBANK.
047957,000495:                                                                                                  #  CALLING SEQUENCE
047958,000496:                                                                                                  #                                                 TCF     SUPDXCHZ         WITH 2CADR OF DESIRED LOCATION IN A + L.
047959,000497: 
047960,000498:    5167           56001        SUPDXCHZ           XCH      L                                     #  BASIC.
047961,000499:    5170           00006                 +1        EXTEND                                         
047962,000500:    5171           01007                           WRITE    SUPERBNK                              
047963,000501:    5172           54006                           TS       BBANK                                 
047964,000502:    5173           00001                           TC       L                                     
047965,000503: 
047966,000504:    5174           77677        NEG100             OCT      77677                                 

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