Source Code

These source-code files were derived from scans of the Colossus 237 (Apollo 8 Command Module) program listing from the private collection of original AGC developer Fred Martin. Scanning was by Ron Burkey. Pre-existing Colossus 249 (Apollo 9 CM) source files were used as a template, and changes between Colossus 249 and Colossus 237 were manually transcribed by a team of volunteers. Note that the page images presented online are of reduced quality, and that additional images are 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 237 OF AGC PROGRAM COLOSSUS 
	BY NASA 2021111-031  1:17 AUG. 24, 1968
Note that the date is the date of the printout, not the date of the program revision.

050009,000002:                                                                                                  ## Copyright:   Public domain.
050010,000003:                                                                                                  ## Filename:    EXECUTIVE.agc
050011,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus build 237.
050012,000005:                                                                                                  ##              This is for the Command Module's (CM) Apollo Guidance
050013,000006:                                                                                                  ##              Computer (AGC), for Apollo 8.
050014,000007:                                                                                                  ## Assembler:   yaYUL
050015,000008:                                                                                                  ## Contact:     Jim Lawton <jim DOT lawton AT gmail DOT com>
050016,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
050017,000010:                                                                                                  ## Page Scans:  www.ibiblio.org/apollo/ScansForConversion/Colossus237/
050018,000011:                                                                                                  ## Mod history: 2011-04-13 JL   Adapted from corresponding Colossus 249 file.
050019,000012:                                                                                                  ##              2016-11-02 RSB  Typo (offset-reference +1 was not indented).
050020,000013:                                                                                                  ##              2017-01-01 RSB  Proofed comment text using octopus/ProoferComments,
050021,000014:                                                                                                  ##                              and fixed errors found.
050022,000015:                                                                                                  ##              2017-01-22 RSB  Back-ported comment error fixes detected in diff'ing
050023,000016:                                                                                                  ##                              Artemis 72 vs Comanche 55.
050024,000017: 

Page 1175

050026,000019:    5027                                           BLOCK    02                                    
050027,000020:                                                                                                  #           TO ENTER A JOB REQUEST REQUIRING NO VAC AREA:
050028,000021: 
050029,000022:    5027                                           COUNT    02/EXEC                               
050030,000023: 
050031,000024:    5027           00004        NOVAC              INHINT                                         
050032,000025:    5030           65121                           AD       FAKEPRET                              #  LOC(MPAC +6) - LOC(QPRET)
050033,000026:    5031           54063                           TS       NEWPRIO                               #  PRIORITY OF NEW JOB + NOVAC C(FIXLOC)
050034,000027: 
050035,000028:    5032           00006                           EXTEND                                         
050036,000029:    5033           50002                           INDEX    Q                                     #  Q WILL BE UNDISTURBED THROUGHOUT.
050037,000030:    5034           30001                           DCA      0                                     #  2CADR OF JOB ENTERED.
050038,000031:    5035           52066                           DXCH     NEWLOC                                
050039,000032:    5036           35120                           CAF      EXECBANK                              
050040,000033:    5037           56004                           XCH      FBANK                                 
050041,000034:    5040           54061                           TS       EXECTEM1                              
050042,000035:    5041           12650                           TCF      NOVAC2                                #  ENTER EXECUTIVE BANK.
050043,000036: 
050044,000037:                                                                                                  #           TO ENTER A JOB REQUEST REQUIRING A VAC AREA - E.G., ALL (PARTIALLY) INTERPRETIVE JOBS.
050045,000038: 
050046,000039:    5042           00004        FINDVAC            INHINT                                         
050047,000040:    5043           54063                           TS       NEWPRIO                               
050048,000041:    5044           00006                           EXTEND                                         
050049,000042:    5045           50002                           INDEX    Q                                     
050050,000043:    5046           30001                           DCA      0                                     
050051,000044:    5047           52066        SPVACIN            DXCH     NEWLOC                                
050052,000045:    5050           35120                           CAF      EXECBANK                              
050053,000046:    5051           56004                           XCH      FBANK                                 
050054,000047:    5052           12626                           TCF      FINDVAC2                              #  OFF TO EXECUTIVE SWITCHED-BANK.
050055,000048: 
050056,000049:                                                                                                  #           TO ENTER A FINDVAC WITH THE PRIORITY IN NEWPRIO TO THE 2CADR ARRIVING IN A AND L:
050057,000050: 
050058,000051:                                                                                                  #           USERS OF SPVAC MUST INHINT BEFORE STORING IN NEWPRIO.
050059,000052: 
050060,000053:    5053           56002        SPVAC              XCH      Q                                     
050061,000054:    5054           67715                           AD       NEG2                                  
050062,000055:    5055           56002                           XCH      Q                                     
050063,000056:    5056           15047                           TCF      SPVACIN                               
050064,000057: 
050065,000058:                                                                                                  #           TO SUSPEND A BASIC JOB SO A HIGHER PRIORITY JOB MAY BE SERVICED:
050066,000059: 
050067,000060:    5057           22002        CHANG1             LXCH     Q                                     
050068,000061:    5060           35120                           CAF      EXECBANK                              
050069,000062:    5061           56006                           XCH      BBANK                                 
050070,000063:    5062           12727                           TCF      CHANJOB                               
050071,000064: 
050072,000065:                                                                                                  #           TO SUSPEND AN INTERPRETIVE JOB:
050073,000066: 
050074,000067:    5063           40164        CHANG2             CS       LOC                                   #  NEGATIVE LOC SHOWS JOB = INTERPRETIVE.
050075,000068:                                                                                                  #           ITRACE (4) REFERS TO "CHANG2".

Page 1176

050077,000070:    5064           54001                           TS       L                                     
050078,000071:    5065           35120                 +2        CAF      EXECBANK                              
050079,000072:    5066           54006                           TS       BBANK                                 
050080,000073:    5067           12726                           TCF      CHANJOB    -1                         
050081,000074: 

Page 1177

050083,000076:                                                                                                  #           TO VOLUNTARILY SUSPEND A JOB UNTIL THE COMPLETION OF SOME ANTICIPATED EVENT (I/O EVENT ETC.):
050084,000077: 
050085,000078:    5070           54164        JOBSLEEP           TS       LOC                                   
050086,000079:    5071           35120                           CAF      EXECBANK                              
050087,000080:    5072           54004                           TS       FBANK                                 
050088,000081:    5073           13017                           TCF      JOBSLP1                               
050089,000082: 
050090,000083:                                                                                                  #           TO AWAKEN A JOB PUT TO SLEEP IN THE ABOVE FASHION:
050091,000084: 
050092,000085:    5074           00004        JOBWAKE            INHINT                                         
050093,000086:    5075           54065                           TS       NEWLOC                                
050094,000087:    5076           44711                           CS       TWO                                   #  EXIT IS VIA FINDVAC/NOVAC PROCEDURES.
050095,000088:    5077           26002                           ADS      Q                                     
050096,000089:    5100           35120                           CAF      EXECBANK                              
050097,000090:    5101           56004                           XCH      FBANK                                 
050098,000091:    5102           13044                           TCF      JOBWAKE2                              
050099,000092: 
050100,000093:                                                                                                  #           TO CHANGE THE PRIORITY OF A JOB CURRENTLY UNDER EXECUTION:
050101,000094: 
050102,000095:    5103           00004        PRIOCHNG           INHINT                                         #  NEW PRIORITY ARRIVES IN A. RETURNS TO
050103,000096:    5104           54063                           TS       NEWPRIO                               #  CALLER AS SOON AS NEW JOB PRIORITY IS
050104,000097:    5105           35120                           CAF      EXECBANK                              #  HIGHEST. PREPARE FOR POSSIBLE BASIC-
050105,000098:    5106           56006                           XCH      BBANK                                 #  STYLE CHANGE-JOB.
050106,000099:    5107           54165                           TS       BANKSET                               
050107,000100:    5110           30002                           CA       Q                                     
050108,000101:    5111           13113                           TCF      PRIOCH2                               
050109,000102: 
050110,000103:                                                                                                  #           TO REMOVE A JOB FROM EXECUTIVE CONSIDERATIONS:
050111,000104: 
050112,000105:    5112           35120        ENDOFJOB           CAF      EXECBANK                              
050113,000106:    5113           54004                           TS       FBANK                                 
050114,000107:    5114           13124                           TCF      ENDJOB1                               
050115,000108: 
050116,000109:    5115           30061        ENDFIND            CA       EXECTEM1                              #  RETURN TO CALLER AFTER JOB ENTRY
050117,000110:    5116           54004                           TS       FBANK                                 #  COMPLETE.
050118,000111:    5117           16710                           TCF      Q+2                                   
050119,000112:    5120           02626        EXECBANK           CADR     FINDVAC2                              
050120,000113: 
050121,000114:    5121           00110        FAKEPRET           ADRES    MPAC       -36D                       #  LOC(MPAC +6) - LOC(QPRET)
050122,000115: 

Page 1178

050124,000117:                                                                                                  #           LOCATE AN AVAILABLE VAC AREA.
050125,000118: 
050126,000119: 01,2626                                           BANK     01                                    
050127,000120: 01,2626                                           COUNT    01/EXEC                               
050128,000121: 
050129,000122: 01,2626           54061        FINDVAC2           TS       EXECTEM1                              #  (SAVE CALLER'S BANK FIRST.)
050130,000123: 01,2627           10400                           CCS      VAC1USE                               
050131,000124: 01,2630           12643                           TCF      VACFOUND                              
050132,000125: 01,2631           10454                           CCS      VAC2USE                               
050133,000126: 01,2632           12643                           TCF      VACFOUND                              
050134,000127: 01,2633           10530                           CCS      VAC3USE                               
050135,000128: 01,2634           12643                           TCF      VACFOUND                              
050136,000129: 01,2635           10604                           CCS      VAC4USE                               
050137,000130: 01,2636           12643                           TCF      VACFOUND                              
050138,000131: 01,2637           10660                           CCS      VAC5USE                               
050139,000132: 01,2640           12643                           TCF      VACFOUND                              
050140,000133: 01,2641           05604                           TC       BAILOUT                               
050141,000134: 01,2642           01201                           OCT      1201                                  #  NO VAC AREAS.
050142,000135: 
050143,000136: 01,2643           64711        VACFOUND           AD       TWO                                   #  RESERVE THIS VAC AREA BY STORING A ZERO
050144,000137: 01,2644           22007                           ZL                                             #  IN ITS VAC USE REGISTER AND STORE THE
050145,000138: 01,2645           50000                           INDEX    A                                     #  ADDRESS OF THE FIRST WORD OF IT IN THE
050146,000139: 01,2646           21777                           LXCH     0          -1                         #  LOW NINE BITS OF THE PRIORITY WORD.
050147,000140: 01,2647           26063                           ADS      NEWPRIO                               
050148,000141: 
050149,000142: 01,2650           34714        NOVAC2             CAF      ZERO                                  #  NOVAC ENTERS HERE. FIND A CORE SET.
050150,000143: 01,2651           54064                           TS       LOCCTR                                
050151,000144: 01,2652           32657                           CAF      NO.CORES                              #  SEVEN SETS OF ELEVEN REGISTERS EACH.
050152,000145: 01,2653           54062        NOVAC3             TS       EXECTEM2                              
050153,000146: 01,2654           50064                           INDEX    LOCCTR                                
050154,000147: 01,2655           10167                           CCS      PRIORITY                              #  EACH PRIORITY REGISTER CONTAINS -0 IF
050155,000148: 01,2656           12717                           TCF      NEXTCORE                              #  THE CORRESPONDING CORE SET IS AVAILABLE.
050156,000149: 01,2657           00006        NO.CORES           DEC      6          B-14                       
050157,000150: 01,2660           12717                           TCF      NEXTCORE                              #  AN ACTIVE JOB HAS A POSITIVE PRIORITY
050158,000151:                                                                                                  #                                          BUT A DORMANT JOB'S PRIORITY IS NEGATIVE
050159,000152: 

Page 1179

050161,000154: 01,2661           30063        CORFOUND           CA       NEWPRIO                               #  SET THE PRIORITY OF THIS JOB IN THE CORE
050162,000155: 01,2662           50064                           INDEX    LOCCTR                                #  SET'S PRIORITY REGISTER AND SET THE
050163,000156: 01,2663           54167                           TS       PRIORITY                              #  JOB'S PUSH-DOWN POINTER AT THE BEGINNING
050164,000157: 01,2664           74741                           MASK     LOW9                                  #  OF THE WORK AREA AND OVERFLOW INDICATOR
050165,000158: 01,2665           50064                           INDEX    LOCCTR                                
050166,000159: 01,2666           54166                           TS       PUSHLOC                               #  OFF TO PREPARE FOR INTERPRETIVE PROGRAMS
050167,000160: 
050168,000161: 01,2667           10064                           CCS      LOCCTR                                #  IF CORE SET ZERO IS BEING LOADED, SET UP
050169,000162: 01,2670           12704                           TCF      SETLOC                                #  OVFIND AND FIXLOC IMMEDIATELY .
050170,000163: 01,2671           54121                           TS       OVFIND                                
050171,000164: 01,2672           30166                           CA       PUSHLOC                               
050172,000165: 01,2673           54120                           TS       FIXLOC                                
050173,000166: 
050174,000167: 01,2674           10067        SPECTEST           CCS      NEWJOB                                #  SEE IF ANY ACTIVE JOBS WAITING (RARE).
050175,000168: 01,2675           12704                           TCF      SETLOC                                #  MUST BE AWAKENED BUT UNCHANGED JOB.
050176,000169: 01,2676           05642                           TC       CCSHOLE                               
050177,000170: 01,2677           05642                           TC       CCSHOLE                               
050178,000171: 01,2700           54067                           TS       NEWJOB                                #  +0 SHOWS ACTIVE JOB ALREADY SET.
050179,000172: 01,2701           52066                           DXCH     NEWLOC                                
050180,000173: 01,2702           52165                           DXCH     LOC                                   
050181,000174: 01,2703           15115                           TCF      ENDFIND                               
050182,000175: 
050183,000176: 01,2704           52066        SETLOC             DXCH     NEWLOC                                #  SET UP THE LOCATION REGISTERS FOR THIS
050184,000177: 01,2705           50064                           INDEX    LOCCTR                                
050185,000178: 01,2706           52165                           DXCH     LOC                                   
050186,000179: 01,2707           50067                           INDEX    NEWJOB                                #  THIS INDEX INSTRUCTION INSURES THAT THE
050187,000180: 01,2710           40167                           CS       PRIORITY                              #  HIGHEST ACTIVE PRIORITY WILL BE COMPARED
050188,000181: 01,2711           60063                           AD       NEWPRIO                               #  WITH THE NEW PRIORITY TO SEE IF NEWJOB
050189,000182: 01,2712           00006                           EXTEND                                         #  SHOULD BE SET TO SIGNAL A SWITCH.
050190,000183: 01,2713           65115                           BZMF     ENDFIND                               
050191,000184: 01,2714           30064                           CA       LOCCTR                                #  LOCCTR IS LEFT SET AT THIS CORE SET IF
050192,000185: 01,2715           54067                           TS       NEWJOB                                #  THE CALLER WANTS TO LOAD ANY MPAC
050193,000186: 01,2716           15115                           TCF      ENDFIND                               #  REGISTERS, ETC.
050194,000187: 
050195,000188: 01,2717           33054        NEXTCORE           CAF      COREINC                               
050196,000189: 01,2720           26064                           ADS      LOCCTR                                
050197,000190: 01,2721           10062                           CCS      EXECTEM2                              
050198,000191: 01,2722           12653                           TCF      NOVAC3                                
050199,000192: 01,2723           05604                           TC       BAILOUT                               #  NO CORE SETS.
050200,000193: 01,2724           01202                           OCT      1202                                  
050201,000194: 

Page 1180

050203,000196:                                                                                                  #           THE FOLLOWING ROUTINE SWAPS CORE SET 0 WITH THAT WHOSE RELATIVE ADDRESS IS IN NEWJOB.
050204,000197: 
050205,000198: 01,2725           22164                 -2        LXCH     LOC                                   
050206,000199: 01,2726           30165                 -1        CAE      BANKSET                               #  BANKSET, NOT BBANK, HAS RIGHT CONTENTS.
050207,000200: 01,2727           00004        CHANJOB            INHINT                                         
050208,000201: 01,2730           00006                           EXTEND                                         
050209,000202: 01,2731           04007                           ROR      SUPERBNK                              #  PICK UP CURRENT SBANK FOR BBCON
050210,000203: 01,2732           56001                           XCH      L                                     #  LOC IN A AND BBCON IN L.
050211,000204: 01,2733           50067                 +4        INDEX    NEWJOB                                #  SWAP LOC AND BANKSET.
050212,000205: 01,2734           52165                           DXCH     LOC                                   
050213,000206: 01,2735           52165                           DXCH     LOC                                   
050214,000207: 
050215,000208: 01,2736           30165                           CAE      BANKSET                               
050216,000209: 01,2737           00006                           EXTEND                                         
050217,000210: 01,2740           01007                           WRITE    SUPERBNK                              #  SET SBANK FOR NEW JOB.
050218,000211: 01,2741           52155                           DXCH     MPAC                                  #  SWAP MULTI-PURPOSE ACCUMULATOR AREAS.
050219,000212: 01,2742           50067                           INDEX    NEWJOB                                
050220,000213: 01,2743           52155                           DXCH     MPAC                                  
050221,000214: 01,2744           52155                           DXCH     MPAC                                  
050222,000215: 01,2745           52157                           DXCH     MPAC       +2                         
050223,000216: 01,2746           50067                           INDEX    NEWJOB                                
050224,000217: 01,2747           52157                           DXCH     MPAC       +2                         
050225,000218: 01,2750           52157                           DXCH     MPAC       +2                         
050226,000219: 01,2751           52161                           DXCH     MPAC       +4                         
050227,000220: 01,2752           50067                           INDEX    NEWJOB                                
050228,000221: 01,2753           52161                           DXCH     MPAC       +4                         
050229,000222: 01,2754           52161                           DXCH     MPAC       +4                         
050230,000223: 01,2755           52163                           DXCH     MPAC       +6                         
050231,000224: 01,2756           50067                           INDEX    NEWJOB                                
050232,000225: 01,2757           52163                           DXCH     MPAC       +6                         
050233,000226: 01,2760           52163                           DXCH     MPAC       +6                         
050234,000227: 
050235,000228: 01,2761           34714                           CAF      ZERO                                  
050236,000229: 01,2762           56121                           XCH      OVFIND                                #  MAKE PUSHLOC NEGATIVE IF OVFIND NZ.
050237,000230: 01,2763           00006                           EXTEND                                         
050238,000231: 01,2764           12767                           BZF      +3                                    
050239,000232: 01,2765           40166                           CS       PUSHLOC                               
050240,000233: 01,2766           54166                           TS       PUSHLOC                               
050241,000234: 
050242,000235: 01,2767           52167                           DXCH     PUSHLOC                               
050243,000236: 01,2770           50067                           INDEX    NEWJOB                                
050244,000237: 01,2771           52167                           DXCH     PUSHLOC                               
050245,000238: 01,2772           52167                           DXCH     PUSHLOC                               #  SWAPS PUSHLOC AND PRIORITY.
050246,000239: 01,2773           34741                           CAF      LOW9                                  #  SET FIXLOC TO BASE OF VAC AREA.
050247,000240: 01,2774           70167                           MASK     PRIORITY                              
050248,000241: 01,2775           54120                           TS       FIXLOC                                
050249,000242: 
050250,000243: 01,2776           10166                           CCS      PUSHLOC                               #  SET OVERFLOW INDICATOR ACCORDING TO
050251,000244: 01,2777           34714                           CAF      ZERO                                  
050252,000245: 01,3000           13005                           TCF      ENDPRCHG   -1                         

Page 1181

050254,000247: 01,3001           40166                           CS       PUSHLOC                               
050255,000248: 01,3002           54166                           TS       PUSHLOC                               
050256,000249: 01,3003           34712                           CAF      ONE                                   
050257,000250: 01,3004           56121                           XCH      OVFIND                                
050258,000251: 01,3005           54067                           TS       NEWJOB                                
050259,000252: 
050260,000253: 01,3006           00003        ENDPRCHG           RELINT                                         
050261,000254: 01,3007           52165                           DXCH     LOC                                   #  BASIC JOBS HAVE POSITIVE ADDRESSES, SO
050262,000255: 01,3010           00006                           EXTEND                                         #  DISPATCH WITH A DTCB.
050263,000256: 01,3011           63013                           BZMF     +2                                    #  IF INTERPRETIVE, SET UP EBANK, ETC.
050264,000257: 01,3012           52006                           DTCB                                           
050265,000258: 

Page 1182

050267,000260: 01,3013           40000                           COM                                            #  EPILOGUE TO JOB CHANGE FOR INTERPRETIVE
050268,000261: 01,3014           64712                           AD       ONE                                   
050269,000262: 01,3015           54164                           TS       LOC                                   #  RESUME.
050270,000263: 01,3016           16017                           TCF      INTRSM                                
050271,000264: 
050272,000265:                                                                                                  #           COMPLETE JOBSLEEP PREPARATIONS.
050273,000266: 
050274,000267: 01,3017           00004        JOBSLP1            INHINT                                         
050275,000268: 01,3020           40167                           CS       PRIORITY                              #  NNZ PRIORITY SHOWS JOB ASLEEP.
050276,000269: 01,3021           54167                           TS       PRIORITY                              
050277,000270: 01,3022           36043                           CAF      LOW7                                  
050278,000271: 01,3023           70006                           MASK     BBANK                                 
050279,000272: 01,3024           00006                           EXTEND                                         
050280,000273: 01,3025           04007                           ROR      SUPERBNK                              #  SAVE OLD SUPERBANK VALUE.
050281,000274: 01,3026           54165                           TS       BANKSET                               
050282,000275: 01,3027           44714                           CS       ZERO                                  
050283,000276: 01,3030           54131        JOBSLP2            TS       BUF        +1                         #  HOLDS - HIGHEST PRIORITY.
050284,000277: 01,3031           13141                           TCF      EJSCAN                                #  SCAN FOR HIGHEST PRIORITY ALA ENDOFJOB.
050285,000278: 
050286,000279: 01,3032           00004        NUCHANG2           INHINT                                         #  QUICK... DONT LET NEWJOB CHANGE TO +0 .
050287,000280: 01,3033           10067                           CCS      NEWJOB                                
050288,000281: 01,3034           13037                           TCF      +3                                    #  NEWJOB STILL PNZ
050289,000282: 01,3035           00003                           RELINT                                         #  NEW JOB HAS CHANGED TO +0. WAKE UP JOB
050290,000283: 01,3036           13233                           TCF      ADVAN      +2                         #  VIA NUDIRECT. (VERY RARE CASE.)
050291,000284: 
050292,000285: 01,3037           34711                           CAF      TWO                                   
050293,000286: 01,3040           00006                           EXTEND                                         
050294,000287: 01,3041           05011                           WOR      DSALMOUT                              #  TURN ON ACTIVITY LIGHT
050295,000288: 01,3042           52165                           DXCH     LOC                                   #  AND SAVE ADDRESS INFO FOR BENEFIT OF
050296,000289: 01,3043           12733                           TCF      CHANJOB    +          4               #   POSSIBLE SLEEPING JOB.
050297,000290: 

Page 1183

050299,000292:                                                                                                  #           TO WAKE UP A JOB, EACH CORE SET IS FOUND TO LOCATE ALL JOBS WHICH ARE ASLEEP. IF THE FCADR IN THE
050300,000293:                                                                                                  #  LOC REGISTER OF ANY SUCH JOB MATCHES THAT SUPPLIED BY THE CALLER, THAT JOB IS AWAKENED. IF NO JOB IS FOUND,
050301,000294:                                                                                                  #  LOCCTR IS SET TO -1 AND NO FURTHER ACTION TAKES PLACE.
050302,000295: 
050303,000296: 01,3044           54061        JOBWAKE2           TS       EXECTEM1                              
050304,000297: 01,3045           34714                           CAF      ZERO                                  #  BEGIN CORE SET SCAN.
050305,000298: 01,3046           54064                           TS       LOCCTR                                
050306,000299: 01,3047           32657                           CAF      NO.CORES                              
050307,000300: 01,3050           54062        JOBWAKE4           TS       EXECTEM2                              
050308,000301: 01,3051           50064                           INDEX    LOCCTR                                
050309,000302: 01,3052           10167                           CCS      PRIORITY                              
050310,000303: 01,3053           13056                           TCF      JOBWAKE3                              #  ACTIVE JOB - CHECK NEXT CORE SET.
050311,000304: 01,3054           00014        COREINC            DEC      12         B-14                       #  12 REGISTERS PER CORE SET.
050312,000305: 01,3055           13065                           TCF      WAKETEST                              #  SLEEPING JOB - SEE IF CADR MATCHES.
050313,000306: 
050314,000307: 01,3056           33054        JOBWAKE3           CAF      COREINC                               
050315,000308: 01,3057           26064                           ADS      LOCCTR                                
050316,000309: 01,3060           10062                           CCS      EXECTEM2                              
050317,000310: 01,3061           13050                           TCF      JOBWAKE4                              
050318,000311: 01,3062           44712                           CS       ONE                                   #  EXIT IF SLEEPING JOB NOT FOUND.
050319,000312: 01,3063           54064                           TS       LOCCTR                                
050320,000313: 01,3064           15115                           TCF      ENDFIND                               
050321,000314: 
050322,000315: 01,3065           40065        WAKETEST           CS       NEWLOC                                
050323,000316: 01,3066           50064                           INDEX    LOCCTR                                
050324,000317: 01,3067           60164                           AD       LOC                                   
050325,000318: 01,3070           00006                           EXTEND                                         
050326,000319: 01,3071           13073                           BZF      +2                                    #  IF MATCH.
050327,000320: 01,3072           13056                           TCF      JOBWAKE3                              #  EXAMINE NEXT CORE SET IF NO MATCH.
050328,000321: 
050329,000322: 01,3073           50064                           INDEX    LOCCTR                                #  RE-COMPLEMENT PRIORITY TO SHOW JOB AWAKE
050330,000323: 01,3074           40167                           CS       PRIORITY                              
050331,000324: 01,3075           54063                           TS       NEWPRIO                               
050332,000325: 01,3076           50064                           INDEX    LOCCTR                                
050333,000326: 01,3077           54167                           TS       PRIORITY                              
050334,000327: 
050335,000328: 01,3100           44364                           CS       FBANKMSK                              #  MAKE UP THE 2CADR OF THE WAKE ADDRESS
050336,000329: 01,3101           70065                           MASK     NEWLOC                                #  USING THE CADR IN NEWLOC AND THE EBANK
050337,000330: 01,3102           64700                           AD       2K                                    #  HALF OF BBANK SAVED IN BANKSET.
050338,000331: 01,3103           56065                           XCH      NEWLOC                                
050339,000332: 01,3104           74364                           MASK     FBANKMSK                              
050340,000333: 01,3105           50064                           INDEX    LOCCTR                                
050341,000334: 01,3106           60165                           AD       BANKSET                               
050342,000335: 01,3107           54066                           TS       NEWLOC     +1                         
050343,000336: 
050344,000337: 01,3110           10064                           CCS      LOCCTR                                #  SPECIAL TREATMENT IF THIS JOB WAS
050345,000338: 01,3111           12704                           TCF      SETLOC                                #  ALREADY IN THE RUN (0) POSITION.
050346,000339: 01,3112           12674                           TCF      SPECTEST                              
050347,000340: 

Page 1184

050349,000342:                                                                                                  #           PRIORITY CHANGE. CHANGE THE CONTENTS OF PRIORITY AND SCAN FOR THE JOB OF HIGHEST PRIORITY.
050350,000343: 
050351,000344: 01,3113           54164        PRIOCH2            TS       LOC                                   
050352,000345: 01,3114           34714                           CAF      ZERO                                  #  SET FLAG TO TELL ENDJOB SCANNER IF THIS
050353,000346: 01,3115           54130                           TS       BUF                                   #  JOB IS STILL HIGHEST PRIORITY.
050354,000347: 01,3116           34741                           CAF      LOW9                                  
050355,000348: 01,3117           70167                           MASK     PRIORITY                              
050356,000349: 01,3120           60063                           AD       NEWPRIO                               
050357,000350: 01,3121           54167                           TS       PRIORITY                              
050358,000351: 01,3122           40000                           COM                                            
050359,000352: 01,3123           13030                           TCF      JOBSLP2                               #  AND TO EJSCAN.
050360,000353: 

Page 1185

050362,000355:                                                                                                  #           RELEASE THIS CORE SET AND VAC AREA AND SCAN FOR THE JOB OF HIGHEST ACTIVE PRIORITY.
050363,000356: 
050364,000357: 01,3124           00004        ENDJOB1            INHINT                                         
050365,000358: 01,3125           44714                           CS       ZERO                                  
050366,000359: 01,3126           54131                           TS       BUF        +1                         
050367,000360: 01,3127           56167                           XCH      PRIORITY                              
050368,000361: 01,3130           74741                           MASK     LOW9                                  
050369,000362: 01,3131           54001                           TS       L                                     
050370,000363: 
050371,000364: 01,3132           45121                           CS       FAKEPRET                              
050372,000365: 01,3133           60001                           AD       L                                     
050373,000366: 
050374,000367: 01,3134           00006                           EXTEND                                         
050375,000368: 01,3135           63141                           BZMF     EJSCAN                                #  NOVAC ENDOFJOB
050376,000369: 
050377,000370: 01,3136           10001                           CCS      L                                     
050378,000371: 01,3137           50000                           INDEX    A                                     
050379,000372: 01,3140           54000                           TS       0                                     
050380,000373: 
050381,000374: 01,3141           10203        EJSCAN             CCS      PRIORITY   +12D                       
050382,000375: 01,3142           03206                           TC       EJ1                                   
050383,000376: 01,3143           05642                           TC       CCSHOLE                               
050384,000377: 01,3144           13145                           TCF      +1                                    
050385,000378: 
050386,000379: 01,3145           10217                           CCS      PRIORITY   +24D                       #  EXAMINE EACH PRIORITY REGISTER TO FIND
050387,000380: 01,3146           03206                           TC       EJ1                                   #  THE JOB OF HIGHEST ACTIVE PRIORITY.
050388,000381: 01,3147           05642                           TC       CCSHOLE                               
050389,000382: 01,3150           13151                           TCF      +1                                    
050390,000383: 
050391,000384: 01,3151           10233                           CCS      PRIORITY   +36D                       
050392,000385: 01,3152           03206                           TC       EJ1                                   
050393,000386: 01,3153           67610        -CCSPR             -CCS     PRIORITY                              
050394,000387: 01,3154           13155                           TCF      +1                                    
050395,000388: 
050396,000389: 01,3155           10247                           CCS      PRIORITY   +48D                       
050397,000390: 01,3156           03206                           TC       EJ1                                   
050398,000391: 01,3157           05642                           TC       CCSHOLE                               
050399,000392: 01,3160           13161                           TCF      +1                                    
050400,000393: 
050401,000394: 01,3161           10263                           CCS      PRIORITY   +60D                       
050402,000395: 01,3162           03206                           TC       EJ1                                   
050403,000396: 01,3163           05642                           TC       CCSHOLE                               
050404,000397: 01,3164           13165                           TCF      +1                                    
050405,000398: 
050406,000399: 01,3165           10277                           CCS      PRIORITY   +72D                       
050407,000400: 01,3166           03206                           TC       EJ1                                   
050408,000401: 01,3167           05642                           TC       CCSHOLE                               
050409,000402: 01,3170           13171                           TCF      +1                                    
050410,000403: 

Page 1186

050412,000405:                                                                                                  #           EVALUATE THE RESULTS OF THE SCAN.
050413,000406: 
050414,000407: 01,3171           10131                           CCS      BUF        +1                         #  SEE IF THERE ARE ANY ACTIVE JOBS WAITING
050415,000408: 01,3172           05642                           TC       CCSHOLE                               
050416,000409: 01,3173           05642                           TC       CCSHOLE                               
050417,000410: 
050418,000411: 01,3174           13176                           TCF      +2                                    
050419,000412: 01,3175           13223                           TCF      DUMMYJOB                              
050420,000413: 01,3176           10130                           CCS      BUF                                   #  BUF IS ZERO IF THIS IS A PRIOCHNG AND
050421,000414: 01,3177           13201                           TCF      +2                                    #  CHANGED PRIORITY IS STILL HIGHEST.
050422,000415: 01,3200           13005                           TCF      ENDPRCHG   -1                         
050423,000416: 
050424,000417: 01,3201           50000                           INDEX    A                                     #  OTHERWISE, SET NEWJOB TO THE RELATIVE
050425,000418: 01,3202           27777                           CAF      0          -1                         #  ADDRESS OF THE NEW JOB'S CORE SET.
050426,000419: 01,3203           63153                           AD       -CCSPR                                
050427,000420: 01,3204           54067                           TS       NEWJOB                                
050428,000421: 01,3205           12725                           TCF      CHANJOB    -2                         
050429,000422: 
050430,000423: 01,3206           54132        EJ1                TS       BUF        +2                         
050431,000424: 01,3207           60131                           AD       BUF        +1                         #  - OLD HIGH PRIORITY.
050432,000425: 01,3210           10000                           CCS      A                                     
050433,000426: 01,3211           40132                           CS       BUF        +2                         
050434,000427: 01,3212           13216                           TCF      EJ2                                   #  NEW HIGH PRIORITY.
050435,000428: 01,3213           13214                           NOOP                                           
050436,000429: 01,3214           50002                           INDEX    Q                                     
050437,000430: 01,3215           00002                           TC       2                                     #  PROCEED WITH SEARCH.
050438,000431: 
050439,000432: 01,3216           54131        EJ2                TS       BUF        +1                         
050440,000433: 01,3217           00006                           EXTEND                                         
050441,000434: 01,3220           22130                           QXCH     BUF                                   #  FOR LOCATING CCS PRIORITY + X INSTR.
050442,000435: 01,3221           50130                           INDEX    BUF                                   
050443,000436: 01,3222           00002                           TC       2                                     
050444,000437: 

Page 1187

050446,000439:                                                                                                  #           IDLING AND COMPUTER ACTIVITY (GREEN) LIGHT MAINTENANCE. THE IDLING ROUTINE IS NOT A JOB IN ITSELF,
050447,000440:                                                                                                  #  BUT RATHER A SUBROUTINE OF THE EXECUTIVE.
050448,000441: 
050449,000442: 01,3223     1361                                  EBANK=   SELFRET                               #  SELF-CHECK STORAGE IN EBANK.
050450,000443: 
050451,000444: 01,3223           44714        DUMMYJOB           CS       ZERO                                  #  SET NEWJOB TO -0 FOR IDLING.
050452,000445: 01,3224           54067                           TS       NEWJOB                                
050453,000446: 01,3225           00003                           RELINT                                         
050454,000447: 01,3226           44711                           CS       TWO                                   #  TURN OFF THE ACTIVITY LIGHT.
050455,000448: 01,3227           00006                           EXTEND                                         
050456,000449: 01,3230           03011                           WAND     DSALMOUT                              
050457,000450: 01,3231           10067        ADVAN              CCS      NEWJOB                                #  IS A NEWJOB ACTIVE ?
050458,000451: 01,3232           13032                           TCF      NUCHANG2                              #  YES... ONE REQUIRING A CHANGE JOB.
050459,000452: 01,3233           34711                           CAF      TWO                                   #  NEW JOB ALREADY IN POSITION FOR
050460,000453: 01,3234           13242                           TCF      NUDIRECT                              #  EXECUTION.
050461,000454: 
050462,000455: 01,3235           31361                           CA       SELFRET                               
050463,000456: 01,3236           54001                           TS       L                                     #  PUT RETURN ADDRESS IN L.
050464,000457: 01,3237           33241                           CAF      SELFBANK                              
050465,000458: 01,3240           15123                           TCF      SUPDXCHZ   +          1               #   AND DISPATCH JOB.
050466,000459: 
050467,000460: 01,3241     1361                                  EBANK=   SELFRET                               
050468,000461: 01,3241           66102        SELFBANK           BBCON    SELFCHK                               
050469,000462: 
050470,000463: 01,3242           00006        NUDIRECT           EXTEND                                         #  TURN THE GREEN LIGHT BACK ON.
050471,000464: 01,3243           05011                           WOR      DSALMOUT                              
050472,000465: 01,3244           52165                           DXCH     LOC                                   #  JOBS STARTED IN THIS FASHION MUST BE
050473,000466: 01,3245           15122                           TCF      SUPDXCHZ                              
050474,000467: 
050475,000468:    5122                                           BLOCK    2                                     #  IN FIXED-FIXED SO OTHERS MAY USE.
050476,000469: 
050477,000470:    5122                                           COUNT    02/EXEC                               
050478,000471: 
050479,000472:                                                                                                  #  SUPDXCHZ - ROUTINE TO TRANSFER TO SUPERBANK.
050480,000473:                                                                                                  #  CALLING SEQUENCE
050481,000474:                                                                                                  #                TCF     SUPDXCHZ        WITH 2CADR OF DESIRED LOCATION IN A + L.
050482,000475: 
050483,000476:    5122           56001        SUPDXCHZ           XCH      L                                     #  BASIC.
050484,000477:    5123           00006                 +1        EXTEND                                         
050485,000478:    5124           01007                           WRITE    SUPERBNK                              
050486,000479:    5125           54006                           TS       BBANK                                 
050487,000480:    5126           00001                           TC       L                                     
050488,000481: 
050489,000482:    5127           77677        NEG100             OCT      77677                                 

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