Source Code
These source-code files were obtained by digitally photographing
a Solarium 55 (Apollo 6) program listing from the American Computer Museum in
Bozeman, Montana. Photography was by Ron Burkey, with assistance from
museum curator George Keremedjiev and Montana
State University curator Kim Scott. The listing originally belonged to Eldon C. Hall,
who donated it to the museum. Volunteers then manually typed in the
source code or else modified similar pre-existing Colossus 249
(Apollo 9) source files to incorporate changes, although this transcription was
principally done by Jim Lawton and corrected by Ron Burkey.
Notations on the program listing read, in part:YUL SYSTEM FOR AGC4: REVISION 0 OF PROGRAM SOLRUM55 BY NASA 1021108-021 DEC. 4, 1966Note that the date is the date of the printout, not the date of the program revision. Due to statements by Jay Sampson, the original contractor from AC Electronics who created Solarium 54 (Apollo 4) from the earlier Corona (AS-202 mission) program, it is believed that Solarium 54 and Solarium 55 (Apollo 6) are actually identical programs. The change in numbering, from 54 to 55, is believed to be for some administrative purpose. Thus, it is believed that the source-code represented here is equally appropriate for both Apollo 4 and Apollo 6 missions. |
003812,000002: ## Copyright: Public domain.
003813,000003: ## Filename: EXECUTIVE.agc
003814,000004: ## Purpose: Part of the source code for Solarium build 55. This
003815,000005: ## is for the Command Module's (CM) Apollo Guidance
003816,000006: ## Computer (AGC), for Apollo 6.
003817,000007: ## Assembler: yaYUL --block1
003818,000008: ## Contact: Jim Lawton <jim DOT lawton AT gmail DOT com>
003819,000009: ## Website: www.ibiblio.org/apollo/index.html
003820,000010: ## Page Scans: www.ibiblio.org/apollo/ScansForConversion/Solarium055/
003821,000011: ## Mod history: 2009-09-19 JL Created.
003822,000012: ## 2016-08-18 RSB Some fixes.
003823,000013: ## 2016-12-28 RSB Proofed comment text using octopus/ProoferComments,
003824,000014: ## and fixed errors found.
003825,000015:
Page 98 |
003827,000017:
003828,000018: # EXECUTIVE PROGRAMS
003829,000019: # --------- --------
003830,000020:
003831,000021:
003832,000022:
003833,000023: 2046 BANK 1
003834,000024: 2046 50577 FINDVAC TS NEWPRIO # PROGRAM TO FIND AN AVAILABLE VAC
003835,000025: 2047 30001 XCH Q
003836,000026: 2050 02065 TC EXECCOM # COMMON FF EXECUTIVE SUBROUTINE.
003837,000027: 2051 06004 TC FINDVAC2 # OFF TO EXECUTIVE BANK.
003838,000028:
003839,000029: 2052 50577 NOVAC TS NEWPRIO # ENTRY EXCLUSIVELY FOR BASIC JOBS NOT
003840,000030: 2053 30001 XCH Q # REQUIRING A VAC AREA.
003841,000031: 2054 02065 TC EXECCOM # COMMON FF EXECUTIVE SUBROUTINE.
003842,000032: 2055 35501 CAF ZERO # ZERO PD FIELD IN PUSHLOC.
003843,000033: 2056 50574 TS EXECTEM3
003844,000034: 2057 06027 TC NOVAC2
003845,000035:
003846,000036: 2060 50573 JOBWAKE TS EXECTEM2 # ENTRY HERE TO RE-ACTIVATE A SLEEPING JOB
003847,000037: 2061 10001 CCS Q # RETURN ADDRESS - 1 TO WTEXIT.
003848,000038: 2062 50600 TS WTEXIT # SHARES FINAL PORTION OF FINDVAC, NOVAC.
003849,000039: 2063 02071 TC EXECSW # COMMON EXEC BANK-SWITCH SUBROUTINE.
003850,000040: 2064 06110 TC JOBWAKE2
003851,000041:
003852,000042: 2065 50600 EXECCOM TS WTEXIT # EXIT ADDRESS
003853,000043: 2066 20000 INDEX A # PICK UP JOB OR TASK ADDRESS.
003854,000044: 2067 30000 CAF 0 # (USED BY FINDVAC, NOVAC, AND WAITLIST)
003855,000045: 2070 50573 TS EXECTEM2
003856,000046:
003857,000047: 2071 32075 EXECSW CAF EXECBANK
003858,000048: 2072 30015 XCH BANKREG # CALL IN EXEC BANK, SAVING RETURN.
003859,000049: 2073 50572 TS EXECTEM1
003860,000050: 2074 00001 TC Q
003861,000051:
003862,000052: 2075 10004 EXECBANK CADR FINDVAC2
003863,000053:
003864,000054: 2076 50015 FOUNDVAC TS BANKREG # COMES HERE TO RETURN FROM FINDVAC,
003865,000055: 2077 20600 INDEX WTEXIT # NOVAC, OR JOBWAKE.
003866,000056: 2100 00001 TC 1
003867,000057:
Page 99 |
003869,000059:
003870,000060: # CALLS TO FINDVAC BEGIN HERE, SNATCHING AN AVAILABLE VAC AREA.
003871,000061:
003872,000062: 04,6000 SETLOC 10000 # EXEC/WAITLIST BANK.
003873,000063:
003874,000064: 04,6000 06705 SLAPB TC SLAP1
003875,000065:
003876,000066: 04,6001 07363 KEYRUPTC TC KEYRUPT1 # STANDARD LOC, DONT MOVE
003877,000067:
003878,000068: 04,6002 06653 MODROUTB TC MODROUT # STANDARD LOC, DONT MOVE
003879,000069:
003880,000070: 04,6003 06525 SVCT3 TC SVCT3X # STANDARD LOC.
003881,000071:
003882,000072: 04,6004 10216 FINDVAC2 CCS VAC1USE # C(VAC1USE) = TC VAC1USE IF VAC1 IS
003883,000073: 04,6005 06020 TC FV1 # AVAILABLE, OR +0 IF IT IS IN USE.
003884,000074: 04,6006 10272 CCS VAC2USE
003885,000075: 04,6007 06020 TC FV1 # THE FIRST CCS WITH +0 JUMPS TO THE
003886,000076: 04,6010 10346 CCS VAC3USE # CORRESPONDING TC ORDER.
003887,000077: 04,6011 06020 TC FV1
003888,000078: 04,6012 10422 CCS VAC4USE
003889,000079: 04,6013 06020 TC FV1
003890,000080: 04,6014 10476 CCS VAC5USE
003891,000081: 04,6015 06020 TC FV1
003892,000082:
003893,000083: 04,6016 03044 TC ABORT # NO VAC AREAS AVAILABLE.
003894,000084: 04,6017 01201 OCT 01201
003895,000085:
003896,000086: 04,6020 65503 FV1 AD TWO # TO FORM ADDRESS OF ASSIGNED VAC AREA.
003897,000087: 04,6021 50574 TS EXECTEM3
003898,000088: 04,6022 60577 AD NEWPRIO # ) STORE ADDRESS OF VAC1 IN LOW-ORDER
003899,000089: 04,6023 50577 TS NEWPRIO # ) 9 BITS OF NEWPRIO.
003900,000090:
003901,000091: 04,6024 35501 CAF ZERO # )
003902,000092: 04,6025 20574 INDEX EXECTEM3 # ) STORE +0 IN VAC1USE, INDICATING USE.
003903,000093: 04,6026 47777 TS 0 -1 # )
003904,000094:
003905,000095: 04,6027 36042 NOVAC2 CAF LASTADR # RELATIVE ADDRESS OF LAST REGISTER SET.
003906,000096: 04,6030 50601 TS LOCCTR
003907,000097: 04,6031 10000 CCS A
003908,000098: 04,6032 06037 TC +5 # PNZ AND -0 ONLY.
003909,000099:
003910,000100: 04,6033 40573 12BITSOK CS EXECTEM2 # COMES HERE IF JOB ADDRESS LESS THAN 6K.
003911,000101: 04,6034 06067 TC LOCSET
003912,000102:
003913,000103: 04,6035 03044 TC ABORT # NO REGISTER SETS AVAILABLE.
003914,000104: 04,6036 01202 OCT 01202
003915,000105:
003916,000106: 04,6037 20601 +5 INDEX LOCCTR # THIS LOOP FINDS THE FIRST AVAILABLE
003917,000107: 04,6040 10124 CCS PRIORITY # STORAGE AREA FOR CORE REGISTERS FOR
003918,000108: 04,6041 06105 TC NOVAC3 # THE NEW JOB.
003919,000109: 04,6042 00070 LASTADR DEC 56 B-14 # EIGHT SETS OF EIGHT REGISTERS.
Page 100 |
003921,000111: 04,6043 06105 TC NOVAC3 # NNZ MEANS JOB ASLEEP HERE.
003922,000112:
Page 101 |
003924,000114:
003925,000115: # NOW THAT REGISTER SETS HAVE BEEN FOUND FOR THE NEW JOB, INITIALIZE THEM AND SET NEWJOB IF CALLED FOR.
003926,000116:
003927,000117: 04,6044 20601 CORSW INDEX LOCCTR # (COMES HERE WITH C(A) = 0). TURN OFF OVF
003928,000118: 04,6045 50122 TS OVFIND
003929,000119:
003930,000120: 04,6046 60577 AD NEWPRIO # SET UP PRIORITY FOR NEW JOB.
003931,000121: 04,6047 20601 JOBWAKE4 INDEX LOCCTR # JOB WAKING ENTERS HERE TO FINISH UP.
003932,000122: 04,6050 50124 TS PRIORITY # STORE NEW PRIORITY
003933,000123: 04,6051 32261 CAF BANKMASK
003934,000124: 04,6052 70573 MASK EXECTEM2
003935,000125: 04,6053 60574 AD EXECTEM3 # PUSHLOC
003936,000126: 04,6054 20601 INDEX LOCCTR
003937,000127: 04,6055 50123 TS PUSHLOC
003938,000128:
003939,000129: 04,6056 36316 CAF EXEC70K # CREATE PROPER 12 BIT ADDRESS.
003940,000130: 04,6057 70573 MASK EXECTEM2 # SEE IF HIGH THREE BITS ZERO.
003941,000131: 04,6060 10000 CCS A
003942,000132: 04,6061 06063 TC +2 # NEEDS SPECIAL TREATMENT IF C(A) NOT ZERO
003943,000133: 04,6062 06033 TC 12BITSOK
003944,000134:
003945,000135: 04,6063 30573 XCH EXECTEM2
003946,000136: 04,6064 74606 MASK LOW10
003947,000137: 04,6065 64373 AD 6K
003948,000138: 04,6066 40000 COM
003949,000139: 04,6067 20601 LOCSET INDEX LOCCTR
003950,000140: 04,6070 50120 TS LOC
003951,000141:
003952,000142: 04,6071 20215 INDEX NEWJOB
003953,000143: 04,6072 40124 CS PRIORITY # TEST WHETHER NEW JOB HAS HIGHER
003954,000144: 04,6073 60577 AD NEWPRIO # PRIORITY THAN PREVIOUS HIGHEST
003955,000145: 04,6074 10000 CCS A
003956,000146: 04,6075 40601 CS LOCCTR # NEW JOB HAS HIGHER PRIORITY.
003957,000147: 04,6076 06102 TC NEWHIGH # SET NEWJOB, LEAVING LOCCTR UNCHANGED.
003958,000148:
003959,000149: 04,6077 06100 TC +1 # -0 IF PRIORITIES = AND BOTH ARE NOVACS.
003960,000150: 04,6100 30572 NOWAKE2 XCH EXECTEM1
003961,000151: 04,6101 02076 ENDFIND TC FOUNDVAC
003962,000152:
003963,000153: 04,6102 40000 NEWHIGH COM # SET NEWJOB AND RETURN TO CALLER.
003964,000154: 04,6103 50215 TS NEWJOB
003965,000155: 04,6104 06100 TC ENDFIND -1
003966,000156:
003967,000157: 04,6105 44513 NOVAC3 CS EIGHT # COMES HERE TO EXAMINE NEXT REGISTER SET.
003968,000158: 04,6106 60601 AD LOCCTR
003969,000159: 04,6107 06030 TC NOVAC2 +1
003970,000160:
Page 102 |
003972,000162:
003973,000163: # THE JOBWAKE ROUTINE REACTIVES A SLEEPING JOB, SETTING IT TO BEGIN AT THE GIVEN WAKE ADDRESS.
003974,000164:
003975,000165: 04,6110 36042 JOBWAKE2 CAF LASTADR # BEGIN SEARCH FOR REGISTER SET CONTAINING
003976,000166: 04,6111 50601 TS LOCCTR # SLEEPING JOB. WAKE ADDRESS IS IN LOC IN
003977,000167: 04,6112 10000 CCS A # CADR FORM, AS PLACED THERE BY JOBSLEEP.
003978,000168: 04,6113 20601 INDEX LOCCTR # PNZ AND -0 ONLY. SEE IF THIS JOB ASLEEP.
003979,000169: 04,6114 10124 CCS PRIORITY # THIS CCS CANT GO TO TC NOWAKE .
003980,000170: 04,6115 06140 TC JOBWAKE3 # PNZ - ACTIVE JOB PRESENT. +0 IMPOSSIBLE.
003981,000171:
003982,000172: 04,6116 06143 TC NOWAKE # ALARM - SLEEPING JOB NOT FOUND.
003983,000173:
003984,000174: 04,6117 06121 TC +2 # INACTIVE JOB FOUND.
003985,000175: 04,6120 06140 TC JOBWAKE3 # -0 - NOT IN USE.
003986,000176:
003987,000177: 04,6121 40573 +2 CS EXECTEM2 # SEE IF THIS IS THE DESIRED SLEEPING JOB.
003988,000178: 04,6122 20601 INDEX LOCCTR
003989,000179: 04,6123 60120 AD LOC
003990,000180: 04,6124 10000 CCS A
003991,000181: 04,6125 06140 TC JOBWAKE3 # SEARCH NEXT SET IF NOT AT END.
003992,000182: 04,6126 03062 TC CCSHOLE
003993,000183: 04,6127 06140 TC JOBWAKE3
003994,000184:
003995,000185: 04,6130 34606 CAF LOW10 # SET UP EXECTEM3 AND PRIORITY SO WE CAN
003996,000186: 04,6131 20601 INDEX LOCCTR # FINISH AT STANDARD CORSW .
003997,000187: 04,6132 70123 MASK PUSHLOC # PROTECT PD SETTING.
003998,000188: 04,6133 50574 TS EXECTEM3
003999,000189:
004000,000190: 04,6134 20601 INDEX LOCCTR # RE-COMPLEMENT PRIORITY AND FINISH UP.
004001,000191: 04,6135 40124 CS PRIORITY
004002,000192: 04,6136 50577 TS NEWPRIO
004003,000193: 04,6137 06047 TC JOBWAKE4
004004,000194:
004005,000195: 04,6140 44513 JOBWAKE3 CS EIGHT # ADVANCE TO NEXT REGISTER SET.
004006,000196: 04,6141 60601 AD LOCCTR
004007,000197: 04,6142 06111 TC JOBWAKE2 +1
004008,000198:
004009,000199: 04,6143 50601 NOWAKE TS LOCCTR # SET LOCCTR = +0 TO SHOW NO JOB WAS
004010,000200: 04,6144 06100 TC NOWAKE2 # AWAKENED.
004011,000201:
Page 103 |
004013,000203:
004014,000204: # A NEW JOB, OF HIGHER PRIORITY THAN THE PRESENT ONE, CAUSES THE RELA-
004015,000205: # TIVE ADDRESS (9, 18, ..., 63) OF THE NEW JOB CORE REGISTERS TO BE
004016,000206: # PLACED IN REGISTER NEWJOB , WHERE IT IS TESTED BY THE INTERPRETER.
004017,000207: # THE RESULTING BRANCH TO CHANJOB, BELOW, CAUSES A TRADE BETWEEN THE
004018,000208: # CORE REGISTERS OF THE PRESENT AND NEW JOBS.
004019,000209:
004020,000210: 2101 SETLOC FOUNDVAC +3
004021,000211:
004022,000212: 2101 20017 CHANG1 INHINT # BASIC JOBS COME HERE WHEN C(NEWJOB)
004023,000213: 2102 32075 CAF EXECBANK # NON-ZERO. START BY CALLING IN EXECUTIVE
004024,000214: 2103 30015 XCH BANKREG # BANK AND SAVING RETURN BANK CODE.
004025,000215: 2104 40000 COM
004026,000216: 2105 50061 TS BANKSET
004027,000217: 2106 30123 XCH PUSHLOC # BLANK OUT THE HIGH-ORDER 4 BITS IN
004028,000218: 2107 74606 MASK LOW10 # PUSHLOC SO THE BANK BITS CAN BE PACKED
004029,000219: 2110 50123 TS PUSHLOC # WITH IT
004030,000220: 2111 40001 CS Q # FOR RETURN, SHOWING THIS WAS A BASIC JOB
004031,000221: 2112 06145 TC CHANJOB # OFF TO BANK 0
004032,000222:
004033,000223: 2113 10066 CHANG2 CCS NEWEQIND # INTERPRETIVE INTERRUPTS START HERE,
004034,000224: 2114 00001 TC Q # PROVIDED THE LOAD INDICATOR ISNT ON
004035,000225:
004036,000226: 2115 20017 INHINT
004037,000227: 2116 32075 CAF EXECBANK # CALL IN EXECUTIVE BANK.
004038,000228: 2117 50015 TS BANKREG
004039,000229: 2120 30120 XCH LOC
004040,000230: 2121 06145 TC CHANJOB # WITH C(A) PNZ, SHOWING WE WERE IN INTERP
004041,000231: # RETER
Page 104 |
004043,000233: 04,6145 SETLOC NOWAKE +2
004044,000234: 04,6145 20215 CHANJOB INDEX NEWJOB # TO BEGIN SWAP OF CORE REGISTERS
004045,000235: 04,6146 30120 XCH LOC
004046,000236: 04,6147 50120 TS LOC # SAVE PROPER 12 BIT ADDRESS
004047,000237:
004048,000238: 04,6150 30124 XCH PRIORITY
004049,000239: 04,6151 20215 INDEX NEWJOB
004050,000240: 04,6152 30124 XCH PRIORITY
004051,000241: 04,6153 50124 TS PRIORITY
004052,000242: 04,6154 74607 MASK LOW9 # TO GET FIXLOC
004053,000243: 04,6155 50067 TS FIXLOC
004054,000244: 04,6156 64511 AD BIT6 # SET UP VACLOC ( = FIXLOC + 32D )
004055,000245: 04,6157 50070 TS VACLOC
004056,000246:
004057,000247: 04,6160 40061 CS BANKSET # SAVE BANK
004058,000248: 04,6161 60123 AD PUSHLOC # AND PUSHLOC IN SAME WORD
004059,000249: 04,6162 20215 INDEX NEWJOB
004060,000250: 04,6163 30123 XCH PUSHLOC
004061,000251: 04,6164 50123 TS PUSHLOC
004062,000252: 04,6165 74606 MASK LOW10
004063,000253: 04,6166 30123 XCH PUSHLOC
004064,000254: 04,6167 40000 COM
004065,000255: 04,6170 60123 AD PUSHLOC # WE NOW HAVE COMPLEMNT OF BANK BITS
004066,000256: 04,6171 50061 TS BANKSET
004067,000257:
004068,000258: 04,6172 40121 CS ADRLOC # SAVE MODE AND COMPLEMENT OF ADRLOC IN
004069,000259: 04,6173 60000 DOUBLE # SAME WORD. ADRLOC MUST BE SHIFTED 2
004070,000260: 04,6174 60000 DOUBLE # PLACES TO MAKE ROOM FOR MODE
004071,000261: 04,6175 60065 AD MODE # -0, -1, OR -2
004072,000262: 04,6176 20215 INDEX NEWJOB
004073,000263: 04,6177 30121 XCH ADRLOC
004074,000264: 04,6200 50021 TS SR
004075,000265: 04,6201 74473 MASK THREE # SAVE LOW 2 BITS
004076,000266: 04,6202 64341 AD NEG3 # THIS RESULTS IN EITHER -0, -1, OR -2
004077,000267: 04,6203 50065 TS MODE
004078,000268: 04,6204 40021 CS SR
004079,000269: 04,6205 40021 CS SR
004080,000270: 04,6206 50121 TS ADRLOC
004081,000271:
Page 105 |
004083,000273: 04,6207 10122 CCS OVFIND # SAVE C(ORDER) POSITIVE IF C(OVFIND) = 0
004084,000274: 04,6210 06212 TC +2 # AND NEGATIVE OTHERWISE
004085,000275: 04,6211 06214 TC +3
004086,000276: 04,6212 40063 CS ORDER
004087,000277: 04,6213 06215 TC +2
004088,000278: 04,6214 30063 XCH ORDER
004089,000279: 04,6215 20215 INDEX NEWJOB
004090,000280: 04,6216 30122 XCH OVFIND
004091,000281: 04,6217 50063 TS ORDER
004092,000282: 04,6220 10000 CCS A # DETERMINE NEW SETTING OF OVFIND
004093,000283: 04,6221 35501 CAF ZERO # TO ZERO
004094,000284: 04,6222 06226 TC OVFSET
004095,000285: 04,6223 40063 CS ORDER # ORDER WAS NEGATIVE, MAKE IT POSITIVE
004096,000286: 04,6224 50063 TS ORDER
004097,000287: 04,6225 34516 CAF ONE # TO SET OVFIND
004098,000288: 04,6226 50122 OVFSET TS OVFIND
004099,000289:
004100,000290: 04,6227 30115 XCH MPAC # TRADE C(MPAC TO MPAC+2)
004101,000291: 04,6230 20215 INDEX NEWJOB
004102,000292: 04,6231 30115 XCH MPAC
004103,000293: 04,6232 50115 TS MPAC
004104,000294: 04,6233 30116 XCH MPAC +1
004105,000295: 04,6234 20215 INDEX NEWJOB
004106,000296: 04,6235 30116 XCH MPAC +1
004107,000297: 04,6236 50116 TS MPAC +1
004108,000298: 04,6237 30117 XCH MPAC +2
004109,000299: 04,6240 20215 INDEX NEWJOB
004110,000300: 04,6241 30117 XCH MPAC +2
004111,000301: 04,6242 50117 TS MPAC +2
004112,000302:
004113,000303: 04,6243 35501 CAF ZERO
004114,000304: 04,6244 50066 TS NEWEQIND # MAKE SURE LOAD INDICATOR OFF.
004115,000305: 04,6245 50215 SETNJ TS NEWJOB
004116,000306: 04,6246 20016 RELINT # ENABLE INTERRUPT
004117,000307: 04,6247 10120 CCS LOC # C(LOC) PNZ FOR INTERPRETIVE JOBS.
004118,000308: 04,6250 35501 CAF ZERO
004119,000309: 04,6251 04026 TC DANZIG +2 # RETURN TO INTERPRETER
004120,000310: 04,6252 64516 AD ONE # GET ABS(LOC) AND RETURN TO BASIC
004121,000311: 04,6253 50062 TS ADDRWD
004122,000312: 04,6254 40061 CS BANKSET # GET DESIRED BANKBITS
004123,000313: 04,6255 02122 ENDCHANG TC BASICALL
004124,000314:
004125,000315: 2122 SETLOC CHANG2 +7D # TAKE UP WHERE WE LEFT OFF IN FIXED-FIXED
004126,000316:
004127,000317: 2122 50015 BASICALL TS BANKREG
004128,000318: 2123 00062 TC ADDRWD
Page 106 |
004130,000320:
004131,000321: 2124 32075 ENDOFJOB CAF EXECBANK # NORMAL ENDJOB ENTRY.
004132,000322: 2125 50015 TS BANKREG
004133,000323: 2126 06256 TC ENDJOB1
004134,000324:
004135,000325: 2127 50120 JOBSLEEP TS LOC # ENTRY HERE TO DE-ACTIVE THIS JOB.
004136,000326: 2130 32075 CAF EXECBANK # LOC IS SET TO THE AWAKENING ADDRESS
004137,000327: 2131 50015 TS BANKREG # SO THE SUBSEQUENT JOBWAKE CAN FIND
004138,000328: 2132 06267 TC JOBSLP1 # THE PROPER REGISTER SET.
004139,000329:
004140,000330: 04,6256 SETLOC ENDCHANG +1
004141,000331:
004142,000332: 04,6256 20017 ENDJOB1 INHINT # INTERPRETIVE JOBS FINISH WITH RTB
004143,000333: 04,6257 45501 CS ZERO # TO ENDJOB1
004144,000334: 04,6260 50100 TS BUF +1 # ENDJOB USES BUF, BUF +1, AND BUF +2.
004145,000335: 04,6261 30124 XCH PRIORITY
004146,000336: 04,6262 74607 MASK LOW9 # RESTORE AVAILABILITY OF VAC1 BY SETTING
004147,000337: 04,6263 10000 CCS A # C(VAC1USE) NON-ZERO
004148,000338: 04,6264 20000 INDEX A
004149,000339: 04,6265 50000 TS 0
004150,000340:
004151,000341: 04,6266 06274 TC EJSCAN # ENDJOB NEED NOT EXAMINE FIRST REG. SET.
004152,000342:
004153,000343: 04,6267 20017 JOBSLP1 INHINT # FINISH JOB SLEEP AND START ENDJOB-TYPE
004154,000344: 04,6270 40124 CS PRIORITY # SCAN. COMPLEMENTED PRIORITY REGISTER
004155,000345: 04,6271 50124 TS PRIORITY # SHOWS JOB IS ASLEEP.
004156,000346: 04,6272 45501 CS ZERO # INITIALIZE SEARCH FOR HIGHEST PRIORITY.
004157,000347: 04,6273 50100 TS BUF +1
004158,000348:
Page 107 |
004160,000350:
004161,000351: # SCAN FOR THE ACTIVE JOB OF HIGHEST PRIORITY.
004162,000352:
004163,000353: 04,6274 10134 EJSCAN CCS PRIORITY +8D # EACH PRIORITY REGISTER (PRIORITY +8N)
004164,000354: 04,6275 06341 TC EJ1 # IS SCANNED. ITS CONTENTS ARE EITHER
004165,000355: 04,6276 03062 TC CCSHOLE
004166,000356: 04,6277 06300 TC +1 # 2. NNZ - AN INACTIVE PRIORITY NUMBER.
004167,000357:
004168,000358: 04,6300 10144 CCS PRIORITY +16D # OR 3. -0 - NOT IN USE.
004169,000359: 04,6301 06341 TC EJ1 # IF PNZ, CONTROL IS TRANSFERRED TO EJ1
004170,000360: 04,6302 03062 TC CCSHOLE
004171,000361: 04,6303 06304 TC +1 # PARED WITH THE PREVIOUS HIGHEST
004172,000362:
004173,000363: 04,6304 10154 CCS PRIORITY +24D # PRIORITY FOUND. THE CONTENTS OF Q
004174,000364: 04,6305 06341 TC EJ1 # SERVE TO LOCATE THE CCS WHICH WAS
004175,000365: 04,6306 03062 TC CCSHOLE
004176,000366: 04,6307 06310 TC +1 # NEWJOB IS SET TO THE RELATIVE ADDRESS
004177,000367:
004178,000368: 04,6310 10164 CCS PRIORITY +32D # OF THE REGISTER SET WITH THE HIGHTEST
004179,000369: 04,6311 06341 TC EJ1 # ACTIVE PRIORITY AT THE END OF THE SCAN.
004180,000370: 04,6312 03062 TC CCSHOLE
004181,000371: 04,6313 06314 TC +1
004182,000372:
004183,000373: 04,6314 10174 CCS PRIORITY +40D
004184,000374: 04,6315 06341 TC EJ1
004185,000375: 04,6316 70000 EXEC70K OCT 70000
004186,000376: 04,6317 06320 TC +1
004187,000377:
004188,000378: 04,6320 10204 CCS PRIORITY +48D
004189,000379: 04,6321 06341 TC EJ1
004190,000380: 04,6322 67653 -CCSPR -CCS PRIORITY
004191,000381: 04,6323 06324 TC +1
004192,000382:
004193,000383: 04,6324 10214 CCS PRIORITY +56D
004194,000384: 04,6325 06341 TC EJ1
004195,000385: 04,6326 03062 TC CCSHOLE
004196,000386: 04,6327 06330 TC +1
Page 108 |
004198,000388: 04,6330 10077 CCS BUF # IF BUF = 0, THE SCAN WAS PART OF
004199,000389: 04,6331 06333 TC +2 # A PRIORITY CHANGE IN WHICH THE NEW
004200,000390: 04,6332 06245 TC SETNJ # PRIORITY IS HIGHEST. GO SET NEWJOB = 0.
004201,000391:
004202,000392: 04,6333 20000 INDEX A # PICK UP CCS INSTRUCTION TO GET NEWJOB
004203,000393: 04,6334 27777 CAF 0 -1 # SELECT CCS INSTRUCTION.
004204,000394: 04,6335 66322 AD -CCSPR
004205,000395: 04,6336 50215 TS NEWJOB # RELATIVE ADDRESS ONLY.
004206,000396: 04,6337 30120 XCH LOC # (NO MEANING FOR ENDOFJOB).
004207,000397: 04,6340 06145 TC CHANJOB
004208,000398:
004209,000399:
004210,000400:
004211,000401: 04,6341 50101 EJ1 TS BUF +2 # STORE NEW PRIORITY
004212,000402: 04,6342 60100 AD BUF +1 # - OLD PRIORITY
004213,000403: 04,6343 10000 CCS A
004214,000404: 04,6344 30001 XCH Q # IF NEW PRIORITY IS LARGER
004215,000405: 04,6345 06351 TC EJ2
004216,000406: 04,6346 30000 NOOP # IF OLD PRIORITY IS LARGER
004217,000407: 04,6347 20001 INDEX Q # OR EQUAL
004218,000408: 04,6350 00002 TC 2
004219,000409:
004220,000410: 04,6351 50077 EJ2 TS BUF # SAVE C(Q) TO LOCATE HIGHEST PRIORITY
004221,000411: 04,6352 40101 CS BUF +2 # JOB AT END OF SCAN.
004222,000412: 04,6353 50100 TS BUF +1
004223,000413: 04,6354 20077 INDEX BUF
004224,000414: 04,6355 00002 TC 2
004225,000415:
Page 109 |
004227,000417:
004228,000418: # THE FOLLOWING ROUTINE IS AVAILABLE TO CHANGE THE PRIORITY OF A JOB WHILE IT IS RUNNING UNDER EXECUTIVE
004229,000419: # CONTROL (IE, IN CORE SET 0). CALLING SEQUENCE IS AS FOLLOWS (NO INHINT NECESSARY):
004230,000420:
004231,000421: # CAF NEWPRIO PRIORITY IN BITS 10-14 - ZERO ELSEWHERE.
004232,000422: # L TC PRIOCHNG
004233,000423:
004234,000424: # RETURN IS TO L+1 IMMEDIATELY UNLESS A JOB OF STILL HIGHER PRIORITY IS PRESENT, IN WHICH CASE IT GOES TO CHANJOB
004235,000425: # BEFORE RETURNING.
004236,000426:
004237,000427:
004238,000428:
004239,000429: 2133 SETLOC JOBSLEEP +4
004240,000430:
004241,000431: 2133 20017 PRIOCHNG INHINT # PREPARE Q, BANK, AND PUSHLOC (ALA
004242,000432: 2134 50577 TS NEWPRIO # CHANG1) IN CASE WE HAVE TO CHANGE JOBS.
004243,000433: 2135 40001 CS Q
004244,000434: 2136 50120 TS LOC
004245,000435: 2137 32075 CAF EXECBANK
004246,000436: 2140 30015 XCH BANKREG
004247,000437: 2141 06356 TC PRIOCH2 # OFF TO EXECUTIVE BANK.
004248,000438:
004249,000439: 04,6356 SETLOC EJ2 +5
004250,000440:
004251,000441: 04,6356 40000 PRIOCH2 COM
004252,000442: 04,6357 50061 TS BANKSET
004253,000443: 04,6360 30123 XCH PUSHLOC
004254,000444: 04,6361 74606 MASK LOW10
004255,000445: 04,6362 50123 TS PUSHLOC
004256,000446:
004257,000447: 04,6363 34607 CAF LOW9 # MAKE UP NEW PRIORITY WORD, LEAVING
004258,000448: 04,6364 70124 MASK PRIORITY # POSSIBLE VAC ADDRESS INTACT.
004259,000449: 04,6365 60577 AD NEWPRIO
004260,000450: 04,6366 50124 TS PRIORITY
004261,000451: 04,6367 40000 COM # INITIALIZE BUF +1 TO - THIS PRIORITY FOR
004262,000452: 04,6370 50100 TS BUF +1 # SEARCH FOR HIGHEST PRIORITY.
004263,000453:
004264,000454: 04,6371 35501 CAF ZERO # SET BUF TO ZERO AS A FLAG FOR END OF
004265,000455: 04,6372 50077 TS BUF # SCAN.
004266,000456: 04,6373 06274 TC EJSCAN # SCAN FOR HIGHEST PRIORITY.
004267,000457:
Page 110 |
004269,000459:
004270,000460: # LIST OF PROGRAM PRIORITIES
004271,000461:
004272,000462: 2142 SETLOC PRIOCHNG +7
004273,000463:
004274,000464: 2142 4505 PRIO1 EQUALS BIT10
004275,000465: 2142 4504 PRIO2 EQUALS BIT11
004276,000466: 2142 03000 PRIO3 OCT 03000
004277,000467: 2143 4503 PRIO4 EQUALS BIT12
004278,000468: 2143 05000 PRIO5 OCT 05000
004279,000469: 2144 2143 OCT05000 EQUALS PRIO5
004280,000470: 2144 4373 PRIO6 EQUALS 6K
004281,000471: 2144 07000 PRIO7 OCT 07000
004282,000472: 2145 4502 PRIO10 EQUALS BIT13
004283,000473: 2145 11000 PRIO11 OCT 11000
004284,000474: 2146 12000 PRIO12 OCT 12000
004285,000475: 2147 13000 PRIO13 OCT 13000
004286,000476: 2150 14000 PRIO14 OCT 14000
004287,000477: 2151 15000 PRIO15 OCT 15000
004288,000478: 2152 16000 PRIO16 OCT 16000
004289,000479: 2153 17000 PRIO17 OCT 17000
004290,000480: 2154 4501 PRIO20 EQUALS BIT14
004291,000481: 2154 21000 PRIO21 OCT 21000
004292,000482: 2155 22000 PRIO22 OCT 22000
004293,000483: 2156 23000 PRIO23 OCT 23000
004294,000484: 2157 24000 PRIO24 OCT 24000
004295,000485: 2160 25000 PRIO25 OCT 25000
004296,000486: 2161 26000 PRIO26 OCT 26000
004297,000487: 2162 27000 PRIO27 OCT 27000
004298,000488: 2163 30000 PRIO30 OCT 30000
004299,000489: 2164 31000 PRIO31 OCT 31000
004300,000490: 2165 32000 PRIO32 OCT 32000
004301,000491: 2166 33000 PRIO33 OCT 33000
004302,000492: 2167 34000 PRIO34 OCT 34000
004303,000493: 2170 35000 PRIO35 OCT 35000
004304,000494: 2171 36000 PRIO36 OCT 36000
004305,000495: 2172 37000 PRIO37 OCT 37000
End of include-file EXECUTIVE.agc. Parent file is MAIN.agc