Source Code

These source-code files were obtained by digitally photographing an Artemis 72 (Apollo 15-17 Command Module) program listing from a private collection and then modifying pre-existing Comanche 55 (Apollo 11) source files to incorporate changes. Photography was by Ron Burkey, and transcription was performed by a team of volunteers. Note that the page images presented online are of reduced quality, and that additional images may be available. Report any conversion errors or legibility problems in page images to info@sandroid.org. Notations on the program listing read, in part:

	GAP: ASSEMBLE REVISION 072 OF AGC PROGRAM ARTEMIS 
	BY NASA 2021114-011 11:40 FEB. 26, 1971
Note that the date is the date of the printout, not the date of the program revision.

051830,000002:                                                                                                  ## Copyright:   Public domain.
051831,000003:                                                                                                  ## Filename:    EXECUTIVE.agc
051832,000004:                                                                                                  ## Purpose:     Part of the source code for Artemis (i.e., Colossus 3),
051833,000005:                                                                                                  ##              build 072.  This is for the Command Module's (CM)
051834,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for
051835,000007:                                                                                                  ##              Apollo 15-17.
051836,000008:                                                                                                  ## Assembler:   yaYUL
051837,000009:                                                                                                  ## Contact:     Jim Lawton <jim DOT lawton AT gmail DOT com>
051838,000010:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
051839,000011:                                                                                                  ## Page Scans:  www.ibiblio.org/apollo/ScansForConversion/Artemis072/
051840,000012:                                                                                                  ## Mod history: 2009-08-29 JL   Adapted from corresponding Comanche 055 file.
051841,000013:                                                                                                  ##              2010-02-10 JL   Fixed error on p1218.
051842,000014:                                                                                                  ##              2010-02-20 RSB  Un-##'d this header.
051843,000015:                                                                                                  ##              2011-05-07 JL   Removed workaround.
051844,000016:                                                                                                  ##              2017-01-22 RSB  Proofed comment text by diff'ing vs Comanche 55
051845,000017:                                                                                                  ##                              and corrected errors found.
051846,000018: 

Page 1208

051848,000020: 
051849,000021:    4000                                           SETLOC   EXECF2                                
051850,000022:    4000                                           BANK                                           
051851,000023: 
051852,000024:                                                                                                  #  TO ENTER A JOB REQUEST REQUIRING NO VAC AREA:
051853,000025: 
051854,000026:    5120                                           COUNT*   $$/EXEC                               
051855,000027:    5120           34346        NOVAC30            CAF      PRIO30                                
051856,000028:    5121           00004        NOVAC              INHINT                                         
051857,000029:    5122           65213                           AD       FAKEPRET                              #  LOC(MPAC +6) - LOC(QPRET)
051858,000030:    5123           54063                           TS       NEWPRIO                               #  PRIORITY OF NEW JOB + NOVAC C(FIXLOC)
051859,000031: 
051860,000032:    5124           00006                           EXTEND                                         
051861,000033:    5125           50002                           INDEX    Q                                     #  Q WILL BE UNDISTURBED THROUGHOUT.
051862,000034:    5126           30001                           DCA      0                                     #  2CADR OF JOB ENTERED.
051863,000035:    5127           52066                           DXCH     NEWLOC                                
051864,000036:    5130           34756                           CAF      EXECBANK                              
051865,000037:    5131           56004                           XCH      FBANK                                 
051866,000038:    5132           54061                           TS       EXECTEM1                              
051867,000039:    5133           12620                           TCF      NOVAC2                                #  ENTER EXECUTIVE BANK.
051868,000040: 
051869,000041:                                                                                                  #  TO ENTER A JOB REQUEST REQUIRING A VAC AREA - E.G., ALL (PARTIALLY) INTERPRETIVE JOBS.
051870,000042: 
051871,000043:    5134           34753        FINVAC20           CAF      PRIO20                                
051872,000044:    5135           00004        FINDVAC            INHINT                                         
051873,000045:    5136           54063                           TS       NEWPRIO                               
051874,000046:    5137           00006                           EXTEND                                         
051875,000047:    5140           50002                           INDEX    Q                                     
051876,000048:    5141           30001                           DCA      0                                     
051877,000049:    5142           52066        SPVACIN            DXCH     NEWLOC                                
051878,000050:    5143           34756                           CAF      EXECBANK                              
051879,000051:    5144           56004                           XCH      FBANK                                 
051880,000052:    5145           12576                           TCF      FINDVAC2                              #  OFF TO EXECUTIVE SWITCHED-BANK.
051881,000053: 
051882,000054:                                                                                                  #  TO ENTER A FINDVAC WITH THE PRIORITY IN NEWPRIO TO THE 2CADR ARRIVING IN A AND L:
051883,000055: 
051884,000056:                                                                                                  #  USERS OF SPVAC MUST INHINT BEFORE STORING IN NEWPRIO.
051885,000057: 
051886,000058:    5146           56002        SPVAC              XCH      Q                                     
051887,000059:    5147           67701                           AD       NEG2                                  
051888,000060:    5150           56002                           XCH      Q                                     
051889,000061:    5151           15142                           TCF      SPVACIN                               
051890,000062: 
051891,000063:                                                                                                  #  TO SUSPEND A BASIC JOB SO A HIGHER PRIORITY JOB MAY BE SERVICED:
051892,000064: 
051893,000065:    5152           22002        CHANG1             LXCH     Q                                     
051894,000066:    5153           34756                           CAF      EXECBANK                              
051895,000067:    5154           56006                           XCH      BBANK                                 
051896,000068:    5155           12677                           TCF      CHANJOB                               
051897,000069: 
051898,000070:                                                                                                  #  TO SUSPEND AN INTERPRETIVE JOB:
051899,000071: 

Page 1209

051901,000073:    5156           40164        CHANG2             CS       LOC                                   #  NEGATIVE LOC SHOWS JOB = INTERPRETIVE.
051902,000074:                                                                                                  #  ITRACE (4) REFERS TO "CHANG2".
051903,000075:    5157           54001                           TS       L                                     
051904,000076:    5160           34756                 +2        CAF      EXECBANK                              
051905,000077:    5161           54006                           TS       BBANK                                 
051906,000078:    5162           12676                           TCF      CHANJOB    -1                         
051907,000079: 

Page 1210

051909,000081:                                                                                                  #  TO VOLUNTARILY SUSPEND A JOB UNTIL THE COMPLETION OF SOME ANTICIPATED EVENT (I/O EVENT ETC.):
051910,000082: 
051911,000083:    5163           54164        JOBSLEEP           TS       LOC                                   
051912,000084:    5164           34756                           CAF      EXECBANK                              
051913,000085:    5165           54004                           TS       FBANK                                 
051914,000086:    5166           12767                           TCF      JOBSLP1                               
051915,000087: 
051916,000088:                                                                                                  #  TO AWAKEN A JOB PUT TO SLEEP IN THE ABOVE FASHION:
051917,000089: 
051918,000090:    5167           00004        JOBWAKE            INHINT                                         
051919,000091:    5170           54065                           TS       NEWLOC                                
051920,000092:    5171           44767                           CS       TWO                                   #  EXIT IS VIA FINDVAC/NOVAC PROCEDURES.
051921,000093:    5172           26002                           ADS      Q                                     
051922,000094:    5173           34756                           CAF      EXECBANK                              
051923,000095:    5174           56004                           XCH      FBANK                                 
051924,000096:    5175           13014                           TCF      JOBWAKE2                              
051925,000097: 
051926,000098:                                                                                                  #  TO CHANGE THE PRIORITY OF A JOB CURRENTLY UNDER EXECUTION:
051927,000099: 
051928,000100:    5176           00004        PRIOCHNG           INHINT                                         #  NEW PRIORITY ARRIVES IN A. RETURNS TO
051929,000101:    5177           54063                           TS       NEWPRIO                               #  CALLER AS SOON AS NEW JOB PRIORITY IS
051930,000102:    5200           34756                           CAF      EXECBANK                              #  HIGHEST. PREPARE FOR POSSIBLE BASIC-
051931,000103:    5201           56006                           XCH      BBANK                                 #  STYLE CHANGE-JOB.
051932,000104:    5202           54165                           TS       BANKSET                               
051933,000105:    5203           30002                           CA       Q                                     
051934,000106:    5204           13063                           TCF      PRIOCH2                               
051935,000107: 
051936,000108:                                                                                                  #  TO REMOVE A JOB FROM EXECUTIVE CONSIDERATIONS:
051937,000109: 
051938,000110:    5205           34756        ENDOFJOB           CAF      EXECBANK                              
051939,000111:    5206           54004                           TS       FBANK                                 
051940,000112:    5207           13074                           TCF      ENDJOB1                               
051941,000113: 
051942,000114:    5210           30061        ENDFIND            CA       EXECTEM1                              #  RETURN TO CALLER AFTER JOB ENTRY
051943,000115:    5211           54004                           TS       FBANK                                 #  COMPLETE.
051944,000116:    5212           16710                           TCF      Q+2                                   
051945,000117:    5213     4756               EXECBANK           EQUALS   BIT11                                 #  THIS IS TRUE IF FINDVAC2 STAYS IN BANK 01
051946,000118: 
051947,000119:    5213           00110        FAKEPRET           ADRES    MPAC       -36D                       #  LOC(MPAC +6) - LOC(QPRET)
051948,000120: 

Page 1211

051950,000122:                                                                                                  #  LOCATE AN AVAILABLE VAC AREA.
051951,000123: 
051952,000124: 01,2000                                           SETLOC   EXECB1                                
051953,000125: 01,2000                                           BANK                                           
051954,000126: 
051955,000127: 01,2576                                           COUNT*   $$/EXEC                               
051956,000128:                                                                                                  #       ******** IF THE  EXECUTIVE IS 
051957,000129:                                                                                                  #                MOVED   OUT OF BANK 01
051958,000130:                                                                                                  #                DONT    FORGET TO CHANGE
051959,000131:                                                                                                  #                THE     VALUE OF
051960,000132:                                                                                                  #                ******  EXECBANK ****
051961,000133: 01,2576           54061        FINDVAC2           TS       EXECTEM1                              #  (SAVE CALLER'S BANK FIRST.)
051962,000134: 01,2577           10400                           CCS      VAC1USE                               
051963,000135: 01,2600           12613                           TCF      VACFOUND                              
051964,000136: 01,2601           10454                           CCS      VAC2USE                               
051965,000137: 01,2602           12613                           TCF      VACFOUND                              
051966,000138: 01,2603           10530                           CCS      VAC3USE                               
051967,000139: 01,2604           12613                           TCF      VACFOUND                              
051968,000140: 01,2605           10604                           CCS      VAC4USE                               
051969,000141: 01,2606           12613                           TCF      VACFOUND                              
051970,000142: 01,2607           10660                           CCS      VAC5USE                               
051971,000143: 01,2610           12613                           TCF      VACFOUND                              
051972,000144: 01,2611           07706                           TC       BAILOUT                               
051973,000145: 01,2612           31201                           OCT      31201                                 #  NO VAC AREAS
051974,000146: 
051975,000147: 01,2613           64767        VACFOUND           AD       TWO                                   #  RESERVE THIS VAC AREA BY STORING A ZERO
051976,000148: 01,2614           22007                           ZL                                             #  IN ITS VAC USE REGISTER AND STORE THE
051977,000149: 01,2615           50000                           INDEX    A                                     #  ADDRESS OF THE FIRST WORD OF IT IN THE
051978,000150: 01,2616           21777                           LXCH     0          -1                         #  LOW NINE BITS OF THE PRIORITY WORD.
051979,000151: 01,2617           26063                           ADS      NEWPRIO                               
051980,000152: 
051981,000153: 01,2620           34772        NOVAC2             CAF      ZERO                                  #  NOVAC ENTERS HERE. FIND A CORE SET.
051982,000154: 01,2621           54064                           TS       LOCCTR                                
051983,000155: 01,2622           32627                           CAF      NO.CORES                              #  SEVEN SETS OF ELEVEN REGISTERS EACH.
051984,000156: 01,2623           54062        NOVAC3             TS       EXECTEM2                              
051985,000157: 01,2624           50064                           INDEX    LOCCTR                                
051986,000158: 01,2625           10167                           CCS      PRIORITY                              #  EACH PRIORITY REGISTER CONTAINS -0 IF
051987,000159: 01,2626           12667                           TCF      NEXTCORE                              #  THE CORRESPONDING CORE SET IS AVAILABLE.
051988,000160: 01,2627           00006        NO.CORES           DEC      6          B-14                       
051989,000161: 01,2630           12667                           TCF      NEXTCORE                              #  AN ACTIVE JOB HAS A POSITIVE PRIORITY
051990,000162:                                                                                                  #  BUT A DORMANT JOB'S PRIORITY IS NEGATIVE
051991,000163: 

Page 1212

051993,000165: 01,2631           30063        CORFOUND           CA       NEWPRIO                               #  SET THE PRIORITY OF THIS JOB IN THE CORE
051994,000166: 01,2632           50064                           INDEX    LOCCTR                                #  SET'S PRIORITY REGISTER AND SET THE
051995,000167: 01,2633           54167                           TS       PRIORITY                              #  JOB'S PUSH-DOWN POINTER AT THE BEGINNING
051996,000168: 01,2634           75021                           MASK     LOW9                                  #  OF THE WORK AREA AND OVERFLOW INDICATOR
051997,000169: 01,2635           50064                           INDEX    LOCCTR                                
051998,000170: 01,2636           54166                           TS       PUSHLOC                               #  OFF TO PREPARE FOR INTERPRETIVE PROGRAMS
051999,000171: 
052000,000172: 01,2637           10064                           CCS      LOCCTR                                #  IF CORE SET ZERO IS BEING LOADED, SET UP
052001,000173: 01,2640           12654                           TCF      SETLOC                                #  OVFIND AND FIXLOC IMMEDIATELY.
052002,000174: 01,2641           54121                           TS       OVFIND                                
052003,000175: 01,2642           30166                           CA       PUSHLOC                               
052004,000176: 01,2643           54120                           TS       FIXLOC                                
052005,000177: 
052006,000178: 01,2644           10067        SPECTEST           CCS      NEWJOB                                #  SEE IF ANY ACTIVE JOBS WAITING (RARE).
052007,000179: 01,2645           12654                           TCF      SETLOC                                #  MUST BE AWAKENED BUT UNCHANGED JOB.
052008,000180: 01,2646           12647                           NOOP                                           #  CANNOT GET HERE
052009,000181: 01,2647           12650                           NOOP                                           #  CANNOT GET HERE
052010,000182: 01,2650           54067                           TS       NEWJOB                                #  +0 SHOWS ACTIVE JOB ALREADY SET.
052011,000183: 01,2651           52066                           DXCH     NEWLOC                                
052012,000184: 01,2652           52165                           DXCH     LOC                                   
052013,000185: 01,2653           15210                           TCF      ENDFIND                               
052014,000186: 
052015,000187: 01,2654           52066        SETLOC             DXCH     NEWLOC                                #  SET UP THE LOCATION REGISTERS FOR THIS
052016,000188: 01,2655           50064                           INDEX    LOCCTR                                
052017,000189: 01,2656           52165                           DXCH     LOC                                   
052018,000190: 01,2657           50067                           INDEX    NEWJOB                                #  THIS INDEX INSTRUCTION INSURES THAT THE
052019,000191: 01,2660           40167                           CS       PRIORITY                              #  HIGHEST ACTIVE PRIORITY WILL BE COMPARED
052020,000192: 01,2661           60063                           AD       NEWPRIO                               #  WITH THE NEW PRIORITY TO SEE IF NEWJOB
052021,000193: 01,2662           00006                           EXTEND                                         #  SHOULD BE SET TO SIGNAL A SWITCH.
052022,000194: 01,2663           65210                           BZMF     ENDFIND                               
052023,000195: 01,2664           30064                           CA       LOCCTR                                #  LOCCTR IS LEFT SET AT THIS CORE SET IF
052024,000196: 01,2665           54067                           TS       NEWJOB                                #  THE CALLER WANTS TO LOAD ANY MPAC
052025,000197: 01,2666           15210                           TCF      ENDFIND                               #  REGISTERS, ETC.
052026,000198: 
052027,000199: 01,2667           33024        NEXTCORE           CAF      COREINC                               
052028,000200: 01,2670           26064                           ADS      LOCCTR                                
052029,000201: 01,2671           10062                           CCS      EXECTEM2                              
052030,000202: 01,2672           12623                           TCF      NOVAC3                                
052031,000203: 01,2673           07706                           TC       BAILOUT                               #  NO CORE SETS.
052032,000204: 01,2674           31202                           OCT      31202                                 
052033,000205: 

Page 1213

052035,000207:                                                                                                  #  THE FOLLOWING ROUTINE SWAPS CORE SET 0 WITH THAT WHOSE RELATIVE ADDRESS IS IN NEWJOB.
052036,000208: 
052037,000209: 01,2675           22164                 -2        LXCH     LOC                                   
052038,000210: 01,2676           30165                 -1        CAE      BANKSET                               #  BANKSET, NOT BBANK, HAS RIGHT CONTENTS.
052039,000211: 01,2677           00004        CHANJOB            INHINT                                         
052040,000212: 01,2700           00006                           EXTEND                                         
052041,000213: 01,2701           04007                           ROR      SUPERBNK                              #  PICK UP CURRENT SBANK FOR BBCON
052042,000214: 01,2702           56001                           XCH      L                                     #  LOC IN A AND BBCON IN L.
052043,000215: 01,2703           50067                 +4        INDEX    NEWJOB                                #  SWAP LOC AND BANKSET.
052044,000216: 01,2704           52165                           DXCH     LOC                                   
052045,000217: 01,2705           52165                           DXCH     LOC                                   
052046,000218: 
052047,000219: 01,2706           30165                           CAE      BANKSET                               
052048,000220: 01,2707           00006                           EXTEND                                         
052049,000221: 01,2710           01007                           WRITE    SUPERBNK                              #  SET SBANK FOR NEW JOB.
052050,000222: 01,2711           52155                           DXCH     MPAC                                  #  SWAP MULTI-PURPOSE ACCUMULATOR AREAS.
052051,000223: 01,2712           50067                           INDEX    NEWJOB                                
052052,000224: 01,2713           52155                           DXCH     MPAC                                  
052053,000225: 01,2714           52155                           DXCH     MPAC                                  
052054,000226: 01,2715           52157                           DXCH     MPAC       +2                         
052055,000227: 01,2716           50067                           INDEX    NEWJOB                                
052056,000228: 01,2717           52157                           DXCH     MPAC       +2                         
052057,000229: 01,2720           52157                           DXCH     MPAC       +2                         
052058,000230: 01,2721           52161                           DXCH     MPAC       +4                         
052059,000231: 01,2722           50067                           INDEX    NEWJOB                                
052060,000232: 01,2723           52161                           DXCH     MPAC       +4                         
052061,000233: 01,2724           52161                           DXCH     MPAC       +4                         
052062,000234: 01,2725           52163                           DXCH     MPAC       +6                         
052063,000235: 01,2726           50067                           INDEX    NEWJOB                                
052064,000236: 01,2727           52163                           DXCH     MPAC       +6                         
052065,000237: 01,2730           52163                           DXCH     MPAC       +6                         
052066,000238: 
052067,000239: 01,2731           34772                           CAF      ZERO                                  
052068,000240: 01,2732           56121                           XCH      OVFIND                                #  MAKE PUSHLOC NEGATIVE IF OVFIND NZ.
052069,000241: 01,2733           00006                           EXTEND                                         
052070,000242: 01,2734           12737                           BZF      +3                                    
052071,000243: 01,2735           40166                           CS       PUSHLOC                               
052072,000244: 01,2736           54166                           TS       PUSHLOC                               
052073,000245: 
052074,000246: 01,2737           52167                           DXCH     PUSHLOC                               
052075,000247: 01,2740           50067                           INDEX    NEWJOB                                
052076,000248: 01,2741           52167                           DXCH     PUSHLOC                               
052077,000249: 01,2742           52167                           DXCH     PUSHLOC                               #  SWAPS PUSHLOC AND PRIORITY.
052078,000250: 01,2743           35021                           CAF      LOW9                                  #  SET FIXLOC TO BASE OF VAC AREA.
052079,000251: 01,2744           70167                           MASK     PRIORITY                              
052080,000252: 01,2745           54120                           TS       FIXLOC                                
052081,000253: 
052082,000254: 01,2746           10166                           CCS      PUSHLOC                               #  SET OVERFLOW INDICATOR ACCORDING TO
052083,000255: 01,2747           34772                           CAF      ZERO                                  
052084,000256: 01,2750           12755                           TCF      ENDPRCHG   -1                         

Page 1214

052086,000258: 01,2751           40166                           CS       PUSHLOC                               
052087,000259: 01,2752           54166                           TS       PUSHLOC                               
052088,000260: 01,2753           34770                           CAF      ONE                                   
052089,000261: 01,2754           56121                           XCH      OVFIND                                
052090,000262: 01,2755           54067                 -1        TS       NEWJOB                                
052091,000263: 01,2756           00003        ENDPRCHG           RELINT                                         
052092,000264: 01,2757           52165                           DXCH     LOC                                   #  BASIC JOBS HAVE POSITIVE ADDRESSES, SO
052093,000265: 01,2760           00006                           EXTEND                                         #  DISPATCH WITH A DTCB.
052094,000266: 01,2761           62763                           BZMF     +2                                    #  IF INTERPRETIVE, SET UP EBANK, ETC.
052095,000267: 01,2762           52006                           DTCB                                           
052096,000268: 

Page 1215

052098,000270: 
052099,000271: 01,2763           40000                           COM                                            #  EPILOGUE TO JOB CHANGE FOR INTERPRETIVE
052100,000272: 01,2764           64770                           AD       ONE                                   
052101,000273: 01,2765           54164                           TS       LOC                                   #  RESUME.
052102,000274: 01,2766           16017                           TCF      INTRSM                                
052103,000275: 
052104,000276:                                                                                                  #  COMPLETE JOBSLEEP PREPARATIONS.
052105,000277: 
052106,000278: 01,2767           00004        JOBSLP1            INHINT                                         
052107,000279: 01,2770           40167                           CS       PRIORITY                              #  NNZ PRIORITY SHOWS JOB ASLEEP.
052108,000280: 01,2771           54167                           TS       PRIORITY                              
052109,000281: 01,2772           36043                           CAF      LOW7                                  
052110,000282: 01,2773           70006                           MASK     BBANK                                 
052111,000283: 01,2774           00006                           EXTEND                                         
052112,000284: 01,2775           04007                           ROR      SUPERBNK                              #  SAVE OLD SUPERBANK VALUE.
052113,000285: 01,2776           54165                           TS       BANKSET                               
052114,000286: 01,2777           44772                           CS       ZERO                                  
052115,000287: 01,3000           54131        JOBSLP2            TS       BUF        +1                         #  HOLDS - HIGHEST PRIORITY.
052116,000288: 01,3001           13111                           TCF      EJSCAN                                #  SCAN FOR HIGHEST PRIORITY ALA ENDOFJOB.
052117,000289: 
052118,000290: 01,3002           00004        NUCHANG2           INHINT                                         #  QUICK... DONT LET NEWJOB CHANGE TO +0.
052119,000291: 01,3003           10067                           CCS      NEWJOB                                
052120,000292: 01,3004           13007                           TCF      +3                                    #  NEWJOB STILL PNZ
052121,000293: 01,3005           00003                           RELINT                                         #  NEW JOB HAS CHANGED TO +0. WAKE UP JOB
052122,000294: 01,3006           13201                           TCF      ADVAN      +2                         #  VIA NUDIRECT. (VERY RARE CASE.)
052123,000295: 
052124,000296: 01,3007           34767                           CAF      TWO                                   
052125,000297: 01,3010           00006                           EXTEND                                         
052126,000298: 01,3011           05011                           WOR      DSALMOUT                              #  TURN ON ACTIVITY LIGHT
052127,000299: 01,3012           52165                           DXCH     LOC                                   #  AND SAVE ADDRESS INFO FOR BENEFIT OF
052128,000300: 01,3013           12703                           TCF      CHANJOB    +4                         #   POSSIBLE SLEEPING JOB.
052129,000301: 

Page 1216

052131,000303:                                                                                                  #  TO WAKE UP A JOB, EACH CORE SET IS FOUND TO LOCATE ALL JOBS WHICH ARE ASLEEP. IF THE FCADR IN THE
052132,000304:                                                                                                  #  LOC REGISTER OF ANY SUCH JOB MATCHES THAT SUPPLIED BY THE CALLER, THAT JOB IS AWAKENED. IF NO JOB IS FOUND,
052133,000305:                                                                                                  #  LOCCTR IS SET TO -1 AND NO FURTHER ACTION TAKES PLACE.
052134,000306: 
052135,000307: 01,3014           54061        JOBWAKE2           TS       EXECTEM1                              
052136,000308: 01,3015           34772                           CAF      ZERO                                  #  BEGIN CORE SET SCAN.
052137,000309: 01,3016           54064                           TS       LOCCTR                                
052138,000310: 01,3017           32627                           CAF      NO.CORES                              
052139,000311: 01,3020           54062        JOBWAKE4           TS       EXECTEM2                              
052140,000312: 01,3021           50064                           INDEX    LOCCTR                                
052141,000313: 01,3022           10167                           CCS      PRIORITY                              
052142,000314: 01,3023           13026                           TCF      JOBWAKE3                              #  ACTIVE JOB - CHECK NEXT CORE SET.
052143,000315: 01,3024           00014        COREINC            DEC      12         B-14                       #  12 REGISTERS PER CORE SET.
052144,000316: 01,3025           13035                           TCF      WAKETEST                              #  SLEEPING JOB - SEE IF CADR MATCHES.
052145,000317: 
052146,000318: 01,3026           33024        JOBWAKE3           CAF      COREINC                               
052147,000319: 01,3027           26064                           ADS      LOCCTR                                
052148,000320: 01,3030           10062                           CCS      EXECTEM2                              
052149,000321: 01,3031           13020                           TCF      JOBWAKE4                              
052150,000322: 01,3032           44770                           CS       ONE                                   #  EXIT IF SLEEPING JOB NOT FOUND.
052151,000323: 01,3033           54064                           TS       LOCCTR                                
052152,000324: 01,3034           15210                           TCF      ENDFIND                               
052153,000325: 
052154,000326: 01,3035           40065        WAKETEST           CS       NEWLOC                                
052155,000327: 01,3036           50064                           INDEX    LOCCTR                                
052156,000328: 01,3037           60164                           AD       LOC                                   
052157,000329: 01,3040           00006                           EXTEND                                         
052158,000330: 01,3041           13043                           BZF      +2                                    #  IF MATCH.
052159,000331: 01,3042           13026                           TCF      JOBWAKE3                              #  EXAMINE NEXT CORE SET IF NO MATCH.
052160,000332: 
052161,000333: 01,3043           50064                           INDEX    LOCCTR                                #  RE-COMPLEMENT PRIORITY TO SHOW JOB AWAKE
052162,000334: 01,3044           40167                           CS       PRIORITY                              
052163,000335: 01,3045           54063                           TS       NEWPRIO                               
052164,000336: 01,3046           50064                           INDEX    LOCCTR                                
052165,000337: 01,3047           54167                           TS       PRIORITY                              
052166,000338: 
052167,000339: 01,3050           44344                           CS       FBANKMSK                              #  MAKE UP THE 2CADR OF THE WAKE ADDRESS
052168,000340: 01,3051           70065                           MASK     NEWLOC                                #  USING THE CADR IN NEWLOC AND THE EBANK
052169,000341: 01,3052           64756                           AD       2K                                    #  HALF OF BBANK SAVED IN BANKSET.
052170,000342: 01,3053           56065                           XCH      NEWLOC                                
052171,000343: 01,3054           74344                           MASK     FBANKMSK                              
052172,000344: 01,3055           50064                           INDEX    LOCCTR                                
052173,000345: 01,3056           60165                           AD       BANKSET                               
052174,000346: 01,3057           54066                           TS       NEWLOC     +1                         
052175,000347: 
052176,000348: 01,3060           10064                           CCS      LOCCTR                                #  SPECIAL TREATMENT IF THIS JOB WAS
052177,000349: 01,3061           12654                           TCF      SETLOC                                #  ALREADY IN THE RUN (0) POSITION.
052178,000350: 01,3062           12644                           TCF      SPECTEST                              
052179,000351: 

Page 1217

052181,000353:                                                                                                  #  PRIORITY CHANGE. CHANGE THE CONTENTS OF PRIORITY AND SCAN FOR THE JOB OF HIGHEST PRIORITY.
052182,000354: 
052183,000355: 01,3063           54164        PRIOCH2            TS       LOC                                   
052184,000356: 01,3064           34772                           CAF      ZERO                                  #  SET FLAG TO TELL ENDJOB SCANNER IF THIS
052185,000357: 01,3065           54130                           TS       BUF                                   #  JOB IS STILL HIGHEST PRIORITY.
052186,000358: 01,3066           35021                           CAF      LOW9                                  
052187,000359: 01,3067           70167                           MASK     PRIORITY                              
052188,000360: 01,3070           60063                           AD       NEWPRIO                               
052189,000361: 01,3071           54167                           TS       PRIORITY                              
052190,000362: 01,3072           40000                           COM                                            
052191,000363: 01,3073           13000                           TCF      JOBSLP2                               #  AND TO EJSCAN.
052192,000364: 

Page 1218

052194,000366:                                                                                                  #  RELEASE THIS CORE SET AND VAC AREA AND SCAN FOR THE JOB OF HIGHEST ACTIVE PRIORITY.
052195,000367: 
052196,000368: 01,3074           00004        ENDJOB1            INHINT                                         
052197,000369: 01,3075           44772                           CS       ZERO                                  
052198,000370: 01,3076           54131                           TS       BUF        +1                         
052199,000371: 01,3077           56167                           XCH      PRIORITY                              
052200,000372: 01,3100           75021                           MASK     LOW9                                  
052201,000373: 01,3101           54001                           TS       L                                     
052202,000374: 
052203,000375: 01,3102           45213                           CS       FAKEPRET                              
052204,000376: 01,3103           60001                           AD       L                                     
052205,000377: 
052206,000378: 01,3104           00006                           EXTEND                                         
052207,000379: 01,3105           63111                           BZMF     EJSCAN                                #  NOVAC ENDOFJOB
052208,000380: 
052209,000381: 01,3106           10001                           CCS      L                                     
052210,000382: 01,3107           50000                           INDEX    A                                     
052211,000383: 01,3110           54000                           TS       0                                     
052212,000384: 
052213,000385: 01,3111           10203        EJSCAN             CCS      PRIORITY   +12D                       
052214,000386: 01,3112           03156                           TC       EJ1                                   
052215,000387: 01,3113     1361                                  EBANK=   SELFRET                               
052216,000388: 01,3113           66102        SELFBANK           BBCON    SELFCHK                               #  CANNOT GET HERE
052217,000389: 01,3114           13115                           TCF      +1                                    
052218,000390: 
052219,000391: 01,3115           10217                           CCS      PRIORITY   +24D                       #  EXAMINE EACH PRIORITY REGISTER TO FIND
052220,000392: 01,3116           03156                           TC       EJ1                                   #  THE JOB OF HIGHEST ACTIVE PRIORITY.
052221,000393: 01,3117           40201        OCT40201           OCT      40201                                 #  CANNOT GET HERE
052222,000394: 01,3120           13121                           TCF      +1                                    
052223,000395: 
052224,000396: 01,3121           10233                           CCS      PRIORITY   +36D                       
052225,000397: 01,3122           03156                           TC       EJ1                                   
052226,000398: 01,3123           67610        -CCSPR             -CCS     PRIORITY                              
052227,000399: 01,3124           13125                           TCF      +1                                    
052228,000400: 
052229,000401: 01,3125           10247                           CCS      PRIORITY   +48D                       
052230,000402: 01,3126           03156                           TC       EJ1                                   
052231,000403: 01,3127           03724        PHS2CADR           GENADR   PHSPART2                              #  CANNOT GET HERE
052232,000404: 01,3130           13131                           TCF      +1                                    
052233,000405: 
052234,000406: 01,3131           10263                           CCS      PRIORITY   +60D                       
052235,000407: 01,3132           03156                           TC       EJ1                                   
052236,000408: 01,3133           03502        PRT2CADR           GENADR   GETPART2                              #  CANNOT GET HERE
052237,000409: 01,3134           13135                           TCF      +1                                    
052238,000410: 
052239,000411: 01,3135           10277                           CCS      PRIORITY   +72D                       
052240,000412: 01,3136           03156                           TC       EJ1                                   
052241,000413: 01,3137           05332        LGCLCADR           GENADR   LONGCALL                              #  CANNOT GET HERE
052242,000414: 01,3140           13141                           TCF      +1                                    
052243,000415: 

Page 1219

052245,000417:                                                                                                  #  EVALUATE THE RESULTS OF THE SCAN.
052246,000418: 
052247,000419: 01,3141           10131                           CCS      BUF        +1                         #  SEE IF THERE ARE ANY ACTIVE JOBS WAITING
052248,000420: 
052249,000421: 01,3142           53301        GETCADR            DXCH     LONGCADR                              #  CANNOT GET HERE
052250,000422: 01,3143           05214                           TC       SUPDXCHZ                              
052251,000423: 01,3144           13146                           TCF      +2                                    
052252,000424: 01,3145           13171                           TCF      DUMMYJOB                              
052253,000425: 01,3146           10130                           CCS      BUF                                   #  BUF IS ZERO IF THIS IS A PRIOCHNG AND
052254,000426: 01,3147           13151                           TCF      +2                                    #  CHANGED PRIORITY IS STILL HIGHEST.
052255,000427: 01,3150           12755                           TCF      ENDPRCHG   -1                         
052256,000428: 
052257,000429: 01,3151           50000                           INDEX    A                                     #  OTHERWISE, SET NEWJOB TO THE RELATIVE
052258,000430: 01,3152           27777                           CAF      0          -1                         #  ADDRESS OF THE NEW JOB'S CORE SET.
052259,000431: 01,3153           63123                           AD       -CCSPR                                
052260,000432: 01,3154           54067                           TS       NEWJOB                                
052261,000433: 01,3155           12675                           TCF      CHANJOB    -2                         
052262,000434: 
052263,000435: 01,3156           54132        EJ1                TS       BUF        +2                         
052264,000436: 01,3157           60131                           AD       BUF        +1                         #  - OLD HIGH PRIORITY.
052265,000437: 01,3160           10000                           CCS      A                                     
052266,000438: 01,3161           40132                           CS       BUF        +2                         
052267,000439: 01,3162           13165                           TCF      EJ2                                   #  NEW HIGH PRIORITY.
052268,000440: 01,3163           13164                           NOOP                                           
052269,000441: 01,3164           16710                           TCF      Q+2                                   
052270,000442: 
052271,000443: 01,3165           54131        EJ2                TS       BUF        +1                         
052272,000444: 01,3166           30002                           CA       Q                                     
052273,000445: 01,3167           54130                           TS       BUF                                   #  FOR LOCATING CCS PRIORITY + X INSTR.
052274,000446: 01,3170           16710                           TCF      Q+2                                   
052275,000447: 

Page 1220

052277,000449:                                                                                                  #  IDLING AND COMPUTER ACTIVITY (GREEN) LIGHT MAINTENANCE. THE IDLING ROUTINE IS NOT A JOB IN ITSELF,
052278,000450:                                                                                                  #  BUT RATHER A SUBROUTINE OF THE EXECUTIVE.
052279,000451: 
052280,000452: 01,3171     1361                                  EBANK=   SELFRET                               #  SELF-CHECK STORAGE IN EBANK.
052281,000453: 
052282,000454: 01,3171           44772        DUMMYJOB           CS       ZERO                                  #  SET NEWJOB TO -0 FOR IDLING.
052283,000455: 01,3172           54067                           TS       NEWJOB                                
052284,000456: 01,3173           00003                 +2        RELINT                                         
052285,000457: 01,3174           44767                           CS       TWO                                   #  TURN OFF THE ACTIVITY LIGHT.
052286,000458: 01,3175           00006                           EXTEND                                         
052287,000459: 01,3176           03011                           WAND     DSALMOUT                              
052288,000460: 01,3177           10067        ADVAN              CCS      NEWJOB                                #  IS A NEWJOB ACTIVE ?
052289,000461: 01,3200           13002                           TCF      NUCHANG2                              #  YES... ONE REQUIRING A CHANGE JOB.
052290,000462: 01,3201           34767                 +2        CAF      TWO                                   #  NEW JOB ALREADY IN POSITION FOR
052291,000463: 01,3202           13207                           TCF      NUDIRECT                              #  EXECUTION.
052292,000464: 
052293,000465: 01,3203           31361                           CA       SELFRET                               
052294,000466: 01,3204           54001                           TS       L                                     #  PUT RETURN ADDRESS IN L.
052295,000467: 01,3205           33113                           CAF      SELFBANK                              
052296,000468: 01,3206           15215                           TCF      SUPDXCHZ   +1                         #   AND DISPATCH JOB.
052297,000469: 
052298,000470: 01,3207           00006        NUDIRECT           EXTEND                                         #  TURN THE GREEN LIGHT BACK ON.
052299,000471: 01,3210           05011                           WOR      DSALMOUT                              
052300,000472: 01,3211           52165                           DXCH     LOC                                   #  JOBS STARTED IN THIS FASHION MUST BE
052301,000473: 01,3212           15214                           TCF      SUPDXCHZ                              
052302,000474: 
052303,000475:    4000                                           SETLOC   EXECF2                                
052304,000476:    4000                                           BANK                                           
052305,000477: 
052306,000478:    5214                                           COUNT*   $$/EXEC                               
052307,000479: 
052308,000480:                                                                                                  #  SUPDXCHZ - ROUTINE TO TRANSFER TO SUPERBANK.
052309,000481:                                                                                                  #  CALLING SEQUENCE
052310,000482:                                                                                                  #                TCF     SUPDXCHZ        WITH 2CADR OF DESIRED LOCATION IN A + L.
052311,000483: 
052312,000484:    5214           56001        SUPDXCHZ           XCH      L                                     #  BASIC.
052313,000485:    5215           00006                 +1        EXTEND                                         
052314,000486:    5216           01007                           WRITE    SUPERBNK                              
052315,000487:    5217           54006                           TS       BBANK                                 
052316,000488:    5220           00001                           TC       L                                     
052317,000489: 
052318,000490:    5221           77677        NEG100             OCT      77677                                 

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