Source Code
These source-code files are part of a reconstructed copy of Sunrise 69, the
final release of the Block I Command Module (CM) Apollo Guidance Computer
(AGC) system test software.
They have been created via disassembly of binary dumps of original core rope memory modules, part numbers 1003133-18, 1003133-19, 1003133-20, and 1003733-071. Corresponding portions of code have been copied from Solarium 55 where applicable. Extensive use was also made of the AGC Information Series documents, which were specifically written about the Sunrise software. Since only binary dumps (rather than listings) of Sunrise are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing. |
002949,000002: ## Copyright: Public domain.
002950,000003: ## Filename: EXECUTIVE.agc
002951,000004: ## Purpose: A section of Sunrise 69.
002952,000005: ## It is part of the reconstructed source code for the final
002953,000006: ## release of the Block I Command Module system test software. No
002954,000007: ## original listings of this program are available; instead, this
002955,000008: ## file was created via disassembly of dumps of Sunrise core rope
002956,000009: ## memory modules and comparison with the later Block I program
002957,000010: ## Solarium 55.
002958,000011: ## Assembler: yaYUL --block1
002959,000012: ## Contact: Ron Burkey <info@sandroid.org>.
002960,000013: ## Website: www.ibiblio.org/apollo/index.html
002961,000014: ## Mod history: 2023-06-19 MAS Created from Sunrise 45.
002962,000015:
002963,000016:
002964,000017: # EXECUTIVE PROGRAMS
002965,000018: # --------- --------
002966,000019:
002967,000020:
002968,000021:
002969,000022: 2037 BANK 1
002970,000023: 2037 50572 FINDVAC TS NEWPRIO # PROGRAM TO FIND AN AVAILABLE VAC
002971,000024: 2040 30001 XCH Q
002972,000025: 2041 02056 TC EXECCOM # COMMON FF EXECUTIVE SUBROUTINE.
002973,000026: 2042 06003 TC FINDVAC2 # OFF TO EXECUTIVE BANK.
002974,000027:
002975,000028: 2043 50572 NOVAC TS NEWPRIO # ENTRY EXCLUSIVELY FOR BASIC JOBS NOT
002976,000029: 2044 30001 XCH Q # REQUIRING A VAC AREA.
002977,000030: 2045 02056 TC EXECCOM # COMMON FF EXECUTIVE SUBROUTINE.
002978,000031: 2046 35500 CAF ZERO # ZERO PD FIELD IN PUSHLOC.
002979,000032: 2047 50567 TS EXECTEM3
002980,000033: 2050 06026 TC NOVAC2
002981,000034:
002982,000035: 2051 50566 JOBWAKE TS EXECTEM2 # ENTRY HERE TO RE-ACTIVATE A SLEEPING JOB
002983,000036: 2052 10001 CCS Q # RETURN ADDRESS - 1 TO WTEXIT.
002984,000037: 2053 50573 TS WTEXIT # SHARES FINAL PORTION OF FINDVAC, NOVAC.
002985,000038: 2054 02062 TC EXECSW # COMMON EXEC BANK-SWITCH SUBROUTINE.
002986,000039: 2055 06107 TC JOBWAKE2
002987,000040:
002988,000041: 2056 50573 EXECCOM TS WTEXIT # EXIT ADDRESS
002989,000042: 2057 20000 INDEX A # PICK UP JOB OR TASK ADDRESS.
002990,000043: 2060 30000 CAF 0 # (USED BY FINDVAC, NOVAC, AND WAITLIST)
002991,000044: 2061 50566 TS EXECTEM2
002992,000045:
002993,000046: 2062 32066 EXECSW CAF EXECBANK
002994,000047: 2063 30015 XCH BANKREG # CALL IN EXEC BANK, SAVING RETURN.
002995,000048: 2064 50565 TS EXECTEM1
002996,000049: 2065 00001 TC Q
002997,000050:
002998,000051: 2066 10003 EXECBANK CADR FINDVAC2
002999,000052:
003000,000053: 2067 50015 FOUNDVAC TS BANKREG # COMES HERE TO RETURN FROM FINDVAC,
003001,000054: 2070 20573 INDEX WTEXIT # NOVAC, OR JOBWAKE.
003002,000055: 2071 00001 TC 1
003003,000056:
003004,000057:
003005,000058: # CALLS TO FINDVAC BEGIN HERE, SNATCHING AN AVAILABLE VAC AREA.
003006,000059:
003007,000060: 04,6000 SETLOC 10000 # EXEC/WAITLIST BANK.
003008,000061:
003009,000062: 04,6000 06744 SLAPB TC SLAP1
003010,000063:
003011,000064: 04,6001 07265 KEYRUPTC TC KEYRUPT1 # STANDARD LOC, DONT MOVE
003012,000065:
003013,000066: 04,6002 06724 MODROUTB TC MODROUT # STANDARD LOC, DONT MOVE
003014,000067:
003015,000068: 04,6003 10214 FINDVAC2 CCS VAC1USE # C(VAC1USE) = TC VAC1USE IF VAC1 IS
003016,000069: 04,6004 06017 TC FV1 # AVAILABLE, OR +0 IF IT IS IN USE.
003017,000070: 04,6005 10270 CCS VAC2USE
003018,000071: 04,6006 06017 TC FV1 # THE FIRST CCS WITH +0 JUMPS TO THE
003019,000072: 04,6007 10344 CCS VAC3USE # CORRESPONDING TC ORDER.
003020,000073: 04,6010 06017 TC FV1
003021,000074: 04,6011 10420 CCS VAC4USE
003022,000075: 04,6012 06017 TC FV1
003023,000076: 04,6013 10474 CCS VAC5USE
003024,000077: 04,6014 06017 TC FV1
003025,000078:
003026,000079: 04,6015 02652 TC ABORT # NO VAC AREAS AVAILABLE.
003027,000080: 04,6016 01201 OCT 01201
003028,000081:
003029,000082: 04,6017 65502 FV1 AD TWO # TO FORM ADDRESS OF ASSIGNED VAC AREA.
003030,000083: 04,6020 50567 TS EXECTEM3
003031,000084: 04,6021 60572 AD NEWPRIO # ) STORE ADDRESS OF VAC1 IN LOW-ORDER
003032,000085: 04,6022 50572 TS NEWPRIO # ) 9 BITS OF NEWPRIO.
003033,000086:
003034,000087: 04,6023 35500 CAF ZERO # )
003035,000088: 04,6024 20567 INDEX EXECTEM3 # ) STORE +0 IN VAC1USE, INDICATING USE.
003036,000089: 04,6025 47777 TS 0 -1 # )
003037,000090:
003038,000091: 04,6026 36041 NOVAC2 CAF LASTADR # RELATIVE ADDRESS OF LAST REGISTER SET.
003039,000092: 04,6027 50574 TS LOCCTR
003040,000093: 04,6030 10000 CCS A
003041,000094: 04,6031 06036 TC +5 # PNZ AND -0 ONLY.
003042,000095:
003043,000096: 04,6032 40566 12BITSOK CS EXECTEM2 # COMES HERE IF JOB ADDRESS LESS THAN 6K.
003044,000097: 04,6033 06066 TC LOCSET
003045,000098:
003046,000099: 04,6034 02652 TC ABORT # NO REGISTER SETS AVAILABLE.
003047,000100: 04,6035 01202 OCT 01202
003048,000101:
003049,000102: 04,6036 20574 +5 INDEX LOCCTR # THIS LOOP FINDS THE FIRST AVAILABLE
003050,000103: 04,6037 10123 CCS PRIORITY # STORAGE AREA FOR CORE REGISTERS FOR
003051,000104: 04,6040 06104 TC NOVAC3 # THE NEW JOB.
003052,000105: 04,6041 00070 LASTADR DEC 56 B-14 # EIGHT SETS OF EIGHT REGISTERS.
003053,000106: 04,6042 06104 TC NOVAC3 # NNZ MEANS JOB ASLEEP HERE.
003054,000107:
003055,000108:
003056,000109: # NOW THAT REGISTER SETS HAVE BEEN FOUND FOR THE NEW JOB, INITIALIZE THEM AND SET NEWJOB IF CALLED FOR.
003057,000110:
003058,000111: 04,6043 20574 CORSW INDEX LOCCTR # (COMES HERE WITH C(A) = 0). TURN OFF OVF
003059,000112: 04,6044 50121 TS OVFIND
003060,000113:
003061,000114: 04,6045 60572 AD NEWPRIO # SET UP PRIORITY FOR NEW JOB.
003062,000115: 04,6046 20574 JOBWAKE4 INDEX LOCCTR # JOB WAKING ENTERS HERE TO FINISH UP.
003063,000116: 04,6047 50123 TS PRIORITY # STORE NEW PRIORITY
003064,000117: 04,6050 32206 CAF BANKMASK
003065,000118: 04,6051 70566 MASK EXECTEM2
003066,000119: 04,6052 60567 AD EXECTEM3 # PUSHLOC
003067,000120: 04,6053 20574 INDEX LOCCTR
003068,000121: 04,6054 50122 TS PUSHLOC
003069,000122:
003070,000123: 04,6055 36315 CAF EXEC70K # CREATE PROPER 12 BIT ADDRESS.
003071,000124: 04,6056 70566 MASK EXECTEM2 # SEE IF HIGH THREE BITS ZERO.
003072,000125: 04,6057 10000 CCS A
003073,000126: 04,6060 06062 TC +2 # NEEDS SPECIAL TREATMENT IF C(A) NOT ZERO
003074,000127: 04,6061 06032 TC 12BITSOK
003075,000128:
003076,000129: 04,6062 30566 XCH EXECTEM2
003077,000130: 04,6063 74605 MASK LOW10
003078,000131: 04,6064 64373 AD 6K
003079,000132: 04,6065 40000 COM
003080,000133: 04,6066 20574 LOCSET INDEX LOCCTR
003081,000134: 04,6067 50117 TS LOC
003082,000135:
003083,000136: 04,6070 20550 INDEX NEWJOB
003084,000137: 04,6071 40123 CS PRIORITY # TEST WHETHER NEW JOB HAS HIGHER
003085,000138: 04,6072 60572 AD NEWPRIO # PRIORITY THAN PREVIOUS HIGHEST
003086,000139: 04,6073 10000 CCS A
003087,000140: 04,6074 40574 CS LOCCTR # NEW JOB HAS HIGHER PRIORITY.
003088,000141: 04,6075 06101 TC NEWHIGH # SET NEWJOB, LEAVING LOCCTR UNCHANGED.
003089,000142:
003090,000143: 04,6076 06077 TC +1 # -0 IF PRIORITIES = AND BOTH ARE NOVACS.
003091,000144: 04,6077 30565 NOWAKE2 XCH EXECTEM1
003092,000145: 04,6100 02067 ENDFIND TC FOUNDVAC
003093,000146:
003094,000147: 04,6101 40000 NEWHIGH COM # SET NEWJOB AND RETURN TO CALLER.
003095,000148: 04,6102 50550 TS NEWJOB
003096,000149: 04,6103 06077 TC ENDFIND -1
003097,000150:
003098,000151: 04,6104 44513 NOVAC3 CS EIGHT # COMES HERE TO EXAMINE NEXT REGISTER SET.
003099,000152: 04,6105 60574 AD LOCCTR
003100,000153: 04,6106 06027 TC NOVAC2 +1
003101,000154:
003102,000155:
003103,000156: # THE JOBWAKE ROUTINE REACTIVES A SLEEPING JOB, SETTING IT TO BEGIN AT THE GIVEN WAKE ADDRESS.
003104,000157:
003105,000158: 04,6107 36041 JOBWAKE2 CAF LASTADR # BEGIN SEARCH FOR REGISTER SET CONTAINING
003106,000159: 04,6110 50574 TS LOCCTR # SLEEPING JOB. WAKE ADDRESS IS IN LOC IN
003107,000160: 04,6111 10000 CCS A # CADR FORM, AS PLACED THERE BY JOBSLEEP.
003108,000161: 04,6112 20574 INDEX LOCCTR # PNZ AND -0 ONLY. SEE IF THIS JOB ASLEEP.
003109,000162: 04,6113 10123 CCS PRIORITY # THIS CCS CANT GO TO TC NOWAKE .
003110,000163: 04,6114 06137 TC JOBWAKE3 # PNZ - ACTIVE JOB PRESENT. +0 IMPOSSIBLE.
003111,000164:
003112,000165: 04,6115 06142 TC NOWAKE # ALARM - SLEEPING JOB NOT FOUND.
003113,000166:
003114,000167: 04,6116 06120 TC +2 # INACTIVE JOB FOUND.
003115,000168: 04,6117 06137 TC JOBWAKE3 # -0 - NOT IN USE.
003116,000169:
003117,000170: 04,6120 40566 +2 CS EXECTEM2 # SEE IF THIS IS THE DESIRED SLEEPING JOB.
003118,000171: 04,6121 20574 INDEX LOCCTR
003119,000172: 04,6122 60117 AD LOC
003120,000173: 04,6123 10000 CCS A
003121,000174: 04,6124 06137 TC JOBWAKE3 # SEARCH NEXT SET IF NOT AT END.
003122,000175: 04,6126 SETLOC +1
003123,000176: 04,6126 06137 TC JOBWAKE3
003124,000177:
003125,000178: 04,6127 34605 CAF LOW10 # SET UP EXECTEM3 AND PRIORITY SO WE CAN
003126,000179: 04,6130 20574 INDEX LOCCTR # FINISH AT STANDARD CORSW .
003127,000180: 04,6131 70122 MASK PUSHLOC # PROTECT PD SETTING.
003128,000181: 04,6132 50567 TS EXECTEM3
003129,000182:
003130,000183: 04,6133 20574 INDEX LOCCTR # RE-COMPLEMENT PRIORITY AND FINISH UP.
003131,000184: 04,6134 40123 CS PRIORITY
003132,000185: 04,6135 50572 TS NEWPRIO
003133,000186: 04,6136 06046 TC JOBWAKE4
003134,000187:
003135,000188: 04,6137 44513 JOBWAKE3 CS EIGHT # ADVANCE TO NEXT REGISTER SET.
003136,000189: 04,6140 60574 AD LOCCTR
003137,000190: 04,6141 06110 TC JOBWAKE2 +1
003138,000191:
003139,000192: 04,6142 50574 NOWAKE TS LOCCTR # SET LOCCTR = +0 TO SHOW NO JOB WAS
003140,000193: 04,6143 06077 TC NOWAKE2 # AWAKENED.
003141,000194:
003142,000195:
003143,000196: # A NEW JOB, OF HIGHER PRIORITY THAN THE PRESENT ONE, CAUSES THE RELA-
003144,000197: # TIVE ADDRESS (9, 18, ..., 63) OF THE NEW JOB CORE REGISTERS TO BE
003145,000198: # PLACED IN REGISTER NEWJOB , WHERE IT IS TESTED BY THE INTERPRETER.
003146,000199: # THE RESULTING BRANCH TO CHANJOB, BELOW, CAUSES A TRADE BETWEEN THE
003147,000200: # CORE REGISTERS OF THE PRESENT AND NEW JOBS.
003148,000201:
003149,000202: 2072 SETLOC FOUNDVAC +3
003150,000203:
003151,000204: 2072 20017 CHANG1 INHINT # BASIC JOBS COME HERE WHEN C(NEWJOB)
003152,000205: 2073 32066 CAF EXECBANK # NON-ZERO. START BY CALLING IN EXECUTIVE
003153,000206: 2074 30015 XCH BANKREG # BANK AND SAVING RETURN BANK CODE.
003154,000207: 2075 40000 COM
003155,000208: 2076 50060 TS BANKSET
003156,000209: 2077 30122 XCH PUSHLOC # BLANK OUT THE HIGH-ORDER 4 BITS IN
003157,000210: 2100 74605 MASK LOW10 # PUSHLOC SO THE BANK BITS CAN BE PACKED
003158,000211: 2101 50122 TS PUSHLOC # WITH IT
003159,000212: 2102 40001 CS Q # FOR RETURN, SHOWING THIS WAS A BASIC JOB
003160,000213: 2103 06144 TC CHANJOB # OFF TO BANK 0
003161,000214:
003162,000215: 2104 10065 CHANG2 CCS NEWEQIND # INTERPRETIVE INTERRUPTS START HERE,
003163,000216: 2105 00001 TC Q # PROVIDED THE LOAD INDICATOR ISNT ON
003164,000217:
003165,000218: 2106 20017 INHINT
003166,000219: 2107 32066 CAF EXECBANK # CALL IN EXECUTIVE BANK.
003167,000220: 2110 50015 TS BANKREG
003168,000221: 2111 30117 XCH LOC
003169,000222: 2112 06144 TC CHANJOB # WITH C(A) PNZ, SHOWING WE WERE IN INTERP
003170,000223: # RETER
003171,000224: 04,6144 SETLOC NOWAKE +2
003172,000225: 04,6144 20550 CHANJOB INDEX NEWJOB # TO BEGIN SWAP OF CORE REGISTERS
003173,000226: 04,6145 30117 XCH LOC
003174,000227: 04,6146 50117 TS LOC # SAVE PROPER 12 BIT ADDRESS
003175,000228:
003176,000229: 04,6147 30123 XCH PRIORITY
003177,000230: 04,6150 20550 INDEX NEWJOB
003178,000231: 04,6151 30123 XCH PRIORITY
003179,000232: 04,6152 50123 TS PRIORITY
003180,000233: 04,6153 74606 MASK LOW9 # TO GET FIXLOC
003181,000234: 04,6154 50066 TS FIXLOC
003182,000235: 04,6155 64511 AD BIT6 # SET UP VACLOC ( = FIXLOC + 32D )
003183,000236: 04,6156 50067 TS VACLOC
003184,000237:
003185,000238: 04,6157 40060 CS BANKSET # SAVE BANK
003186,000239: 04,6160 60122 AD PUSHLOC # AND PUSHLOC IN SAME WORD
003187,000240: 04,6161 20550 INDEX NEWJOB
003188,000241: 04,6162 30122 XCH PUSHLOC
003189,000242: 04,6163 50122 TS PUSHLOC
003190,000243: 04,6164 74605 MASK LOW10
003191,000244: 04,6165 30122 XCH PUSHLOC
003192,000245: 04,6166 40000 COM
003193,000246: 04,6167 60122 AD PUSHLOC # WE NOW HAVE COMPLEMNT OF BANK BITS
003194,000247: 04,6170 50060 TS BANKSET
003195,000248:
003196,000249: 04,6171 40120 CS ADRLOC # SAVE MODE AND COMPLEMENT OF ADRLOC IN
003197,000250: 04,6172 60000 DOUBLE # SAME WORD. ADRLOC MUST BE SHIFTED 2
003198,000251: 04,6173 60000 DOUBLE # PLACES TO MAKE ROOM FOR MODE
003199,000252: 04,6174 60064 AD MODE # -0, -1, OR -2
003200,000253: 04,6175 20550 INDEX NEWJOB
003201,000254: 04,6176 30120 XCH ADRLOC
003202,000255: 04,6177 50021 TS SR
003203,000256: 04,6200 74473 MASK THREE # SAVE LOW 2 BITS
003204,000257: 04,6201 64341 AD NEG3 # THIS RESULTS IN EITHER -0, -1, OR -2
003205,000258: 04,6202 50064 TS MODE
003206,000259: 04,6203 40021 CS SR
003207,000260: 04,6204 40021 CS SR
003208,000261: 04,6205 50120 TS ADRLOC
003209,000262:
003210,000263: 04,6206 10121 CCS OVFIND # SAVE C(ORDER) POSITIVE IF C(OVFIND) = 0
003211,000264: 04,6207 06211 TC +2 # AND NEGATIVE OTHERWISE
003212,000265: 04,6210 06213 TC +3
003213,000266: 04,6211 40062 CS ORDER
003214,000267: 04,6212 06214 TC +2
003215,000268: 04,6213 30062 XCH ORDER
003216,000269: 04,6214 20550 INDEX NEWJOB
003217,000270: 04,6215 30121 XCH OVFIND
003218,000271: 04,6216 50062 TS ORDER
003219,000272: 04,6217 10000 CCS A # DETERMINE NEW SETTING OF OVFIND
003220,000273: 04,6220 35500 CAF ZERO # TO ZERO
003221,000274: 04,6221 06225 TC OVFSET
003222,000275: 04,6222 40062 CS ORDER # ORDER WAS NEGATIVE, MAKE IT POSITIVE
003223,000276: 04,6223 50062 TS ORDER
003224,000277: 04,6224 34516 CAF ONE # TO SET OVFIND
003225,000278: 04,6225 50121 OVFSET TS OVFIND
003226,000279:
003227,000280: 04,6226 30114 XCH MPAC # TRADE C(MPAC TO MPAC+2)
003228,000281: 04,6227 20550 INDEX NEWJOB
003229,000282: 04,6230 30114 XCH MPAC
003230,000283: 04,6231 50114 TS MPAC
003231,000284: 04,6232 30115 XCH MPAC +1
003232,000285: 04,6233 20550 INDEX NEWJOB
003233,000286: 04,6234 30115 XCH MPAC +1
003234,000287: 04,6235 50115 TS MPAC +1
003235,000288: 04,6236 30116 XCH MPAC +2
003236,000289: 04,6237 20550 INDEX NEWJOB
003237,000290: 04,6240 30116 XCH MPAC +2
003238,000291: 04,6241 50116 TS MPAC +2
003239,000292:
003240,000293: 04,6242 35500 CAF ZERO
003241,000294: 04,6243 50065 TS NEWEQIND # MAKE SURE LOAD INDICATOR OFF.
003242,000295: 04,6244 50550 SETNJ TS NEWJOB
003243,000296: 04,6245 20016 RELINT # ENABLE INTERRUPT
003244,000297: 04,6246 10117 CCS LOC # C(LOC) PNZ FOR INTERPRETIVE JOBS.
003245,000298: 04,6247 35500 CAF ZERO
003246,000299: 04,6250 04026 TC DANZIG +2 # RETURN TO INTERPRETER
003247,000300: 04,6251 64516 AD ONE # GET ABS(LOC) AND RETURN TO BASIC
003248,000301: 04,6252 50061 TS ADDRWD
003249,000302: 04,6253 40060 CS BANKSET # GET DESIRED BANKBITS
003250,000303: 04,6254 02113 ENDCHANG TC BASICALL
003251,000304:
003252,000305: 2113 SETLOC CHANG2 +7D # TAKE UP WHERE WE LEFT OFF IN FIXED-FIXED
003253,000306:
003254,000307: 2113 50015 BASICALL TS BANKREG
003255,000308: 2114 00061 TC ADDRWD
003256,000309:
003257,000310: 2115 32066 ENDOFJOB CAF EXECBANK # NORMAL ENDJOB ENTRY.
003258,000311: 2116 50015 TS BANKREG
003259,000312: 2117 06255 TC ENDJOB1
003260,000313:
003261,000314: 2120 50117 JOBSLEEP TS LOC # ENTRY HERE TO DE-ACTIVE THIS JOB.
003262,000315: 2121 32066 CAF EXECBANK # LOC IS SET TO THE AWAKENING ADDRESS
003263,000316: 2122 50015 TS BANKREG # SO THE SUBSEQUENT JOBWAKE CAN FIND
003264,000317: 2123 06266 TC JOBSLP1 # THE PROPER REGISTER SET.
003265,000318:
003266,000319: 04,6255 SETLOC ENDCHANG +1
003267,000320:
003268,000321: 04,6255 20017 ENDJOB1 INHINT # INTERPRETIVE JOBS FINISH WITH RTB
003269,000322: 04,6256 45500 CS ZERO # TO ENDJOB1
003270,000323: 04,6257 50077 TS BUF +1 # ENDJOB USES BUF, BUF +1, AND BUF +2.
003271,000324: 04,6260 30123 XCH PRIORITY
003272,000325: 04,6261 74606 MASK LOW9 # RESTORE AVAILABILITY OF VAC1 BY SETTING
003273,000326: 04,6262 10000 CCS A # C(VAC1USE) NON-ZERO
003274,000327: 04,6263 20000 INDEX A
003275,000328: 04,6264 50000 TS 0
003276,000329:
003277,000330: 04,6265 06273 TC EJSCAN # ENDJOB NEED NOT EXAMINE FIRST REG. SET.
003278,000331:
003279,000332: 04,6266 20017 JOBSLP1 INHINT # FINISH JOB SLEEP AND START ENDJOB-TYPE
003280,000333: 04,6267 40123 CS PRIORITY # SCAN. COMPLEMENTED PRIORITY REGISTER
003281,000334: 04,6270 50123 TS PRIORITY # SHOWS JOB IS ASLEEP.
003282,000335: 04,6271 45500 CS ZERO # INITIALIZE SEARCH FOR HIGHEST PRIORITY.
003283,000336: 04,6272 50077 TS BUF +1
003284,000337:
003285,000338:
003286,000339: # SCAN FOR THE ACTIVE JOB OF HIGHEST PRIORITY.
003287,000340:
003288,000341: 04,6273 10133 EJSCAN CCS PRIORITY +8D # EACH PRIORITY REGISTER (PRIORITY +8N)
003289,000342: 04,6274 06335 TC EJ1 # IS SCANNED. ITS CONTENTS ARE EITHER
003290,000343: 04,6276 SETLOC +1
003291,000344: 04,6276 06277 TC +1 # 2. NNZ - AN INACTIVE PRIORITY NUMBER.
003292,000345:
003293,000346: 04,6277 10143 CCS PRIORITY +16D # OR 3. -0 - NOT IN USE.
003294,000347: 04,6300 06335 TC EJ1 # IF PNZ, CONTROL IS TRANSFERRED TO EJ1
003295,000348: 04,6302 SETLOC +1
003296,000349: 04,6302 06303 TC +1 # PARED WITH THE PREVIOUS HIGHEST
003297,000350:
003298,000351: 04,6303 10153 CCS PRIORITY +24D # PRIORITY FOUND. THE CONTENTS OF Q
003299,000352: 04,6304 06335 TC EJ1 # SERVE TO LOCATE THE CCS WHICH WAS
003300,000353: 04,6306 SETLOC +1
003301,000354: 04,6306 06307 TC +1 # NEWJOB IS SET TO THE RELATIVE ADDRESS
003302,000355:
003303,000356: 04,6307 10163 CCS PRIORITY +32D # OF THE REGISTER SET WITH THE HIGHTEST
003304,000357: 04,6310 06335 TC EJ1 # ACTIVE PRIORITY AT THE END OF THE SCAN.
003305,000358: 04,6312 SETLOC +1
003306,000359: 04,6312 06313 TC +1
003307,000360:
003308,000361: 04,6313 10173 CCS PRIORITY +40D
003309,000362: 04,6314 06335 TC EJ1
003310,000363: 04,6315 70000 EXEC70K OCT 70000
003311,000364: 04,6316 06317 TC +1
003312,000365:
003313,000366: 04,6317 10203 CCS PRIORITY +48D
003314,000367: 04,6320 06335 TC EJ1
003315,000368: 04,6321 67654 -CCSPR -CCS PRIORITY
003316,000369: 04,6322 06323 TC +1
003317,000370:
003318,000371: 04,6323 10213 CCS PRIORITY +56D
003319,000372: 04,6324 06335 TC EJ1
003320,000373: 04,6326 SETLOC +1
003321,000374: 04,6326 06327 TC +1
003322,000375:
003323,000376: 04,6327 20076 INDEX BUF # PICK UP CCS INSTRUCTION TO GET NEWJOB
003324,000377: 04,6330 27776 CAF 0 -2 # SELECT CCS INSTRUCTION.
003325,000378: 04,6331 66321 AD -CCSPR
003326,000379: 04,6332 50550 TS NEWJOB # RELATIVE ADDRESS ONLY.
003327,000380: 04,6333 30117 XCH LOC # (NO MEANING FOR ENDOFJOB).
003328,000381: 04,6334 06144 TC CHANJOB
003329,000382:
003330,000383:
003331,000384:
003332,000385: 04,6335 50100 EJ1 TS BUF +2 # STORE NEW PRIORITY
003333,000386: 04,6336 60077 AD BUF +1 # - OLD PRIORITY
003334,000387: 04,6337 10000 CCS A
003335,000388: 04,6340 30001 XCH Q # IF NEW PRIORITY IS LARGER
003336,000389: 04,6341 06345 TC EJ2
003337,000390: 04,6342 30000 NOOP # IF OLD PRIORITY IS LARGER
003338,000391: 04,6343 20001 INDEX Q # OR EQUAL
003339,000392: 04,6344 00002 TC 2
003340,000393:
003341,000394: 04,6345 50076 EJ2 TS BUF # SAVE C(Q) TO LOCATE HIGHEST PRIORITY
003342,000395: 04,6346 40100 CS BUF +2 # JOB AT END OF SCAN.
003343,000396: 04,6347 50077 TS BUF +1
003344,000397: 04,6350 20076 INDEX BUF
003345,000398: 04,6351 00002 TC 2
End of include-file EXECUTIVE.agc. Parent file is MAIN.agc