/								/EAG:193

/ COPYRIGHT (C) 1975						/EAG:193

/ DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.			/EAG:193

/								/EAG:193

/ THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY	/EAG:193

/ ON A SINGLE COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH	/EAG:193

/ THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS		/EAG:193

/ SOFTWARE, OR ANY OTHER COPIES THEREOF, MAY NOT BE PRO-	/EAG:193

/ VIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON		/EAG:193

/ EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO AGREES TO	/EAG:193

/ THESE LICENSE TERMS.  TITLE TO AND OWNERSHIP OF THE		/EAG:193

/ SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC.			/EAG:193

/								/EAG:193

/ THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE		/EAG:193

/ WITHOUT NOTICE AND SHOULD NOT BE CONSTRUED AS A COM-		/EAG:193

/ MITMENT BY DIGITAL EQUIPMENT CORPORATION.			/EAG:193

/								/EAG:193

/ DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY	/EAG:193

/ OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.	/EAG:193

/								/EAG:193

	.TITLE FORCE INITIALIZATION CODE ABOVE 4K

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191

/ THE MONITOR INITIALIZATION CODE DOES MANY THINGS IN PAGE	/EAG:191

/ MODE.  IN ORDER TO SOLVE THE POTENTIAL PAGE ADDRESSING	/EAG:191

/ PROBLEM WE FORCE ALL INITIALIZATION CODE TO BE LOADED ABOVE	/EAG:191

/ THE 4K BOUNDARY (I.E., IN PAGE 1)				/EAG:191

/								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

	.IFNEG .-10000						/EAG:191

	.LOC 10000						/EAG:191

	.ENDC							/EAG:191

	.TITLE MONITOR INITIALIZATION FIRST TIME

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191

/ COME HERE FOLLOWING MANUAL BOOTSTRAP LOADS.  THE BOOTSTRAP	/EAG:191

/ HAS LOADED RESMON (INCLUDING SGNBLK, SYSBLK, AND COMBLK)	/EAG:191

/ INTO BANK ZERO AND THEN TRANSFERED TO THIS LOCATION.  THE	/EAG:191

/ TRANSFER TO THIS LOCATION IS PERFORMED BY INDIRECTING THROUGH	/EAG:191

/ LOCATION 105 (.SCOM LOCATION SC.SST).  THIS ROUTINE THEN	/EAG:191

/ PERFORMS THE FOLLOWING ACTIONS:				/EAG:191

/								/EAG:191

/	1.  ENABLE THE CLOCK (AFTER ZEROING WORD 7), JUST IN	/EAG:191

/	    CASE WE HAVE COME FROM RSX OR SOMEONE ELSE WHO	/EAG:191

/	    PASSES US THE DATE AND TIME.			/EAG:191

/								/EAG:191

/	2.  COPY RESMON FROM BANK ZERO TO THE HIGHEST BANK OF	/EAG:191

/	    MEMORY.						/EAG:191

/								/EAG:191

/	3.  TRANSFER CONTROL TO THE HIGHEST BANK OF MEMORY.	/EAG:191

/								/EAG:191

/	4.  CLEAR AND INITIALIZE .SCOM IN BANK ZERO.		/EAG:191

/								/EAG:191

/ FOLLOWING THESE ACTIONS THIS ROUTINE TRANSFERS TO THE NORMAL	/EAG:191

/ MONITOR INITIALIZATION ROUTINE (INIT).			/EAG:191

/								/EAG:191

/								/EAG:191

/ THIS ROUTINE IS INDEPENDENT OF THE BANK INTO WHICH THE	/EAG:191

/ BOOTSTRAP LOADS RESMON.  THE ONLY RESTRICTION (IF YOU WANT	/EAG:191

/ TO CALL IT THAT) IS THAT IT MUST BE LOADED BELOW 32K.		/EAG:191

/ HOWEVER IT DOES REQUIRE THAT THERE BE AT LEAST TWO BANKS	/EAG:191

/ (16K) OF MEMORY.  IT ALSO ASSUMES THAT IT IS IN THE HIGH	/EAG:191

/ PAGE OF A BANK OF MEMORY.					/EAG:191

/								/EAG:191

/								/EAG:191

/ THE BOOTSTRAP SHOULD TRANSFER TO THIS ROUTINE WITH THE	/EAG:191

/ FOLLOWING INSTRUCTION:					/EAG:191

/								/EAG:191

/	JMS IN							/EAG:191

/								/EAG:191

/ THE PURPOSE OF USING A JMS INSTRUCTION IS TO LET THIS ROUTINE	/EAG:191

/ KNOW IN WHICH BANK THE BOOTSTRAP RESIDES.  WE ASSUME THAT	/EAG:191

/ THE BOOTSTRAP RESIDES IN THE HIGHEST BANK OF MEMORY.  THE	/EAG:191

/ JMS INSTRUCTION NEED NOT BE EXACTLY AS SHOWN -- IN FACT IT	/EAG:191

/ WILL PROBABLY BE AN INDIRECT TRANSFER THROUGH LOCATION	/EAG:191

/ SC.SST.							/EAG:191

/								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/ INITIAL ENTRY							/EAG:191

								/EAG:191

IN	JMS .,X			/ PUT JMS HERE JUST IN CASE	/EAG:191

				/ SOMEONE CALLS US WITH JMP	/EAG:191

				/ THE ",X" DOES NOT INDICATE	/EAG:191

				/ AN INDEXED REFERENCE, SINCE	/EAG:191

				/ THE BOOTSTRAP COMES HERE IN	/EAG:191

				/ BANK MODE.  RATHER, ITS JUST	/EAG:191

				/ A KLUDGE TO GET MACRO TO	/EAG:191

				/ GENERATE THE PROPER BANK BIT	/EAG:191

				/ IN THE INSTRUCTION'S ADDRESS.	/EAG:191

	CAF			/ CAF ALSO HERE JUST IN CASE	/EAG:191

	DBA			/ ENTER PAGE MODE		/EAG:191

	DZM* (7)		/ ZERO CLOCK SO WON'T OVERFLOW	/EAG:191

	CLON			/ AND START IT COUNTING.  THIS	/EAG:191

				/ IS SO THAT WE DON'T LOSE	/EAG:191

				/ TRACK OF TIME IF WE HAVE BEEN	/EAG:191

				/ PASSED IT BY, SAY, RSX.	/EAG:191

	LAC IN			/ GET ADDRESS OF HIGH BANK	/EAG:191

	AND (60000		/ MASK OUT BANK BITS		/EAG:191

	DAC IN.00A		/ SAVE IN TEMPORARY		/EAG:191

				/ WE WILL USE THIS VALUE AS AN	/EAG:191

				/ INDIRECT (INDEXED) TRANSFER	/EAG:191

				/ VECTOR TO THE HIGH BANK.	/EAG:191

	LAC (RM.TBS)		/ COPY MONITOR FROM BANK ZERO	/EAG:191

	PAX			/ TO THIS BANK.  START AT	/EAG:191

	TAD (RM.TLN)		/ RM.TBS AND TRANSFER RM.TLN	/EAG:191

	PAL			/ WORDS.			/EAG:191

.X=(0)

IN.002	LAC* .X,X		/ AND TRANSFER RESMON TO THE	/EAG:191

	DAC* IN.00A,X		/ HIGH BANK			/EAG:191

	AXS 1			/ DONE YET?			/EAG:191

	JMP IN.002		/ NO.				/EAG:191

	LAC (IN.010)		/ SET UP ADDRESS TO TRANSFER TO	/EAG:191

	XOR IN			/ IN HIGH BANK.  LABEL IS	/EAG:191

	AND (717777)		/ IN.010, MUST COPY BANK BITS	/EAG:191

	XOR IN			/ FROM IN.			/EAG:191

	DAC IN.00A		/ STORE INTO TRANSFER VECTOR	/EAG:191

	JMP* IN.00A		/ AND GO THERE.			/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

IN.00A	0			/ TEMPORARY USED BY ABOVE	/EAG:191

				/ ROUTINES.			/EAG:191

	.TITLE     .SCOM INITIALIZATION FIRST TIME

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191

/ THIS IS A CONTINUATION OF THE FIRST TIME MONITOR		/EAG:191

/ INITIALIZATION ROUTINE (ENTRY POINT IN).  AT THE TIME		/EAG:191

/ CONTROL REACHES THIS POINT THE FOLLOWING ACTIONS HAVE BEEN	/EAG:191

/ PERFORMED:							/EAG:191

/								/EAG:191

/	1.  THE CLOCK HAS BEEN TURNED ON.			/EAG:191

/								/EAG:191

/	2.  RESMON HAS BEEN COPIED TO THE HIGHEST BANK		/EAG:191

/	    OF MEMORY (ASSUMED TO BE THE BANK IN WHICH		/EAG:191

/	    THE BOOTSTRAP IS LOCATED).				/EAG:191

/								/EAG:191

/	3.  CONTROL HAS BEEN TRANSFERRED TO THE HIGH BANK.	/EAG:191

/								/EAG:191

/ THIS (IN.010) IS THE "ENTRY POINT" INTO THE HIGH BANK		/EAG:191

/ COPY OF RESMON.  WE COMPLETE THE INITIALIZATION BY CLEARING	/EAG:191

/ AND SETTING UP .SCOM, AND THEN JOINING THE NORMAL MONITOR	/EAG:191

/ INITIALIZATION CODE.						/EAG:191

/								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

IN.010	LAC* (SC.DAY)		/ REMEMBER DATE AND TIME IN	/EAG:195

	DAC IN01.A		/ CASE THEY'VE BEEN PASSED TO	/EAG:195

	LAC* (SC.TIM)		/ US BY SOMEONE LIKE RSX.	/EAG:195

	DAC IN01.B						/EAG:195

	LAC (SC.BAS)		/ PUT BASE ADDRESS OF .SCOM	/EAG:191

	PAX			/ INTO XR			/EAG:191

	TAD (SC.LEN)		/ FORM END ADDRESS OF .SCOM	/EAG:191

	PAL			/ AND PUT INTO LR		/EAG:191

.X=(0)

IN.012	DZM* .X,X		/ ZERO OUT .SCOM.		/EAG:191

	AXS 1							/EAG:191

	JMP IN.012						/EAG:191

	LAC SG.MOD		/ SET UP SC.MOD FROM SGNBLK	/EAG:191

.X=SC.XVM!SC.UC15!SC.PLR	/ MASK OUT ILLEGAL BITS		/EAG:192

.X=.X!SC.LPSZ!SC.BNK!SC.FIL					/EAG:192

.X=.X!SC.9CH!SC.TAB!SC.API					/EAG:192

.X=.X!SC.UB1!SC.UB2						/EAG:201

	AND (.X)						/EAG:192

	XOR (SC.NRM)		/ PRETEND NON-RES. MON. JUST	/EAG:192

				/ IN CORE, SO .DAT WILL BE	/EAG:192

				/ GOTTEN FROM SGNBLK INSTEAD	/EAG:192

				/ OF DISK BLOCK 37.		/EAG:192

	DAC* (SC.MOD)						/EAG:191

	LAC SG.MSZ		/ COPY SG.MSZ (SGNBLK) TO	/EAG:191

	DAC* (SC.MSZ)		/ SC.MSZ (.SCOM)		/EAG:191

	LAC SG.LFR		/ ALSO SG.LFR TO SC.TMR		/EAG:194

	DAC* (SC.TMR)						/EAG:194

	LAC SG.VTF		/ AND SG.VTF TO SC.VTF		/EAG:191

.X=SC.HFN!SC.VTN						/EAG:192

	AND (.X)						/EAG:192

	DAC* (SC.VTF)						/EAG:191

	LAC SG.PRC		/ AND SG.PRC TO SC.PRC		/EAG:191

	DAC* (SC.PRC)						/EAG:191

	LAW -16-16		/ SET UP .SCOM .DAT AND .UFDT	/EAG:191

	TAD SG.NMD		/ REGISTERS TO REFER TO IMAGE	/EAG:191

	CLL!RAR			/ OF DEFAULT .DAT IN SGNBLK	/EAG:191

	DAC* (SC.SLT)		/ # OF .DAT SLOTS		/EAG:191

	LAC (SG.BAS+1+15)	/ CALCULAT ADDR. OF .DAT+0	/EAG:191

	TAD SG.NMP						/EAG:191

	TAD IN.00A						/EAG:192

	DAC* (SC.DAT)						/EAG:191

	TAD* (SC.SLT)		/ AND ADDR. OF .UFDT+0		/EAG:191

	AAC 1+15						/EAG:191

	DAC* (SC.UFD)						/EAG:191

	LAC (041723)		/ PUT .SIXBT "DOS15" INTO	/EAG:191

	DAC* (SC.NMN)		/ SC.SPN AND SC.NMN		/EAG:191

	DAC* (SC.SPN)						/EAG:191

	LAC (616500)						/EAG:191

	DAC* (SC.NMN+1)						/EAG:191

	DAC* (SC.SPN+1)						/EAG:191

	LAC (230322)		/ PUT .SIXBT "SCR" INTO SC.UIC	/EAG:191

	DAC* (SC.UIC)						/EAG:191

	LAC (SC.TMM)		/ CAUSE NON-RES. MONITOR TO	/EAG:192

	DAC* (SC.NMF)		/ OUTPUT MODE MESSAGE		/EAG:192

	LAC IN01.A		/ SET UP DATE AND TIME TO WHAT	/EAG:195

	DAC* (SC.DAY)		/ THEY WERE BEFORE ZEROING	/EAG:195

	LAC IN01.B		/ .SCOM.  THIS WILL USUALLY BE	/EAG:195

	DAC* (SC.TIM)		/ ZERO, EXCEPT WHEN WE ARE	/EAG:195

				/ BOOTSTRAPPED FROM RSX.	/EAG:195

	JMP IN.110		/ GO JOIN COMMON (NORMAL)	/EAG:191

				/ MONITOR INITIALIZATION CODE	/EAG:191

								/EAG:195

								/EAG:195

IN01.A	0			/ PLACE TO REMEMBER SC.DAY	/EAG:195

								/EAG:195

IN01.B	0			/ PLACE TO REMEMBER SC.TIM	/EAG:195

	.TITLE MONITOR INITIALIZATION OTHER THAN FIRST TIME

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191

/ WE COME HERE EVERY TIME THE MONITOR RE-BOOTS AND		/EAG:191

/ REINITIALIZES ITSELF -- I.E. EVERY TIME WE CONSTRUCT A NEW	/EAG:191

/ CORE LOAD.  THE BOOTSTRAP IS USED TO READ RESMON (INCLUDING	/EAG:191

/ SGNBLK, SYSBLK, AND COMBLK) INTO THE HIGHEST BANK OF MEMORY,	/EAG:191

/ THEN WE TRANSFER HERE.  THIS ROUTINE THEN TRANSFERS THE	/EAG:191

/ RESIDENT MONITOR TO BANK ZERO AND INITIALIZES IT THERE.	/EAG:191

/								/EAG:191

/								/EAG:191

/ THIS ROUTINE PERFORMS THE FOLLOWING TASKS:			/EAG:191

/								/EAG:191

/	1.  IT TURNS ON THE CLOCK, AFTER FIRST CLEARING		/EAG:191

/	    LOCATION 7 SO THAT IT WON'T OVERFLOW.  THIS IS	/EAG:191

/	    SO THAT THE MONITOR WILL NOT LOSE TRACK OF THE	/EAG:191

/	    CURRENT TIME.					/EAG:191

/								/EAG:191

/	2.  DETERMINES WHICH BANK WE ARE RUNNING IN AND SAVES	/EAG:191

/	    THIS INFORMATION (BANK BITS) IN IN.BNK.  THIS	/EAG:191

/	    INFORMATION IS DETERMINED BY EXECUTING A JMS.	/EAG:191

/								/EAG:191

/	3.  SAVES THE RESIDENT MONITOR SIZE (TO BE USED IN	/EAG:191

/	    SETTING SC.RMS LATER) IN IN.RMS.  THIS INFORMATION	/EAG:191

/	    IS OBTAINED FROM LOCATION SC.RMS IN THIS BANK --	/EAG:191

/	    I.E. FROM LOCATION SC.RMS OF THE DISK IMAGE		/EAG:191

/	    OF THE RESIDENT MONITOR.				/EAG:191

/								/EAG:191

/	4.  VERIFIES THAT THE MONITOR WILL FIT WITHIN THE	/EAG:191

/	    SPACE ALLOCATED FOR IT WHEN THIS FILE WAS		/EAG:191

/	    ASSEMBLED.  THIS TEST CAN ONLY FAIL IF THE MONITOR	/EAG:191

/	    IS PATCHED SO AS TO MAKE IT LARGER.			/EAG:191

/								/EAG:191

/	5.  VERIFIES THAT THE RESIDENT PATCH AREA (ALLOCATED	/EAG:191

/	    WITH SGEN) IS NOT TOO LARGE.  IF IT IS TOO LARGE	/EAG:191

/	    IT WILL BE TRUNCATED TO THE LARGEST SIZE POSSIBLE.	/EAG:191

/								/EAG:191

/	6.  VERIFIES THAT THERE IS SUFFICIENT CORE TO RUN --	/EAG:191

/	    I.E. THAT WE HAVE AT LEAST 16K.  THIS		/EAG:191

/	    INITIALIZATION ROUTINE ASSUMES THAT IT RUNS IN	/EAG:191

/	    A BANK OTHER THAN ZERO, WHICH IS WHERE IT BUILDS	/EAG:191

/	    THE RESIDENT MONITOR.				/EAG:191

/								/EAG:191

/	7.  COPIES THE OLD IMAGE OF .SCOM FROM BANK ZERO TO	/EAG:191

/	    THE HIGHEST BANK (THE BANK IN WHICH THIS ROUTINE	/EAG:191

/	    IS RUNNING).					/EAG:191

/								/EAG:191

/	8.  COPIES THE OLD RESIDENT PATCH AREA (ALLOCATED WITH	/EAG:191

/	    SGEN) FROM BANK ZERO TO THIS BANK.  THE PATCH AREA	/EAG:191

/	    WILL SUBSEQUENTLY BE COPIED BACK TO BANK ZERO BY	/EAG:191

/	    THE ROUTINE IN.MON.					/EAG:191

/								/EAG:191

/	9.  COPIES THE OLD .DAT AND .UFDT TABLES FROM BANK	/EAG:191

/	    ZERO TO THIS BANK.  THEY ARE SAVED IN A BUFFER	/EAG:191

/	    WHOSE NAME IS "IN.SVD".				/EAG:191

/								/EAG:193

/      10.  COPIES THE VT15 (CTRL-X) DISPLAY BUFFER FROM BANK	/EAG:193

/	    ZERO TO THE BEGINNING OF PAGE ONE WITHIN BANK	/EAG:193

/	    ZERO.  THE BEGINNING OF PAGE ONE IS USED AS		/EAG:193

/	    TEMPORARY STORAGE TO HOLD THE DISPLAY BUFFER	/EAG:193

/	    UNTIL IN.VT TAKES CARE OF IT.			/EAG:193

/								/EAG:191

/      11.  CLEARS PAGE ZERO.					/EAG:191

/								/EAG:191

/      12.  SETS UP THE RESIDENT MONITOR IN BANK ZERO.  THIS	/EAG:191

/	    ESSENTIALLY STARTS AT LOCATION ZERO AND WORKS UP,	/EAG:191

/	    BUT WITH EXCEPTIONS.  THIS WILL BE DETAILED AS	/EAG:191

/	    WE GET TO IT.					/EAG:191

/								/EAG:191

/ THE MONITOR FIRST TIME INITIALIZATION ROUTINE JOINS THIS	/EAG:191

/ ROUTINE AT STEP 2 (LABEL IN.110).				/EAG:191

/								/EAG:191

/								/EAG:191

/ THIS ROUTINE MUST RUN IN THE SAME BANK AS THE BOOTSTRAP,	/EAG:191

/ WHICH BANK IS ASSUMED TO BE THE HIGHEST BANK AVAILABLE FOR	/EAG:191

/ EXECUTABLE CODE (I.E., THE HIGHEST BANK BELOW 32K).  THIS	/EAG:191

/ ROUTINE INITIALLY DETERMINES THE BANK IN WHICH IT IS BEING	/EAG:191

/ RUN WITH A JMS INSTRUCTION.  THIS INFORMATION (THE BANK	/EAG:191

/ BITS) IS THEN STORED IN LOCATION IN.BNK, WHICH IS USED BY	/EAG:191

/ THE REST OF THE INITIALIZATION CODE.  .SCOM LOCATION SC.COD	/EAG:191

/ IS ALSO SET FROM THIS INFORMATION.  THIS ROUTINE ALSO		/EAG:191

/ ASSUMES THAT IT IS IN THE HIGH PAGE OF THE BANK.		/EAG:191

/								/EAG:191

/								/EAG:191

/ THIS ROUTINE SHOULD BE ENTERED BY THE FOLLOWING INSTRUCTION:	/EAG:191

/								/EAG:191

/	JMP INIT						/EAG:191

/								/EAG:191

/ THE SOLE EXCEPTION IS WHEN THE FIRST TIME INITIALIZATION	/EAG:191

/ CODE TRANSFERS HERE.  THAT TRANSFER SKIPS THE CLOCK		/EAG:191

/ SET UP CODE (SINCE IT HAS ALREADY SET UP THE CLOCK), AND THUS	/EAG:191

/ COMES HERE VIA:						/EAG:191

/								/EAG:191

/	JMP IN.110						/EAG:191

/								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

INIT	CAF			/ CAF HERE JUST IN CASE		/EAG:191

	DBA			/ ENTER PAGE MODE		/EAG:191

	CLON			/ AND ENABLE CLOCK.		/EAG:191

/ NEXT INSTRUCTION IS ENTRY POINT FROM FIRST TIME INIT. ROUTINE	/EAG:191

IN.110	JMS IN.111		/ DETERMINE BANK IN WHICH	/EAG:191

IN.111	0			/ WE ARE RUNNING		/EAG:191

	LAC IN.111						/EAG:191

	AND (60000)						/EAG:191

	DAC IN.BNK		/ AND SAVE FOR LATER USE	/EAG:191

	PAX			/ ALSO STICK IN XR SO CAN	/EAG:191

				/ ACCESS MONITOR		/EAG:191

.X=(SC.RMS)

	LAC* .X,X		/ SAVE RESIDENT MONITOR SIZE	/EAG:191

	DAC IN.RMS		/ FROM DISK IMAGE IN IN.RMS	/EAG:191

	CLL			/ VERIFY RESIDENT MONITOR SIZE	/EAG:191

	TAD (-RM.LMT)		/ AGAINST ITS LIMIT		/EAG:191

	SNL			/ SKIP IF NOT OK		/EAG:191

	JMP IN.112		/ OK -- GO CHECK PATCH AREA	/EAG:191

	SNA			/ EXCEPT THAT ZERO IS OK TOO	/EAG:191

	JMP IN.112						/EAG:191

	JMS	IN.BIG		/ TYPE 'RES. MON. TOO BIG,'	/RKB-198

	JMS	IN.MSG		/ TYPE REST			/RKB-198

	.ASCII	"OLD IMAGE"<000>				/RKB-198

	JMP IN.FAL		/ AND GO TO FAILURE ROUTINE	/EAG:191

								/EAG:191

								/EAG:191

IN.112	TAD SG.PSZ		/ VERIFY THAT PATCH AREA SIZE	/EAG:191

	SNL			/ ISN'T TOO BIG.  SKIP IF BAD	/EAG:191

	JMP IN.113		/ GO CHECK CORE SIZE		/EAG:191

	SNA			/ ZERO IS OK TOO		/EAG:191

	JMP IN.113						/EAG:191

	TCA			/ DETERMINE MAXIMUM PATCH AREA	/EAG:191

	TAD SG.PSZ		/ SIZE				/EAG:191

	DAC SG.PSZ		/ AND USE IT			/EAG:191

	JMS IN.MSG		/ OUTPUT MESSAGE TO USER	/EAG:191

	.ASCII	<015>"RES. PATCH AREA TOO BIG, TRNCTD. TO "<0>	/RKB-198

	LAC SG.PSZ						/EAG:191

	JMS IN.OCT						/EAG:191

	JMS IN.MSG						/EAG:191

	.ASCII	"(8)"<000>					/RKB-198

	DZM IN.OVF		/ INDICATE THAT A MEMORY	/EAG:193

				/ OVERFLOW OCCURED.		/EAG:193

IN.113	LAC IN.BNK		/ VERIFY THAT WE ARE NOT	/EAG:191

	SZA			/ RUNNING IN BANK ZERO.		/EAG:191

	JMP IN.114						/EAG:191

	JMS IN.MSG		/ OUTPUT ERROR MESSAGE		/EAG:191

	.ASCII	<015>"BOOT. < 24K"<000>				/RKB-198

	JMP IN.FAL		/ AND GO TO FAILURE ROUTINE	/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191

/ COPY OLD .SCOM FROM BANK ZERO TO THIS BANK.			/EAG:191

/ NEXT WE WILL COPY THE RESIDENT PATCH AREA FROM BANK ZERO TO	/EAG:191

/ THIS BANK.							/EAG:191

/ THEN WE WILL COPY THE OLD .DAT AND .UFDT TABLES FROM		/EAG:191

/ BANK ZERO TO THIS BANK.					/EAG:191

/ LAST WE WILL ZERO BANK ZERO.					/EAG:191

/								/EAG:191

								/EAG:191

IN.114	LAC (SC.BAS)		/ BASE ADDR. (WITHIN BANK) OF	/EAG:191

	PAX			/ .SCOM TO XR			/EAG:191

	TAD (SC.LEN)		/ FORM END ADDR. AND PUT IN LR	/EAG:191

	PAL							/EAG:191

.X=(0)

IN.116	LAC* .X,X		/ COPY .SCOM FROM BANK ZERO TO	/EAG:191

	DAC* IN.BNK,X		/ THIS BANK (ADDR IN IN.BNK)	/EAG:191

	AXS 1							/EAG:191

	JMP IN.116						/EAG:191

	LAC IN.RMS		/ SET UP TO COPY RESIDENT	/EAG:191

	PAX			/ PATCH AREA			/EAG:191

	TAD SG.PSZ						/EAG:191

	SAD IN.RMS		/ DOES PATCH AREA EXIST?	/EAG:191

	JMP IN.118		/ NO -- GO COPY .DAT		/EAG:191

	PAL			/ YES -- SO LET'S DO IT		/EAG:191

.X=(0)

IN.117	LAC* .X,X		/ COPY RESIDENT PATCH AREA	/EAG:191

	DAC* IN.BNK,X		/ TO THIS BANK			/EAG:191

	AXS 1							/EAG:191

	JMP IN.117						/EAG:191

IN.118	LAW -15			/ SET UP TO COPY .DAT		/EAG:191

	TAD* (SC.DAT)		/ GET BASE ADDR. OF .DAT	/EAG:191

	DAC IN.11A		/ INTO IN.11A			/EAG:192

	CLX			/ START AT BEGINNING OF .DAT	/EAG:192

	LAC* (SC.SLT)		/ AND COPY THE WHOLE THING	/EAG:192

	AAC 16							/EAG:192

	CLL!RAL							/EAG:192

	PAL							/EAG:192

IN.119	LAC* IN.11A,X		/ COPY .DAT AND .UFDT		/EAG:192

	DAC IN.SVD,X						/EAG:192

	AXS 1							/EAG:191

	JMP IN.119						/EAG:191

	LAC* (SC.VTR)		/ SEE IF DISPLAY BUFFER IS SET	/EAG:193

	SNA			/ UP -- I.E., DOES ONE EXIST.	/EAG:193

	JMP IN.121		/ NO DISPLAY BUFFER -- SKIP	/EAG:193

	AAC VTCOPY-VTMAIN	/ GET BASE ADDRESS OF SECTION	/EAG:193

	DAC IN.11A		/ TO PRESERVE.			/EAG:193

	LAC (VTEND-1-VTCOPY)	/ POINT XR TO LAST LOCATION TO	/EAG:193

	PAX			/ SAVE, AND LR TO FIRST.  WE	/EAG:193

	CLLR			/ MUST COPY THE VT DISPLAY	/EAG:193

IN.120	LAC* IN.11A,X		/ BUFFER HIGHEST ADDRESS FIRST	/EAG:193

.X=(10000)

	DAC* .X,X		/ (RATHER THAN MORE NORMAL	/EAG:193

	AXS -1			/ ORDER) BECAUSE DISPLAY BUFFER	/EAG:193

	SKP			/ AND PLACE WE ARE COPYING IT	/EAG:193

	JMP IN.120		/ TO MAY OVERLAP.		/EAG:193

IN.121	CLX			/ SET UP TO ZERO OUT PAGE ZERO	/EAG:191

	LAC (7)			/ CLEAR LOCATIONS 0 TO 6, THEN	/EAG:191

	PAL			/ SKIP LOC. 7, SO WON'T MESS 	/EAG:191

				/ UP CLOCK			/EAG:191

.X=(0)
IN.122	DZM* .X,X		/ CLEAR TO ADDR IN LR		/EAG:191

	AXS 1							/EAG:191

	JMP IN.122						/EAG:191
	LAC	(SC.BAS+SC.LEN)	/ MOVE LIMIT TO TOP OF .SCOM	/RKB-203

	PAL							/EAG:191

	AXS 1			/ HAVE WE DONE THIS BEFORE?	/EAG:191

	JMP IN.122		/ NO.  AXS SKIPPED OVER LOC. 7	/EAG:191

	JMP IN.HWA		/ ... GO BUILD RESMON.		/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

IN.11A	0			/ TEMPORARY USED ABOVE		/EAG:191

	.TITLE     IN.HWA -- DETERMINE HARDWARE AVAILABILITY

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191

/ PERFORM APPROPRIATE BLACK MAGIC TO DETERMINE WHAT HARDWARE	/EAG:191

/ IS ON SYSTEM.  THIS INFORMATION IS USED TO SET UP THE		/EAG:191

/ FOLLOWING LOCATIONS:						/EAG:191

/								/EAG:191

/	IN.SAPI  CONTAINS SKP IF API PRESENT, NOP OTHERWISE	/EAG:191

/								/EAG:191

/	IN.SUC   CONTAINS SKP IF UC15 PRESENT, NOP OTHERWISE	/EAG:191

/								/EAG:191

/	IN.SXM   CONTAINS SKP IF XM15 (XVM HARDWARE OPTION)	/EAG:191

/		 IS PRESENT, NOP OTHERWISE			/EAG:191

/								/EAG:191

/	IN.AMS	 CONTAINS THE ACTUAL (PHYSICAL) MEMORY SIZE,	/EAG:191

/		 IN THE SAME FORM AS SC.AMS.  IF THE SYSTEM	/EAG:191

/		 DOES NOT HAVE AN XM15 (I.E., IN.SXM CONTAINS	/EAG:191

/		 A NOP) THIS LOCATION WILL ALWAYS CONTAIN	/EAG:191

/		 077777, INDICATING 32K OF MEMORY.		/EAG:191

/								/EAG:191

/	IN.SVT   CONTAINS SKP IF VT15 PRESENT, NOP OTHERWISE	/EAG:191

/								/EAG:191

/	IN.SCLK  CONTAINS SKP IF KW15 CLOCK IS PRESENT, NOP	/EAG:191

/		 OTHERWISE.					/EAG:191

/								/EAG:191

/								/EAG:191

/ NOTE:  IN THE COURSE OF DETERMINING THE AVAILABLE HARDWARE	/EAG:191

/	 THE FOLLOWING SIDE EFFECTS ARE CAUSED:			/EAG:191

/								/EAG:191

/	 1.  INTERRUPTS ARE DISABLED (VIA .INH) AND LEFT	/EAG:191

/	     DISABLED.						/EAG:191

/								/EAG:191

/	 2.  THE UC15 (IF PRESENT) IS DISABLED AND LEFT		/EAG:191

/	     DISABLED (I.E., INTERRUPTS FROM THE PDP-11 ARE	/EAG:191

/	     DISABLED).						/EAG:191

/								/EAG:191

/	 3.  THE MM REGISTER OF THE XM15 HARDWARE OPTION	/EAG:191

/	     (IF PRESENT) IS LOADED WITH THE RELOCATE		/EAG:191

/	     DISABLE, 17-BIT INDIRECT ADDRESSING, AND IOT	/EAG:191

/	     PROTECT DISABLE FLAGS.  THE MM REGISTER IS LEFT	/EAG:191

/	     SET THIS WAY.					/EAG:191

/								/EAG:191

/	 4.  THE PAGE SIZE BITS IN THE VT15 DISPLAY PROCESSOR	/EAG:191

/	     ARE SET AND LEFT THAT WAY.				/EAG:191

/								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/ FIRST CHECK FOR PRESENCE OF API AND SET IN.SAPI		/EAG:191

								/EAG:191
IN.HWA	.INH			/ DISABLE INTERRUPTS, JUST IN	/EAG:191
				/ CASE API IS HERE & ECO'ED.	/RKB-203
/								/RKB-203
/ SINCE THE CLOCK IS NOW RUNNING AND MAY BE WAITING TO		/RKB-203
/ INTERRUPT US, AND WE ARE ABOUT TO ENABLE API FOR THIS		/RKB-203
/ ECO TEST, WE WILL CONNECT A SERVICE SUBROUTINE TO THE		/RKB-203
/ CLOCK API VECTOR FOR THE CASE WHEN IT INTERRUPTS		/RKB-203
/ US WHILE WE'RE WORKING.  THE INTERRUPT SERVICE MERELY		/RKB-203
/ CLEARS THE FLAG AND RETURNS.  IT IS NOT REQUIRED TO		/RKB-203
/ REMEMBER THE FLAG IN ORDER TO PROPERLY KEEP TRACK OF 		/RKB-203
/ THE TIME OF DAY; WE NEED ONLY THE ELAPSED TICK COUNT		/RKB-203
/ IN LOCATION 7.						/RKB-203
/								/RKB-203
	LAC	(INHW.G)	/ THE ADDR OF CLOCK SERVICE	/RKB-203
	TAD	IN.BNK		/ SUBROUTINE			/RKB-203
	DAC*	(2)		/ SAVE IT IN PAGE 0, LOCATION 2	/RKB-203
	LAC	(JMS+20000+2)	/ AND PUT A JMS* 2		/RKB-203
	DAC*	(KW.API)	/ INTO THE API VECTOR		/RKB-203
/ 								/RKB-203
/ CHECK FOR RE-ENTRANCY ECO PACKAGE, ECO'S 49-52, INCL.		/RKB-203
/ AT THE SAME TIME, THE NO-API CASE WILL FALL OUT.  NO API	/RKB-203
/ AND API BUT NOT ECO'ED WILL BE TREATED THE SAME BY THE	/RKB-203
/ MONITOR, EXCEPT IN THE NOT-ECO'ED CASE A SPECIAL MESSAGE	/RKB-203
/ WILL BE OUTPUT.						/RKB-203
/  								/RKB-203
/ WE CHECK FOR THE TWO POINTS OF THE ECO PACKAGE IN WHICH WE	/RKB-203
/ ARE INTERESTED (ALTHOUGH CHECKING FOR JUST ONE SHOULD DO):	/RKB-203
/ THAT INTERRUPTS ARE HELD OFF FOR ONE INST. FOLLOWING A 'JMS'	/RKB-203
/ AND THAT THE .ENB AND .INH INSTRUCTIONS WORK.			/RKB-203
/								/RKB-203
/ CHECK FOR BOTH BY QUEUEING A SOFTWARE LEVEL 5 INTERRUPT.	/RKB-203
/								/RKB-203
	LAC	(JMP+20000+1)	/ SETUP LEVEL 5 VECTOR		/RKB-203
	DAC*	(41)		/ WITH A JMP* 1			/RKB-203
	LAC	(INHW.F)	/ POINT LOC. 1 (TV) TO ERROR	/RKB-203
	TAD	IN.BNK		//				/RKB-203
	DAC*	(1)		/ ROUTINE UP HERE		/RKB-203
/								/RKB-203
	LAC	(API.ON!API.R5)	/ QUEUE THE INTERRUPT		/RKB-203
	ISA			//				/RKB-203
/								/RKB-203
	NOP			/ FREE INSTRUCTION		/RKB-203
	NOP			/ IN CASE A SLOW API SYNC	/RKB-203
/								/RKB-203
/ IF API IS PRESENT BUT NOT ECO'ED, WE'RE NOT HERE, WE'VE	/RKB-203
/ INTERRUPTED TO 'INHW.F'.  SINCE WE ARE HERE, IT MEANS EITHER	/RKB-203
/ THIS MACHINE DOESN'T HAVE API, OR ITS BEEN ECO'ED.		/RKB-203
/ IN ORDER TO GUARANTEE THIS, WE NOW CHECK FOR FREE INST.	/RKB-203
/ FOLLOWING A JMS INST.  OBSERVE:				/RKB-203
/								/RKB-203
	LAC	(INHW.0)	/ CHECK NOW FOR FREE INST	/RKB-203
	TAD	IN.BNK						/RKB-203
				/ FOLLOWING A 'JMS'.  GET SET	/RKB-203
				/ LOADING AC WITH NEW INTERRUPT	/RKB-203
				/ ADDRESS.  WATCH.		/RKB-203
	.ENB			/ ENABLE THE BREAK		/RKB-203
	JMS	.+1		/ THE JMS IS FREE (FOLLOWS	/RKB-203
				/ AN IOT) AND SHOULD CAUSE 	/RKB-203
				/ EXACTLY ONE MORE FREE INST	/RKB-203
	XX			//				/RKB-203
/								/RKB-203
/ IF NO FREE INST AFTER A JMS, CONTROL WILL GO TO 'INHW.F'	/RKB-203
/ BEFORE THE FOLLOWING 'DAC*' CAN OCCUR.  THE INTERRUPT		/RKB-203
/ SHOULD BE HONORED AFTER THE 'DAC*' (WE'LL GIVE IT AN EXTRA	/RKB-203
/ 'NOP' TO BE SURE) IF THE ECO'S ARE IN.  SINCE WE'VE JUST 	/RKB-203
/ CHANGED THE INTERRUPT ADDRESS TO 'INHW.0', WE END UP THERE	/RKB-203
/ IF EITHER THE API IS ABSENT OR ITS ECO'ED.			/RKB-203
/								/RKB-203
	DAC*	(1)		/ THE CRUCIAL INSTRUCTION	/RKB-203
/								/RKB-203
	NOP			/ IN CASE WE MISSED API SYNC	/RKB-203
INHW.0	RPL			/ GET BACK THE API REGISTER	/RKB-203
/								/RKB-203
/ IF WE TOOK THE ERROR TRIP TO 'INHW.F' VIA THE INTERRUPT,	/RKB-203
/ THE NON-ECO'ED API UNIT HAS BEEN DISSABLED, HENCE TO BE	/RKB-203
/ TREATED AS NON-EXISTENT.					/RKB-203
/								/RKB-203
				/	000000 => NO API	/EAG:191
				/	400004 => API PRESENT	/RKB-203
	SMA!CLA			/ CONSTRUCT IN.SAPI WORD	/EAG:191
	LAC (SKP\NOP)						/EAG:191
	XOR (SKP)						/EAG:191
	DAC IN.SAPI						/EAG:191
/								/RKB-203
/ WE MAY HAVE AN API CONDITION TO CLEAR UP, PLUS A FLAG		/RKB-203
/								/RKB-203
	CAF			/ SO DO IT			/RKB-203
				/ (NOTE THAT THE CLOCK IS OK)	/RKB-203
	.INH			/ RETURN TO PROTECTED STATE	/RKB-203
/								/RKB-203
/ NOTE:  WE LEAVE INTERRUPTS DISABLED (VIA .INH)		/EAG:191

/ NOW CHECK FOR UC15 AND SET IN.SUC				/EAG:191

								/EAG:191

	CLA!IAC			/ LOAD AC WITH 000001		/EAG:191

	LDRS			/ AND DISABLE UC15 INTERRUPTS	/EAG:191

				/ (IF UC15 PRESENT)		/EAG:191

	LAW -76			/ DELAY (ABOUT 100.8 USEC.)	/EAG:191

INHW.1	SZA!IAC							/EAG:191

	JMP INHW.1						/EAG:191

	RDRS			/ READ BACK UC15 STATE		/EAG:191

	RAR			/ ENABLE/DISABLE BIT TO LINK	/EAG:191

				/	0 => NO UC15		/EAG:191

				/	1 => UC15 PRESENT	/EAG:191

	SNL!CLA			/ CONSTRUCT IN.SUC WORD		/EAG:191

	LAC (SKP\NOP)						/EAG:191

	XOR (SKP)						/EAG:191

	DAC IN.SUC						/EAG:191

								/EAG:191

/ NOTE:  WE LEAVE UC15 DISABLED					/EAG:191

/ NOW CHECK FOR XM15 AND SET IN.SXM				/EAG:191

								/EAG:191

	LAC (400000)		/ SET RELOCATE DISABLE FLAG	/EAG:192

	LDMM			/ IN MM REGISTER.		/EAG:193

	LAW -76			/ DELAY (ABOUT 100.8 USEC.)	/EAG:191
INHW.2	SZA!IAC							/EAG:191

	JMP INHW.2						/EAG:191

	RDMM			/ READ BACK MM REGISTER.  WILL	/EAG:191

	SAD (400000)		/ BE IDENTICAL IF XM15 PRESENT.	/EAG:191

	CLA!SKP			/ CONSTRUCT IN.SXM WORD		/EAG:191

	LAC (SKP\NOP)						/EAG:191

	XOR (SKP)						/EAG:191

	DAC IN.SXM						/EAG:191

								/EAG:191

/ NOTE:  WE LEAVE THE MM REGISTER WITH THE VARIOUS FLAGS SET	/EAG:191

/ NOW DETERMINE MEMORY SIZE.					/EAG:191

								/EAG:191
	LAC IN.BNK		/ ASSUME XM15 NOT PRESENT	/RKB-208
	TAD	(17777)		/ SET TO BOOT ADDR		/RKB-208

	DAC IN.AMS		/ AND SET IN.AMS ACCORDINGLY	/EAG:191

	XCT IN.SXM		/ XM15 PRESENT?			/EAG:191

	JMP INHW.B		/ NO.  DON'T SIZE MEMORY	/EAG:191

	LAC (JMP+20000+22)	/ XM15 PRESENT, SO SIZE MEMORY	/EAG:191

	DAC* (21)		/ SET UP SO THAT NON-EXISTENT	/EAG:191

	LAC (INHW.6)		/ MEMORY TRAP (WHICH WILL TRAP	/EAG:191

	XOR IN.BNK		/ TO LOCATION 20) WILL COME	/EAG:191

	DAC* (22)		/ BACK TO US AT INHW.6		/EAG:191

	LAC (INHW.4)		/ SET UP XR SO AS TO START	/EAG:193

	XOR IN.BNK		/ SIZING AT LOCATION 0.		/EAG:193

	TCA							/EAG:193

	PAX							/EAG:193

	LAC (377777)		/ LOAD LR WITH MAX. LIMIT	/EAG:191

	PAL							/EAG:191

	CLL			/ CLEAR LINK TO INDICATE WE	/EAG:191

				/ HAVEN'T HIT LIMIT YET.  WHEN	/EAG:191

				/ WE HIT THE LIMIT THE FIRST	/EAG:191

				/ TIME, WILL SET LINK.  IF HIT	/EAG:191

				/ LIMIT TWICE, HAVE GONE THRU	/EAG:191

				/ ALL 256K OF MEMORY, SO ERROR	/EAG:191

	MPEU			/ ENTER USER MODE SO NON-EX.	/EAG:192

				/ MEM. REF.'S WILL TRAP.  NOTE	/EAG:192

				/ THAT RELOCATE DISABLE WAS SET	/EAG:192

				/ PREVIOUSLY.			/EAG:192

INHW.4	LAC .,X			/ AND SIZE MEMORY.  ACCESS	/EAG:191

INHW.5	AXS 200			/ SUCCESSIVELY HIGHER LOCATIONS	/EAG:191

	JMP INHW.4		/ UNTIL GET NON-EXISTENT MEM.	/EAG:191

				/ REF. TRAP			/EAG:191

	SNL!CML			/ HAVE WE HIT LIMIT BEFORE?	/EAG:191

	JMP INHW.4		/ NO -- SET LINK AND CONTINUE	/EAG:191

	JMP INHW.7		/ YES.  GO PRINT ERROR MESSAGE.	/EAG:191

								/EAG:191

								/EAG:191

INHW.6	MPSNE			/ VERIFY THAT WE TRAPPED DUE	/EAG:191

				/ TO NON-EXISTENT MEMORY REF.	/EAG:191

	JMP INHW.7		/ NO!  TYPE ERROR MESSAGE.	/EAG:191

	LAC* (20)		/ DID TRAP OCCUR FROM RIGHT	/EAG:191

	AND (077777)		/ PLACE?			/EAG:191

	XOR IN.BNK						/EAG:191

	SAD (INHW.5)						/EAG:191

	JMP INHW.8		/ YES -- GO STORE MEMORY SIZE	/EAG:191

INHW.7	JMS IN.MSG		/ TRAP DID NOT OCCUR PROPERLY	/EAG:191

				/ OUTPUT ERROR MESSAGE.		/EAG:191

	.ASCII	<15>"HARDWARE FAILURE WHILE SIZING MEM."<000>	/RKB-198

	JMP INHW.9		/ GO OUTPUT REST OF ERROR MSG	/EAG:191

				/ AND USE TOP OF THIS BANK AS	/EAG:191

				/ MEMORY SIZE.			/EAG:191

								/EAG:191

								/EAG:191

INHW.8	PXA			/ HAVE COMPLETED SIZING --	/EAG:191

	TAD IN.BNK		/ GET MEMORY SIZE.		/EAG:193

	TAD (INHW.4-1)						/EAG:193

	DAC IN.AMS						/EAG:191

	CLL!TCA			/ VERIFY THAT MEMORY SIZE IS	/EAG:191

	TAD IN.BNK		/ ABOVE BOOTSTRAP ADDRESS	/EAG:191

	TAD (17776)						/EAG:191

	SNL							/EAG:191

	JMP INHW.A		/ MEMORY SIZE OK -- GO CLEAN UP	/EAG:191

				/ AFTER SIZING OPERATION	/EAG:191

	JMS IN.MSG		/ MEMORY SIZE LESS THAN BOOT-	/EAG:191

				/ STRAP ADDRESS -- OUTPUT MSG	/EAG:191

	.ASCII	<15>"ACT. MEM. SIZE < BOOT."<000>		/RKB-198

INHW.9	LAC IN.BNK		/ MEMORY SIZE BAD -- USE BOOT-	/EAG:191

	XOR (17777)		/ STRAP ADDRESS FOR MEMORY SIZE	/EAG:191

	DAC IN.AMS						/EAG:191

	JMS IN.MSG		/ OUTPUT MESSAGE		/EAG:191

	.ASCII	<15>"BOOT. ADDR. ("<000>			/RKB-198

	LAC IN.AMS		/ AND TELL USER WHAT IT IS	/EAG:191

	JMS IN.NMK						/EAG:191

	JMS IN.MSG						/EAG:191

	.ASCII ") WILL BE USED."<000>				/EAG:191

INHW.A	MPCNE			/ CLEAN UP AFTER SIZING --	/EAG:191

				/ FIRST CLEAR NON-EXISTENT MEM.	/EAG:191

				/ FLAG, THEN			/EAG:191

	DZM* (20)		/ RE-ZERO ANY LOCATIONS IN	/EAG:191

	DZM* (21)		/ BANK ZERO WE MAY HAVE USED	/EAG:191

	DZM* (22)						/EAG:191

	DZM* (0)		/ THIS ONE JUST IN CASE		/EAG:191

								/EAG:191

/ NOW CHECK IF VT15 IS PRESENT					/EAG:191

								/EAG:191

INHW.B	LAC (340)		/ SET PAPER SIZE BITS TO ALL	/EAG:191

	SIC			/ ONE'S				/EAG:191

	LAW -76			/ DELAY (ABOUT 100.8 USEC.)	/EAG:191

INHW.C	SZA!IAC							/EAG:191

	JMP INHW.C						/EAG:191

	RS1+10			/ CHECK PAPER SIZE BITS IN	/EAG:191

	SNA!CLA			/ STATUS REGISTER, AND BUILD	/EAG:191

	LAC (SKP\NOP)		/ IN.SVT WORD			/EAG:191

	XOR (SKP)						/EAG:191

	DAC IN.SVT						/EAG:191

								/EAG:191

/ NOTE:  PAPER SIZE BITS LEFT SET				/EAG:191

/ NOW CHECK OF CLOCK IS PRESENT.  NOTE THAT THE CLOCK HAS	/EAG:191

/ HAS ALREADY TURNED ON (IT WAS THE FIRST THING THE		/EAG:191

/ INITIALIZATION CODE DID.					/EAG:191

								/EAG:191

	LAC (360000)		/ SET UP LOOP COUNTER TO WAIT	/EAG:191

	PAX			/ FOR CLOCK TICK.  LOOP TIME IS	/EAG:191

	CLLR			/ ABOUT 39.3 MSEC.  WE MUST	/EAG:191

				/ GET A CLOCK TICK IN THIS TIME	/EAG:191

				/ OR ELSE WE WILL ASSUME WE	/EAG:191

				/ DON'T HAVE A CLOCK.		/EAG:191

	LAC* (7)		/ GET CURRENT CLOCK VALUE	/EAG:191

INHW.D	AXS 1			/ HAVE WE WAITED LONG ENOUGH?	/EAG:191

	JMP INHW.E		/ YES -- NO CLOCK PRESENT	/EAG:191

	SAD* (7)		/ HAS CLOCK CHANGED YET?	/EAG:191

	JMP INHW.D		/ NO -- WAIT UNTIL IT DOES	/EAG:191

	CLA!SKP			/ EXISTS CLOCK -- GENERATE SKP	/EAG:191
INHW.E	LAC (SKP\NOP)		/ NO CLOCK -- GENERATE NOP	/EAG:191

	XOR (SKP)						/EAG:191

	DAC IN.SCLK						/EAG:191

	XCT IN.SCLK		/ IF WE THINK CLOCK DOESN'T	/EAG:191

	CLOF			/ EXIST, TURN IT OFF (JUST IN	/EAG:191

				/ CASE)				/EAG:191
	JMP IN.LOW		/ CONTINUE WITH INITIALIZATION	/EAG:191
/								/RKB-203
/ THIS IS THE INTERRUPT ROUTINE FOR THE API LEVEL 5 USED IN	/RKB-203
/ DETERMINING WHETHER API EXITSTSAND IS FULLY ECO'ED.		/RKB-203
/								/RKB-203
/ IF WE GET HERE ITS BECAUSE API IS PRESENT AND NOT ECO'ED.	/RKB-203
/ IN THIS CASE WE WILL ISSUE A SPECIAL MESSAGE, AND PROCEED	/RKB-203
/ WITH INITIALIZATION AS  IF API IS NOT AVAILABLE.		/RKB-203
/ NOTE THAT WE WILL BE GETTING THE 'API NOT AVAIL' MESSAGE	/RKB-203
/ A LITTLE LATER ON ALSO.					/RKB-203
/								/RKB-203
INHW.F	CAF			/ TURN OFF API AND CLEAR REGS	/RKB-203
	JMS	IN.MSG		/ TYPE THE ERROR		/RKB-203
	.ASCII	<15>"REENTRANCY ECO'S (KP15 #49-52) MISSING"<0>	/RKB-203
	JMS	IN.MSG		//				/RKB-203
	.ASCII	" -- API CANNOT BE USED"<000>			/RKB-203
	JMP	INHW.0		/ REJOIN MY CODE, SHOWING	/RKB-203
				/ THAT API IS NOT PRESENT	/RKB-203
/								/RKB-203
INHW.G	XX			/ TEMP. CLOCK INTERRUPT SVC	/RKB-203
	CLON			/ CLEAR THE CLOCK FLAG		/RKB-203
	DBR			/ DEBREAK FROM LEVEL 3 SO	/RKB-203
				/ MY LEVEL 5 CAN COME THROUGH	/RKB-203
	JMP*	INHW.G		/ AND EXIT			/RKB-203
/								/RKB-203

	.TITLE     IN.LOW -- INITIALIZE LOCATIONS 0 THROUGH 37

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191

/ LOCATIONS 0 THROUGH 37 (INCLUSIVE) ARE SET UP ACCORDING TO	/EAG:191

/ THE FOLLOWING MEMORY MAP:					/EAG:191

/								/EAG:191

/	00/	PROGRAM INTERRUPT ENTRY POINT			/EAG:191

/	01/	JMP TO SKIP CHAIN				/EAG:191

/	02/	CONTAINS JMP TO BOOTSTRAP.  IS ACTUALLY		/EAG:191

/		INDIRECT JMP THROUGH LOCATION 05		/EAG:191

/	03/	ENTRY POINT TO .MED (MONITOR ERROR DIAGNOSTIC	/EAG:191

/		ROUTINE)					/EAG:191

/	04/	JMP TO .MED ROUTINE IN MONITOR			/EAG:191

/	05/	CONTAINS ADDRESS OF BOOTSTRAP ENTRY POINT.	/EAG:191

/		USED BY LOCATION 02.				/EAG:191

/	06/	RESERVED					/EAG:191

/	07/	CLOCK COUNTER					/EAG:191

/	10/	AUTO-INCREMENT REGISTER X10			/EAG:191

/	 .		.					/EAG:191

/	 .		.					/EAG:191

/	 .		.					/EAG:191

/	17/	AUTO-INCREMENT REGISTER X17			/EAG:191

/	20/	CAL ENTRY POINT.  INITIALIZED TO POINT TO	/EAG:191

/		INDIRECT CAL ERROR ROUTINE.			/EAG:191

/	21/	JMP TO CAL HANDLER				/EAG:191

/	22/	WORD COUNT/CURRENT ADDRESS PAIRS FOR MULTI-	/EAG:191

/	23/	CYCLE BLOCK TRANSFER DEVICES			/EAG:191

/	 .		.					/EAG:191

/	 .		.					/EAG:191

/	 .		.					/EAG:191

/	36/	LAST WORD COUNT/CURRENT ADDRESS PAIR		/EAG:191

/	37/							/EAG:191

/								/EAG:191

/ THIS ROUTINE DOES NOT ACTUALLY SET UP ANY LOCATIONS.		/EAG:191

/ LOCATION 01 IS SET UP BY IN.SKP.  LOCATIONS 02 AND 05 ARE	/EAG:191

/ SET UP BY IN.TRN.  LOCATION 04 IS SET UP BY IN.ERR.		/EAG:191

/ LOCATION 07 HAS ALREADY BEEN SET UP (AND THE CLOCK STARTED).	/EAG:191

/ LOCATIONS 20 AND 21 ARE SET UP BY IN.CAL.  THE REMAINING	/EAG:191

/ LOCATIONS ARE LEFT UNINITIALIZED.				/EAG:191

/								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

IN.LOW	JMP IN.API		/ GO CONTINUE WITH INITIALIZE	/EAG:191

	.TITLE     IN.API -- INITIALIZE API INTERRUPT VECTORS

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191

/ THIS ROUTINE SETS UP THE API INTERRUPT VECTORS (LOCATIONS	/EAG:191

/ 40 THROUGH 77).  LOCATIONS 40, 41, 42, AND 43 (THE SOFTWARE	/EAG:191

/ LEVEL INTERRUPT VECTORS) ARE INITIALIZED TO A JMS* THROUGH	/EAG:191

/ THE APPROPRIATE .SCOM LOCATIONS (SC.LV4, SC.LV5, SC.LV6,	/EAG:191

/ AND SC.LV7 RESPECTIVELY).  ALL OTHER API VECTORS (LOCATIONS	/EAG:191

/ 44 THROUGH 77) ARE INITIALIZED TO A JMS 0.  THUS AN INTERRUPT	/EAG:191

/ TO AN API VECTOR WHICH HAS NOT YET BEEN SET UP (VIA THE	/EAG:191

/ .SETUP CAL) IS EFFECTIVELY TRANFORMED INTO AN ORDINARY,	/EAG:191

/ NON-API PROGRAM INTERRUPT.  THIS INVOKES THE SKIP CHAIN,	/EAG:191

/ WHICH WILL HANDLE THE UNEXPECTED INTERRUPT PROPERLY.		/EAG:191

/								/EAG:191

/ THIS ROUTINE ALSO INITIALIZES SC.LV4, SC.LV5, SC.LV6, AND	/EAG:191

/ SC.LV7 TO POINT TO AN ERROR ROUTINE, WHICH ROUTINE WILL	/EAG:191

/ ISSUE AN IOPS 30 ERROR.  THE ROUTINE ENTRY POINT IS LABEL	/EAG:191

/ SERR.								/EAG:191

/								/EAG:191

/ IF THE UNEXPECTED INTERRUPT IS AN ILLEGAL (IOPS 3) INTERRUPT,	/EAG:191

/ IT WILL FALL THROUGH TO THE END OF THE SKIP CHAIN TO THE	/EAG:191

/ ROUTINE WHICH CAUSES THE IOPS 3 ERROR (FOR MORE INFORMATION	/EAG:191

/ SEE THE COMMENTS ABOUT THE SKIP CHAIN AT IN.SKP).  IF THE	/EAG:191

/ INTERRUPT COMES FROM A DEVICE (SUCH AS AN LT19) WHICH CAN	/EAG:191

/ CAUSE RECOVERABLE SPURIOUS INTERRUPTS, IT WILL FALL THROUGH	/EAG:191

/ THE SKIP CHAIN TO THE ENTRY FOR THAT PARTICULAR DEVICE.	/EAG:191

/ THAT ENTRY WILL CONTAIN CODE TO CLEAR THE INTERRUPT FLAG	/EAG:191

/ AND RECOVER FROM THE SPURIOUS INTERRUPT.			/EAG:191

/								/EAG:191

/ IT SHOULD BE NOTED THAT A POTENTIAL REENTRANCY PROBLEM	/EAG:191

/ EXISTS HERE.  IF WE ARE ALREADY IN THE SKIP CHAIN, DUE TO	/EAG:191

/ A PREVIOUS INTERRUPT (MOST LIKELY A VALID INTERRUPT FROM A	/EAG:191

/ NON-API DEVICE) AND AN UNEXPECTED INTERRUPT AT A HIGHER	/EAG:191

/ PRIORITY OCCURS, WE WILL LOSE TRACK OF FROM WHERE THE		/EAG:191

/ ORIGINAL INTERRUPT CAME.  THERE ARE TWO DISTINCT CASES:	/EAG:191

/								/EAG:191

/      1.  THE SPURIOUS INTERRUPT IS UNRECOVERABLE AND SHOULD	/EAG:191

/	   CAUSE AN IOPS 3 ERROR.  THE LACK OF REENTRANCY IS	/EAG:191

/	   NO PROBLEM.  WE EFFECTIVELY RESTART OUR SCAN OF THE	/EAG:191

/	   SKIP CHAIN FOR THE ORIGINAL INTERRUPT.  WE THEN GO	/EAG:191

/	   OFF AND SERVICE THE ORIGINAL INTERRUPT, FOLLOWING	/EAG:191

/	   WHICH WE RESUME THE SKIP CHAIN SCAN IN THE MIDDLE.	/EAG:191

/	   WE SUBSEQUENTLY FALL OFF THE END OF THE SKIP CHAIN	/EAG:191

/	   AND CAUSE AN IOPS 3 ERROR, JUST AS DESIRED.		/EAG:191

/								/EAG:191

/      2.  THE SPURIOUS INTERRUPT IS RECOVERABLE.  AGAIN, WE	/EAG:191

/	   RESTART OUR SCAN OF THE SKIP CHAIN.  ONE OF THE	/EAG:191

/	   INTERRUPTS IS SERVICED (WHICH ONE DEPENDS UPON	/EAG:191

/	   THE ORDER OF THEIR SKIPS IN THE SKIP CHAIN).		/EAG:191

/	   WE RESUME THE SKIP CHAIN SCAN IN THE MIDDLE.  THE	/EAG:191

/	   OTHER INTERRUPT IS SERVICED (THIS IS GUARANTEED,	/EAG:191

/	   ALTHOUGH I WON'T EXPLAIN THE LOGIC WHICH PROVES	/EAG:191

/	   IT).  AGAIN WE RESUME THE SKIP CHAIN SCAN IN THE	/EAG:191

/	   MIDDLE (DUE TO LACK OF REENTRANCY).  THIS TIME WE	/EAG:191

/	   FALL OFF THE END OF THE SKIP CHAIN AND CAUSE AN	/EAG:191

/	   IOPS 3 ERROR.					/EAG:191

/								/EAG:191

/ THIS SECOND CASE COULD CAUSE A REAL PROBLEM.  IT OCCURS	/EAG:191

/ WHENEVER WE HAVE A DEVICE WHICH CAN CAUSE RECOVERABLE		/EAG:191

/ SPURIOUS INTERRUPTS AT API LEVEL 0, 1, OR 2.  LEVEL 3 ISN'T	/EAG:191

/ A PROBLEM SINCE NON-API INTERRUPTS ARE ALSO AT LEVEL 3.	/EAG:191

/ THE ONLY SUCH DEVICE IS THE VP15.  RATHER THAN GO TO A LOT	/EAG:193

/ OF TROUBLE TO HANDLE THIS ONE RARE CASE I HAVE CHOSEN TO	/EAG:193

/ IGNORE IT, SO THAT IF ONE TRIES HARD ENOUGH ONE CAN CAUSE	/EAG:193

/ IOPS 3 ERRORS BY HITTING THE VP15 SCREEN ERASE BUTTON.	/EAG:193

/								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

IN.API	LAC (JMS+20000+SC.LV4)	/ GET CONTENTS OF VECTOR, AND	/EAG:191

	DAC* (40)		/ STUFF IT IN.			/EAG:191

	AAC SC.LV5-SC.LV4	/ DITTO FOR OTHER VECTORS.	/EAG:191

	DAC* (41)						/EAG:191

	AAC SC.LV6-SC.LV5					/EAG:191

	DAC* (42)						/EAG:191

	AAC SC.LV7-SC.LV6					/EAG:191

	DAC* (43)						/EAG:191

	CLX			/ POINT LR TO 100, AND XR TO	/EAG:191

	AXR 100			/ 44.  THESE LOCATIONS BRACKET	/EAG:191

	PXL			/ HARDWARE API VECTORS.		/EAG:191

	AXR 44-100						/EAG:191

	LAC (JMS+0)		/ CONTENTS OF VECTORS		/EAG:191

.X=(0)

INAP.1	DAC* .X,X		/ AND STUFF IT IN		/EAG:191

	AXS 1							/EAG:191

	JMP INAP.1						/EAG:191

	LAC (SERR)		/ POINT SOFTWARE TRAP VECTORS	/EAG:191

	DAC* (SC.LV4)		/ (IN .SCOM) TO ERROR ROUTINE	/EAG:191

	DAC* (SC.LV5)						/EAG:191

	DAC* (SC.LV6)						/EAG:191

	DAC* (SC.LV7)						/EAG:191

	JMP IN.SCM		/ AND CONTINUE INITIALIZATION	/EAG:191

	.TITLE     IN.SCM -- SET UP .SCOM

								/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191

/ INITIALIZE THE NEW .SCOM (LOCATED IN BANK ZERO), USING	/EAG:191

/ FOR INPUTS THE OLD .SCOM CONTENTS (LOCATED IN THIS BANK),	/EAG:191

/ THE HARDWARE AVAILABILITY/CONFIGURATION INFORMATION, AND	/EAG:191

/ THE CONTENTS OF SGNBLK.					/EAG:191

/								/EAG:191

/ THE ORDER IN WHICH WE DO THINGS IS NOT MEANINGFUL		/EAG:191

/								/EAG:191

/ THIS ROUTINE INITIALIZES THE FOLLOWING .SCOM LOCATIONS:	/EAG:191

/								/EAG:191

/	SC.MOD, SC.COD, SC.MSZ, SC.AMS, SC.FRH,			/EAG:191

/	SC.FRH+1, SC.NMF, SC.SDV, SC.LFR, SC.BLN,		/EAG:191

/	SC.BTL							/EAG:191

/								/EAG:191

/ THIS ROUTINE INITIALIZES THE FOLLOWING .SCOM LOCATIONS	/EAG:191

/ BY MERELY COPYING THEIR VALUES FROM THE OLD .SCOM:		/EAG:191

/								/EAG:191

/	SC.FNM, SC.FNM+1, SC.FNM+2, SC.UIC, SC.SPN, SC.SLT,	/EAG:191

/	SC.SPN+1, SC.NMN, SC.NMN+1, SC.DAY, SC.TIM, SC.ETT,	/EAG:191

/	SC.PRC, SC.TLM, SC.TMR, SC.BNM, SC.ETS			/EAG:191

/								/EAG:191

/ OF THE .SCOM LOCATIONS SET UP BY THIS ROUTINE (LISTED ABOVE)	/EAG:191

/ THE FOLLOWING MAY POSSIBLY BE MODIFIED BY OTHER ROUTINES:	/EAG:191

/								/EAG:191

/	SC.MOD		POSSIBLY MODIFIED BY SYSTEM LOADER	/EAG:191

/	SC.FNM+2	POSSIBLY MODIFIED BY SYSTEM LOADER	/EAG:191

/	SC.BNM		POSSIBLY MODIFIED BY SYSTEM LOADER	/EAG:191

/	SC.FNM		POSSIBLY MODIFIED BY IN.DAT		/EAG:192

/	SC.ETS		POSSIBLY MODIFIED BY IN.BOS		/EAG:194

/	SC.NMF		POSSIBLY MODIFIED BY IN.BAT		/EAG:196

/								/EAG:191

/ THE FOLLOWING .SCOM LOCATIONS ARE SET UP BY OTHER ROUTINES:	/EAG:191

/								/EAG:191

/	SC.LV4, SC.LV5, SC.LV6, SC.LV7 -- ALREADY SET UP BY	/EAG:191

/			IN.API.					/EAG:191

/								/EAG:191

/	SC.RMS		SET UP BY IN.MON AND LATER MODIFIED	/EAG:191

/			BY IN.SKP, IN.DAT, ETC.			/EAG:191

/								/EAG:191

/	SC.UST, SC.BTB, SC.OTB, SC.ACT, SC.BTA --		/EAG:191

/			THESE ARE SET UP BY THE SYSTEM		/EAG:191

/			LOADER AND/OR THE OTHER LOADERS.	/EAG:191

/								/EAG:191

/	SC.DAT, SC.UFD	THESE ARE SET UP BY IN.DAT		/EAG:191

/								/EAG:191

/	SC.VTF, SC.VTR	THESE ARE SET UP BY IN.VT		/EAG:191

/								/EAG:191

/	SC.BOS, SC.RTF	THESE ARE SET UP BY IN.BOS		/EAG:191

/								/EAG:196

/	SC.RTF, SC.BFNM, SC.BFNM+1, SC.BUIC, SC.BDEV --		/EAG:196

/			THESE ARE SET UP BY IN.BAT		/EAG:196

/								/EAG:191

/	SC.CTT		SET UP BY IN.TTA			/EAG:191

/								/EAG:191

/	SC.EEP+1	SET UP BY IN.ERR			/EAG:191

/								/EAG:191

/	SC.TRN		SET UP BY IN.TRN			/EAG:191

/								/EAG:191

/	SC.FRL, SC.FRL+1 -- SET UP BY IN.LDR			/EAG:191

/								/EAG:193

/	SC.TCB		SET UP BY IN.UC15			/EAG:193

/								/EAG:197

/	SC.CQF, SC.CQB	SET UP BY IN.CTQ			/EAG:197

/								/EAG:191

/ THE FOLLOWING LOCATIONS ARE NOT SET UP AT ALL.  THUS THEY	/EAG:191

/ ARE LEFT ZERO:						/EAG:191

/								/EAG:191

/	SC.SST, SC.TTP, SC.TTA, SC.MTS, SC.BBN, SC.TMT,		/EAG:191

/	SC.TMA							/EAG:191

/								/EAG:191

/ THE READER IS CAUTIONED AGAINST ASSUMING THAT THE ABOVE	/EAG:191

/ INFORMATION IS ENTIRELY ACCURATE OR COMPLETE.			/EAG:191

/								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191

/ FIRST WE WILL SET UP SC.NMF, WHICH CONTAINS VARIOUS		/EAG:191

/ FLAGS USED BY THE NON-RESIDENT MONITOR.  FIRST WE WILL	/EAG:191

/ MASK OFF THE FLAGS WHICH ARE PRESERVED.  THEN WE WILL		/EAG:191

/ SET THE HARDWARE PRESENT BITS APPROPRIATELY.  AT THIS		/EAG:191

/ POINT WE ARE DONE WITH SC.NMF.  THE CODE FOLLOWING,		/EAG:191

/ HOWEVER, WHICH SETS UP SC.MOD, MAY SET BIT SC.TMM IN		/EAG:191

/ SC.NMF.							/EAG:191

/								/EAG:191

								/EAG:191

IN.SCM	LAW -10000		/ AVOID BANK ERROR		/EAG:197

	PAX							/EAG:191

	LAC SC.NMF+10000,X	/ AND FETCH OLD SC.NMF		/EAG:191

.X=SC.MIC!SC.NRE!SC.NRO		/ CALCULATE MASK TO MASK OUT	/EAG:191

.X=.X!SC.LPON!SC.DMP!SC.HLT	/ UNDESIRED BITS.		/EAG:191

.X=.X!SC.KPN!SC.TMM						/EAG:196

	AND (.X)		/ MASK OUT UNWANTED STUFF	/EAG:191

.X=SC.PAPI!SC.PUC15!SC.PXVM	/ CALCULATE MASK OF ALL		/EAG:191

.X=.X!SC.PVT!SC.PCLK		/ HARDWARE PRESENT BITS, AND	/EAG:197

	XOR (.X)		/ USE IT TO SET THEM.  WE	/EAG:197

				/ ASSUME ALL HARDWARE IS PRSNT.	/EAG:191

	XCT IN.SAPI		/ VERIFY IF API IS PRESENT	/EAG:191

	AND (777777-SC.PAPI)	/ IF NOT, CLEAR BIT		/EAG:191

	XCT IN.SUC		/ DITTO FOR UC15		/EAG:191

	AND (777777-SC.PUC15)					/EAG:191

	XCT IN.SXM		/ AND FOR XVM			/EAG:191

	AND (777777-SC.PXVM)					/EAG:191

	XCT IN.SVT		/ AND FOR VT15			/EAG:197

	AND (777777-SC.PVT)					/EAG:197

	XCT IN.SCLK		/ AND FOR REAL TIME CLOCK	/EAG:197

	AND (777777-SC.PCLK)					/EAG:197

	DAC* (SC.NMF)		/ AND PUT INTO .SCOM		/EAG:191

/								/EAG:191

/ NEXT WE WILL SET UP SC.MOD, WHICH CONTAINS OPERATING		/EAG:191

/ MODE INFORMATION.  WE WILL USE THE OLD SC.MOD AFTER		/EAG:191

/ VERIFYING VARIOUS FLAGS AGAINST THE CURRENT HARDWARE		/EAG:191

/ CONFIGURATION.						/EAG:191

/ THIS VERIFICATION WILL BE DONE WITH A SUBROUTINE INSC.0,	/EAG:191

/ DEFINED BELOW							/EAG:191

/								/EAG:191

	LAW -10000		/ AVOID BANK ERROR		/EAG:197

	PAX 							/EAG:191

	LAC SC.MOD+10000,X	/ FETCH OLD SC.MOD		/EAG:191

.X=SC.XVM!SC.UC15!SC.PLR	/ CALCULATE MASK TO EXTRACT	/EAG:191

.X=.X!SC.LPSZ!SC.BNK!SC.FIL	/ DESIRED BITS FROM SC.MOD	/EAG:191

.X=.X!SC.9CH!SC.TAB!SC.API					/EAG:191

.X=.X!SC.UB1!SC.UB2						/EAG:201

	AND (.X)		/ MASK OUT BITS WORTH KEEPING	/EAG:191

	DAC* (SC.MOD)		/ AND USE FOR NEW SC.MOD	/EAG:191

	JMS INSC.0		/ AND CHECK FOR API,		/EAG:191

	  SC.API		/    (BIT TO BE CHECKED)	/EAG:191

	  XCT IN.SAPI		/    (SKIP IF HRDWR PRESENT)	/EAG:191

	  .ASCII "API"<000>	/    (NAME FOR NOT AVAIL. MSG)	/EAG:191

	JMS INSC.0		/ AND CHECK FOR XVM		/EAG:191

	  SC.XVM						/EAG:191

	  XCT IN.SXM						/EAG:191

	  .ASCII "XVM"<000>					/EAG:191

	JMS INSC.0		/ AND CHECK FOR UC15		/EAG:191

	  SC.UC15						/EAG:191

	  XCT IN.SUC						/EAG:191

	  .ASCII "UC15"<000>					/EAG:191

	JMS INSC.0		/ AND CHECK FOR KW15 (NEEDED	/EAG:191

	  SC.PLR		/ BY POLLER)			/EAG:191

	  XCT IN.SCLK						/EAG:191

	  .ASCII "CLK"<000>					/EAG:191

	SNL			/ WAS NOT AVAIL. MSG OUTPUT?	/EAG:191

	JMP INSC.2		/ NO -- GO INIT. MORE .SCOM	/EAG:191

	JMS IN.MSG		/ YES -- MUST ADD ADDENDUM	/EAG:191

	.ASCII " -- POLLER DISABLED"<000>			/EAG:191

	JMP INSC.2						/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191

/ SUBROUTINE TO VERIFY THAT A HARDWARE OPTION REQUIRED BY	/EAG:191

/ A MODE SETTING IN SC.MOD IS ACTUALLY PRESENT.  IF THE		/EAG:191

/ HARDWARE ISN'T PRESENT, THE BIT IN SC.MOD WILL BE CLEARED,	/EAG:191

/ BIT SC.TMM IN SC.NMF WILL BE SET,				/EAG:191

/ AND A MESSAGE WILL BE OUTPUT SAYING THAT THE OPTION		/EAG:191

/ IS NOT AVAILABLE.  CALLING SEQUENCE:				/EAG:191

/								/EAG:191

/	JMS INSC.0						/EAG:191

/	  SC.???		/ BIT FLAG IN SC.MOD TO CHECK	/EAG:191

/	  SKP/NOP		/ AN INSTRUCTION WHICH SHOULD	/EAG:191

/				/ BE (EFFECTIVELY) A SKP IF THE	/EAG:191

/				/ HARDWARE OPTION IS PRESENT, A	/EAG:191

/				/ NOP IF IT IS ABSENT.		/EAG:191

/	  .ASCII "????"<000>	/ A 1 TO 4 CHARACTER NAME OF	/EAG:191

/				/ THE HARDWARE OPTION, FOR USE	/EAG:191

/				/ IN THE NOT AVAILABLE MESSAGE	/EAG:191

/								/EAG:191

/ IF THE OPTION IS NOT REQUESTED (I.E., BIT IN SC.MOD CLEAR)	/EAG:191

/ OR IF THE HARDWARE IS PRESENT, THEN THIS SUBROUTINE RETURNS	/EAG:191

/ TO THE CALLER WITH THE LINK CLEAR.  IF THE OPTION IS		/EAG:191

/ REQUESTED AND THE HARDWARE IS NOT PRESENT, THEN THIS		/EAG:191

/ SUBROUTINE CLEARS THE BIT IN SC.MOD, PRINTS THE MESSAGE:	/EAG:191

/								/EAG:191

/	???? NOT AVAILABLE					/EAG:191

/								/EAG:191

/ (WHERE ???? IS THE NAME PROVIDED IN THE CALLING SEQUENCE),	/EAG:191

/ SETS BIT SC.TMM IN SC.NMF, AND RETURNS TO THE CALLER		/EAG:191

/ WITH THE LINK SET.						/EAG:191

/								/EAG:191

								/EAG:191

								/EAG:191

INSC.0	0							/EAG:191

	LAC* INSC.0		/ GET BIT MASK			/EAG:191

	ISZ INSC.0						/EAG:191

	AND* (SC.MOD)		/ AND CHECK REQUEST BIT		/EAG:191

	SNA			/ IF NOT REQUESTED RETURN	/EAG:191

	JMP INSC.1						/EAG:191

	XCT* INSC.0		/ HARDWARE PRESENT?		/EAG:191

	SKP			/ NO -- PRINT MESSAGE AND CLEAR	/EAG:191

				/ REQUEST BIT			/EAG:191

	JMP INSC.1		/ YES -- RETURN			/EAG:191

	XOR* (SC.MOD)		/ CLEAR BIT IN SC.MOD		/EAG:191

	DAC* (SC.MOD)						/EAG:191

	JMS IN.MSG		/ START OUT WITH CARRAIGE	/EAG:191

	.ASCII <015>		/ RETURN			/EAG:191

	LAC INSC.0		/ GET ADDRESS OF NAME		/EAG:191

	AND (77777)						/EAG:191

	IAC							/EAG:191

	PAX			/ IN XR				/EAG:191

	JMS IN.TYP		/ AND TYPE IT			/EAG:191

	JMS IN.MSG		/ TYPE REST OF MESSAGE		/EAG:191

	.ASCII " NOT AVAILABLE"<000>				/EAG:191

	LAC* (SC.NMF)		/ SET BIT SC.TMM IN SC.NMF	/EAG:191

	AND (777777-SC.TMM)	/ CLEAR IT FIRST		/EAG:191

	XOR (SC.TMM)		/ THEN SET IT			/EAG:191

	DAC* (SC.NMF)		/ AND PUT IT BACK		/EAG:191

	STL!SKP			/ SET MESSAGE OUTPUT FLAG	/EAG:191

INSC.1	CLL			/ CLEAR MESSAGE OUTPUT FLAG	/EAG:191

	ISZ INSC.0		/ BUMP PAST ARGUMENTS, AND	/EAG:191

	ISZ INSC.0						/EAG:191

	ISZ INSC.0						/EAG:191

	JMP* INSC.0		/ RETURN TO CALLER		/EAG:191

								/EAG:191

	.EJECT							/EAG:191

/								/EAG:191

/ NOW WE WILL SET UP THE .SCOM LOCATIONS HAVING TO DO		/EAG:191

/ WITH MEMORY LAYOUT AND ALLOCATION.  THESE ARE THE FOLLOWING	/EAG:191

/ LOCATIONS:  SC.COD, SC.MSZ, SC.AMS, SC.FRH, AND SC.FRH+1	/EAG:191

/ THE LOCATIONS SC.RMS, SC.FRL, AND SC.FRL+1 ARE LOGICALLY	/EAG:191

/ PART OF THIS GROUP, BUT THEY ARE LEFT TILL LATER.		/EAG:191

/								/EAG:191

								/EAG:191

INSC.2	LAC IN.BNK		/ AVOID BANK ERROR		/EAG:191

	PAX							/EAG:191

	XOR (BT.BAS-1)		/ AND MAKE ADDRESS OF BOOTSTRAP	/EAG:191

	DAC* (SC.COD)		/ SC.COD			/EAG:191

.X=(SC.MSZ)

	LAC* .X,X		/ ASSUME SC.MSZ OK		/EAG:191

	DAC* (SC.MSZ)						/EAG:191

	LAC* (SC.COD)		/ VERIFY THAT MEMSIZ ABOVE	/EAG:191

	AND (770000)		/ BOOTSTRAP.  START BY GETTING	/EAG:191

	XOR (7777)		/ ADDRESS OF TOP OF BOOTSTRAP,	/EAG:191

	TCA!CLL			/ COMPLEMENTING IT, AND THEN	/EAG:191

	TAD* (SC.MSZ)		/ COMPARE WITH MEMSIZ.		/EAG:191

	SNL			/ SKIP IF OKAY			/EAG:191

	JMP INSC.3		/ NOT OK -- GO TYPE MESSAGE	/EAG:191

	LAC IN.AMS		/ NOW VERIFY THAT MEMSIZ IS	/EAG:191

	TCA!CLL			/ WITHIN THE ACTUAL OR PHYSICAL	/EAG:191

	TAD* (SC.MSZ)		/ MEMORY SIZE.			/EAG:191

	SNA			/ IF SIZES ARE EQUAL, OK	/EAG:191

	JMP INSC.4						/EAG:191

	SNL			/ IF PHYSICAL SIZE BIGGER OK	/EAG:191

	JMP INSC.4						/EAG:191

/ COME HERE IF REQUESTED MEMORY SIZE IS NOT OK.  WHEN WE GET	/EAG:191

/ THE AC CONTAINS (THE MEM. SIZE TO USE)-(THE REQESTED MEM.	/EAG:191

/ SIZE).  THE REQUESTED MEM. SIZE IS ALSO IN SC.MSZ.		/EAG:191

INSC.3	TCA			/ GET PROPER MEMSIZ TO USE	/EAG:191

	TAD* (SC.MSZ)						/EAG:191

	DAC* (SC.MSZ)		/ AND STORE IN .SCOM		/EAG:191

	LAC* (SC.NMF)		/ SET BIT SC.TMM IN SC.NMF SO	/EAG:192

	AND (777777-SC.TMM)	/ NON-RESIDENT MONITOR WILL	/EAG:192

	XOR (SC.TMM)		/ TYPE MODE MESSAGE		/EAG:192

	DAC* (SC.NMF)						/EAG:192

	JMS IN.MSG		/ OUTPUT MESSAGE.  START WITH	/EAG:191

	.ASCII <015>		/ CARRAIGE RETURN,		/EAG:191

	LAW -10000		/ AVOID BANK ERROR		/EAG:197

	PAX							/EAG:192

	LAC SC.MSZ+10000,X	/ FOLLOW WITH			/EAG:191

	JMS IN.NMK		/ REQUESTED MEMSIZ IN "K"	/EAG:191

	JMS IN.MSG		/ FOLLOW WITH TEXT		/EAG:191

	.ASCII	" NOT AVAIL., MEM. SIZE = "<000>		/RKB-198

	LAC* (SC.MSZ)		/ FOLLOW WITH MEMSIZ WHICH WILL	/EAG:191

	JMS IN.NMK		/ BE USED, ALSO IN "K"		/EAG:191

INSC.4	LAC IN.AMS		/ SET UP SC.AMS, WHOSE CONTENTS	/EAG:191

	DAC* (SC.AMS)		/ WE'VE ALREADY DETERMINED	/EAG:191

	LAW -1			/ SET UP SC.FRH			/EAG:191

	DAC* (SC.FRH)		/ ASSUME NO FREE MEMORY UP	/EAG:191

	DAC* (SC.FRH+1)		/ THERE				/EAG:191

	LAC* (SC.MOD)		/ CHECK IF XVM MODE ENABLED	/EAG:191

	AND (SC.XVM)						/EAG:191

	SNA							/EAG:191

	JMP INSC.5		/ NO -- GO DO SOMETHING ELSE	/EAG:191

	LAC* (SC.COD)		/ ROUND SC.COD UP TO NEXT PAGE	/EAG:191

	AND (770000)		/ BOUNDARY, TO CALCULATE	/EAG:191

	TAD (10000)		/ ADDRESS ABOVE BOOTSTRAP	/EAG:191

	TCA!CLL			/ VERIFY THAT SC.MSZ IS ABOVE	/EAG:191

	TAD* (SC.MSZ)		/ THIS, AS OTHERWISE THERE IS	/EAG:191

	SZA			/ NO FREE MEMORY UP THERE.	/EAG:191

	SNL!TCA			/ SKIP IF EXISTS FREE MEMORY	/EAG:191

	JMP INSC.5		/ NO FREE MEMORY -- DO OTHER	/EAG:191

	TAD* (SC.MSZ)		/ GET BACK ADDRESS ABOVE BOOT.	/EAG:191

	DAC* (SC.FRH)		/ AND POINT SC.FRH TO IT.	/EAG:191

	LAC* (SC.MSZ)		/ SC.COD.  SET UP SC.FRH TO	/EAG:191

	DAC* (SC.FRH+1)		/ POINT TO IT.			/EAG:191

	JMP INSC.5		/ AND GO DO SOMETHING ELSE	/EAG:191

								/EAG:191

	.EJECT							/EAG:191

/								/EAG:191

/ NOW WE WILL SET UP VARIOUS MISCELLANEOUS LOCATIONS.  THESE	/EAG:191

/ INCLUDE SC.SDV, SC.LFR, SC.BLN, SC.BTL.			/EAG:191

/								/EAG:191

								/EAG:191

								/EAG:191

INSC.5	LAC SG.SYS		/ FETCH SYSTEM DEVICE NAME	/EAG:192

	IAC			/ AND CONVERT TO "A" HANDLER	/EAG:192

	JMS IN.GNU		/ CONVERT TO HANDLER #		/EAG:192

	  SKP			/ NOT FOUND -- FATAL ERROR	/EAG:192

	JMP INSC.6		/ GO STORE INTO SC.SDV		/EAG:192

	JMS IN.MSG		/ PRINT ERROR MESSAGE		/EAG:191

	.ASCII	<15>"NO SYS. DISK 'A' HANDLER"<000>		/RKB-198

	JMP IN.FAL		/ GO TO FAILURE ROUTINE		/EAG:191

								/EAG:191

								/EAG:191

INSC.6	DAC* (SC.SDV)		/ STORE SYS. DEV. CODE		/EAG:192

	LAC SG.LFR		/ COPY LINE FREQUENCY FROM	/EAG:191

	DAC* (SC.LFR)		/ SGNBLK			/EAG:191

	LAC SG.BLN		/ COPY BUFFER LENGTH FROM	/EAG:191

	DAC* (SC.BLN)		/ SGNBLK			/EAG:191

	LAC (RM.BTL)		/ AND INITIALIZE BUSY TABLE	/EAG:191

	DAC* (SC.BTL)		/ LENGTH			/EAG:191

	JMP INSC.8		/ AND CONTINUE			/EAG:191

								/EAG:191

	.EJECT							/EAG:191

/								/EAG:191

/ COPY VARIOUS LOCATIONS FROM OLD .SCOM TO NEW.  FOR A LIST	/EAG:191

/ OF THESE SEE BELOW.						/EAG:191

/								/EAG:191

								/EAG:191

								/EAG:191

INSC.8	LAC IN.BNK		/ POINT XR TO THIS BANK SO CAN	/EAG:191

	PAX			/ SUCCESSFULLY FETCH .SCOM LOCS	/EAG:197

	XOR (INSC.A)		/ SET UP POINTER INTO TABLE	/EAG:191

	DAC INSC.B						/EAG:191

INSC.9	LAC* INSC.B		/ FETCH NEXT .SCOM ADDRESS	/EAG:191

	SNA			/ REACHED END OF TABLE?		/EAG:191

	JMP IN.MON		/ YES -- GO DO MONITOR		/EAG:191

	DAC INSC.C		/ PUT IN TEMPORARY		/EAG:191

	LAC* INSC.C,X		/ FETCH OLD .SCOM		/EAG:191

	DAC* INSC.C		/ AND PUT INTO NEW		/EAG:191

	ISZ INSC.B		/ BUMP TO NEXT ADDRESS		/EAG:191

	JMP INSC.9		/ AND LOOP			/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191

/ TABLE OF .SCOM LOCATIONS TO COPY FROM OLD .SCOM INTO NEW	/EAG:191

/ .SCOM.							/EAG:191

/								/EAG:191

								/EAG:191
INSC.A	SC.FNM							/EAG:191

	SC.FNM+1						/EAG:191

	SC.FNM+2						/EAG:191

	SC.UIC							/EAG:191

	SC.SPN							/EAG:191

	SC.SPN+1						/EAG:191

	SC.NMN							/EAG:191

	SC.NMN+1						/EAG:191

	SC.DAY							/EAG:191

	SC.TIM							/EAG:191

	SC.ETT							/EAG:191

	SC.PRC							/EAG:191
	SC.TLM							/EAG:191
	SC.TDT			/ TOMORROWS DATE		/RKB-207

	SC.TMR							/EAG:191

	SC.BNM							/EAG:191

	SC.ETS							/EAG:194

	SC.SLT							/EAG:195

	SC.U01							/EAG:201

	SC.U02							/EAG:201

	SC.U03							/EAG:201

	SC.U04							/EAG:201

	SC.U05							/EAG:201

	0			/ END OF TABLE FLAG		/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

INSC.B	-1			/ HOLDS POINTER INTO ABOVE TBL	/EAG:191

								/EAG:191

INSC.C	-1			/ HOLDS .SCOM POINTER		/EAG:191

	.TITLE     IN.MON -- COPY RESIDENT MONITOR TO BANK ZERO

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191

/ TRANSFER RESIDENT MONITOR FROM THIS BANK TO BANK ZERO.	/EAG:191

/ THIS IS A STRAIGHTFORWARD COPY OPERATION.  WE WILL ACTUALLY	/EAG:191

/ TRANSFER BOTH THE RESIDENT MONITOR PROPER PLUS ANY RESIDENT	/EAG:191

/ MONITOR (DYNAMIC) PATCH AREA.  SAID PATCH AREA IS ALLOCATED	/EAG:191

/ BY SGEN.							/EAG:191

/								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/ VERIFY THAT RESIDENT MONITOR DOES NOT OVERLAP .SCOM		/EAG:191

								/EAG:191

	.IFPNZ SC.BAS+SC.LEN-RM.BAS				/EAG:191

ERROR	RESIDENT MONITOR OVERLAPS .SCOM				/EAG:191

ERROR	.LOC .-1						/EAG:191

	.ENDC							/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/ NOW DO THE ACTUAL TRANSFER					/EAG:191

								/EAG:191

IN.MON	LAC (RM.BAS)		/ BEGIN AT THE BEGINNING	/EAG:191

	PAX							/EAG:191

	LAC IN.RMS		/ IN.RMS (I.E. SC.RMS ON DISK)	/EAG:191

				/ INCLUDES .SCOM		/EAG:191

	TAD SG.PSZ		/ ALLOW FOR PATCH AREA		/EAG:191

	PAL							/EAG:191

	DAC* (SC.RMS)		/ PUT RESIDENT MONITOR SIZE	/EAG:191

				/ INTO .SCOM			/EAG:191

INMN.1	LAC* IN.BNK,X		/ TRANSFER MONITOR FROM THIS	/EAG:191

.X=(0)

	DAC* .X,X		/ BANK TO BANK ZERO		/EAG:191

	AXS 1							/EAG:191

	JMP INMN.1						/EAG:191

	JMP IN.CAL						/EAG:191

	.TITLE     IN.CAL -- INITIALIZE CAL HANDLER

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191

/ SET UP CAL TRAP VECTOR TO JUMP TO CAL HANDLER.  FOR MORE	/EAG:191

/ INFORMATION SEE COMMENTS PRECEEDING CAL HANDLER (CL.ENT).	/EAG:191

/								/EAG:195

/ IN ADDITION, IF API WILL NOT BE IN USE, WE MUST CONDITION	/EAG:195

/ THE CAL HANDLER FOR THIS MODE OF OPERATION.  THIS INVOLVES	/EAG:195

/ ELIMINATING A SUBSTANTIAL AMOUNT OF CODE IN CL.ENT (BY	/EAG:195

/ OVERLAYING IT WITH NOP'S) AND REPLACING THE ROUTINE RQ.LV4	/EAG:195

/ WITH THE VERSION IN THE TEMPLATE BELOW.			/EAG:195

/								/EAG:191

								/EAG:191

								/EAG:191
IN.CAL	LAC (JMS+CL.ENT)	/ POINT CAL TRAP VECTOR	 	/EAG:191

	DAC* (CL.VCT+1)		/ TO CAL ENTRY POINT	 	/EAG:191

	LAC (CL.IND)		/ AND POINT CAL*'S	 	/EAG:191

	DAC* (CL.VCT)		/ TO ERROR ROUTINE.	 	/EAG:191

	LAC* (SC.MOD)		/ CHECK OF API WILL BE USED	/EAG:195

	AND (SC.API)						/EAG:195

	SZA			/ SKIP IF IT WON'T		/EAG:195

	JMP INCL.2		/ API ON -- SKIP THIS		/EAG:195

	CLX			/ API OFF -- CONDITION CAL	/EAG:195

	CLLR			/ HANDLER TO RUN WITHOUT API.	/EAG:195
	AXR CLEN.1-CLEN.2	/ OVERLAY CL.ENT LOCATIONS	/RKB-210
	LAC (NOP)		/ CLEN.0 AND CLEN.1 THROUGH	/EAG:196
	DAC* (CLEN.0)		/ CLEN.2-1 INCLUSIVE WITH NOP'S	/RKB-210
.X=(CLEN.2)
INCL.0	DAC* .X,X						/EAG:196

	AXS 1							/EAG:195

	JMP INCL.0						/EAG:195

	CLX			/ REPLACE ROUTINE RQ.LV4 WITH	/EAG:195

	AXR INCL.A-INCL.B-1	/ NON-API VERSION FROM TEMPLATE	/EAG:195
INCL.1	LAC INCL.B+1,X		/ BELOW				/EAG:195

.X=(RQ.LV4+1-INCL.A+INCL.B+1)
	DAC* .X,X						/EAG:195

	AXS 1							/EAG:195

	JMP INCL.1						/EAG:195

INCL.2	JMP IN.XIT		/ FINISHED			/EAG:195

								/EAG:195

								/EAG:195

								/EAG:195

								/EAG:195

/								/EAG:195

/ TEMPLATE BELOW IS THE NON-API VERSION OF RQ.LV4.  LOCATIONS	/EAG:195

/ INCL.A THROUGH INCL.B INCLUSIVE REPLACE RQ.LV4+1 THROUGH	/EAG:195

/ WHATEVER.  NOTE THAT THE "+10000"S BELOW ARE JUST TO AVOID	/EAG:195

/ BANK ERRORS, AND HAVE NO MEANING.				/EAG:195

/								/EAG:195

								/EAG:195

INCL.A	LAC* RQ.LV4+10000	/ PICK UP AUX. ROUTINE ADDR.	/EAG:195

	AAC 2			/ BUMP TO ENTRY POINT		/EAG:195

	DAC RQL4.A+10000	/ SAVE IT AWAY			/EAG:195

	ISZ RQ.LV4+10000	/ PICK UP INTERRUPT VECTOR	/EAG:195

	LAC* RQ.LV4+10000	/ ADDRESS AND SAVE IT AWAY	/EAG:195

	DAC RQL4.B+10000					/EAG:195

	ISZ RQ.LV4+10000	/ BUMP TO RETURN		/EAG:195

	LAC* RQL4.B+10000	/ PICK UP INTERRUPT RETURN	/EAG:195

	DAC* RQL4.A+10000	/ ADDRESS (FROM VECTOR) AND	/EAG:195

				/ GIVE TO AUX. ROUTINE.		/EAG:195

	AND RQL4.D+10000	/ AND WITH CONSTANT 600000	/EAG:195

				/ MASK OFF MODE BITS AND FORCE	/EAG:195

	XOR RQL4.A+10000	/ TO EXEC. MODE, COMBINE WITH	/EAG:195

	IAC			/ AUX. ROUTINE ADDRESS, AND	/EAG:195

	DAC* RQL4.B+10000	/ REPLACE INT. RETURN ADDR.	/EAG:195

				/ WITH THIS.			/EAG:195

INCL.B	JMP* RQ.LV4+10000	/ DONE, SO RETURN		/EAG:195

	.TITLE     IN.XIT -- INITIALIZE .EXIT PROCESSOR

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191

/ FOR INFORMATION SEE COMMENTS PRECEEDING .EXIT CAL FUNCTION	/EAG:191

/ ROUTINE (ENTRY POINT EXIT).					/EAG:191

/								/EAG:191

								/EAG:191

								/EAG:191

IN.XIT	JMS IN.BBT		/ ADD BANK BITS INTO:		/EAG:191

	  EXIT.B						/EAG:191

	  EXIT.C						/EAG:191

	  -1							/EAG:191

	JMP IN.XVM						/EAG:191
	.TITLE     IN.XVM -- SET UP .XVMON/.XVMOFF CAL HANDLER

								/EAG:193

								/EAG:193

								/EAG:193

								/EAG:193

/								/EAG:193

/ CHECK TO SEE IF XVM MODE IS DISABLED.  IF IT IS, PUT A:	/EAG:193

/								/EAG:193

/	JMP CL.ERR						/EAG:193

/								/EAG:193
/ AT LOCATION XMOF.0.  THIS HAS THE EFFECT OF CAUSING ANY	/EAG:193
/ INADVERTENT USE OF THE .XVMON CAL TO RESULT IN AN IOPS 0.	/RKB-203
/ NOTE THAT THE .XVMOFF CAL MAY BE ISSUED ANYTIME.		/RKB-203

/								/EAG:193

								/EAG:193

								/EAG:193

IN.XVM	LAC* (SC.MOD)		/ CHECK IF XVM MODE IS ENABLED.	/EAG:193

	AND (SC.XVM)						/EAG:193

	SZA			/ SKIP IF IT ISN'T.		/EAG:193

	JMP IN.CTQ		/ IT IS ENABLED -- SKIP THIS.	/EAG:193

	LAC (JMP+CL.ERR)	/ IT IS DISABLED -- PUT JMP TO	/EAG:193
	DAC* (XMOF.0)		/ CL.ERR IN PROPER PLACE.	/RKB-203

	JMP IN.CTQ		/ AND CONTINUE			/EAG:193

	.TITLE     IN.CTQ -- SET UP .GET/.PUT/^Q

								/EAG:197

								/EAG:197

								/EAG:197

								/EAG:197

/								/EAG:197

/ INITIALIZE THE .SCOM REGISTERS USED BY .GET AND .PUT.		/EAG:197

/ THIS INVOLVES A MASKED COPY OF SC.CQF FROM THE OLD .SCOM	/EAG:197

/ TO THE NEW .SCOM.  ALSO SET UP SC.CQB AS A THREE WORD		/EAG:197

/ PARAMETER BLOCK TO CONTROL DISK TRANSFERS BETWEEN CORE	/EAG:197

/ AND THE QAREA.  THE INFORMATION DESCRIBING THE QAREA		/EAG:197

/ IS EXTRACTED FROM SYSBLK.  FINALLY WE CONDITION THE		/EAG:197

/ GET/PUT CAL FUNCTION ROUTINE TO ISSUE IOPS 77'S UNDER		/EAG:197

/ THE RIGHT CIRCUMSTANCES.  THERE ARE THREE CONDITIONS,		/EAG:197

/ BASED UPON THE SIZE OF THE QAREA RELATIVE TO THE		/EAG:197

/ BOOTSTRAP ADDRESS:						/EAG:197

/								/EAG:197

/   1.  NO QAREA EXISTS.  PLACE A NOP IN LOCATION PTGT.0,	/EAG:197

/	CAUSING ALL .PUT'S AND .GET'S TO PRODUCE IOPS 77.	/EAG:197

/								/EAG:197

/   2.  A QAREA EXISTS, BUT IS TOO SHORT FOR ALL CORE BELOW	/EAG:197

/	THE BOOTSTRAP TO BE SAVED/RESTORED.  PLACE A SNA	/EAG:197

/	IN LOCATION PTGT.0, SO THAT ALL .PUT'S AND .GET'S	/EAG:197

/	WHICH WILL EXIT BY RESTORING CORE (OVERLAYING IT	/EAG:197

/	FROM THE QAREA) WILL PRODUCE IOPS 77.  .PUT'S AND	/EAG:197

/	.GET'S WHICH EXIT TO THE NON-RESIDENT MONITOR WILL	/EAG:197

/	STILL OPERATE SUCCESSFULLY.				/EAG:197

/								/EAG:197

/   3.  A QAREA EXISTS, AND IT IS LONG ENOUGH SO THAT ALL	/EAG:197

/	CORE BELOW THE BOOTSTRAP WILL BE SAVED/RESTORED.	/EAG:197

/	PLACE A SKP IN LOCATION PTGT.0, SO THAT NO .PUT'S	/EAG:197

/	OR .GET'S WILL PRODUCE IOPS 77.				/EAG:197

/								/EAG:197

/ BESIDES ALL OF THE ABOVE, THIS ROUTINE ALSO SETS UP THE	/EAG:197

/ ^Q DUMP ROUTINE.  ALL WE NEED DO IS DISABLE ^Q DUMPS IN	/EAG:197

/ THE CASE OF NO ^Q AREA EXISTING (CASE #1 ABOVE).  WE DO	/EAG:197

/ THIS BY DEPOSITING A CLA INSTRUCTION IN LOCATIONS ER.CTQ	/EAG:197

/ AND TTCTLQ.							/EAG:197

/								/EAG:197

								/EAG:197

IN.CTQ	LAW -10000		/ AVOID BANK ERROR		/EAG:197

	PAX							/EAG:197

	LAC SC.CQF+10000,X	/ GET SC.CQF FROM OLD .SCOM	/EAG:197

.X=SC.QNF!SC.QPUT!SC.QNRM	/ MASK OUT BITS TO BE		/EAG:197

	AND (.X!SC.QRTN)	/ PRESERVED IN NEW .SCOM	/EAG:197

	DAC* (SC.CQF)						/EAG:197

	LAC IN.BNK		/ SEARCH SYSBLK FOR ENTRY	/EAG:197

	TAD (INCQ.A)		/ FOR "^QAREA"			/EAG:197

	JMS IN.SSB						/EAG:197

	  JMP INCQ.0		/ NOT FOUND			/EAG:197

	LAC SB.BAS+SB.NB,X	/ VERIFY THAT LENGTH ISN'T	/EAG:197

	SNA			/ ZERO				/EAG:197

	JMP INCQ.0						/EAG:197

	LAC SB.BAS+SB.FB,X	/ PUT FIRST DISK BLOCK		/EAG:197

	DAC* (SC.CQB)		/ NUMBER INTO .SCOM		/EAG:197

	LAC SB.BAS+SB.FA,X	/ PUT FIRST CORE ADDRESS	/EAG:197

	AAC -1			/ MINUS 1 INTO .SCOM		/EAG:197

	DAC* (SC.CQB+1)						/EAG:197

	LAW -1			/ GET SIZE -1			/EAG:197

	TAD SB.BAS+SB.PS,X					/EAG:197

	CLL			/ AND CALCULATE LAST CORE	/EAG:197

	TAD SB.BAS+SB.FA,X	/ ADDRESS OF QAREA TRANSFER	/EAG:197

	SZL!TCA			/ COMPLEMENT			/EAG:197

	CLA!IAC!CLL		/ TRUNCATE IF > 2**18		/EAG:197

	TAD* (SC.MSZ)		/ COMPARE AGAINST MEMSIZ	/EAG:197

	SNL!TCA			/ AND WITH THE POSITIVE ...	/EAG:197

	CLA							/EAG:197

	TAD* (SC.MSZ)		/ ... VALUE OF THE SMALLER.	/EAG:197

	CMA			/ TAKE TWO'S COMPLEMENT		/EAG:197

	TAD SB.BAS+SB.FA,X	/ ALLOW FOR BASE ADDRESS	/EAG:197

	SZL			/ MAKE SURE RESULTING XFER	/EAG:197

	JMP INCQ.0		/ LENGTH IS > 0			/EAG:197

	DAC* (SC.CQB+2)		/ AND USE FOR XFER LENGTH	/EAG:197

	TCA			/ GET BACK LAST ADDRESS		/EAG:197

	TAD SB.BAS+SB.FA,X	/ TRANSFERRED			/EAG:197

	TCA			/ AND COMPARE WITH SC.COD	/EAG:197

	TAD* (SC.COD)		/ TO SEE IF ALL MEMORY BELOW	/EAG:197

	LAC (SKP)		/ BOOTSTRAP WILL BE		/EAG:197

	SZL			/ TRANSFERRED.  CONDITION	/EAG:197

	LAC (SNA)		/ PUT/GET CAL ROUTINE		/EAG:197

	DAC* (PTGT.0)		/ APPROPRIATELY.		/EAG:197

	JMP IN.TRN		/ FINISHED HERE			/EAG:197

								/EAG:197

								/EAG:197

/								/EAG:197

/ COME HERE IF ANY OF THE FOLLOWING HOLDS:			/EAG:197

/								/EAG:197

/   1.  NO ENTRY EXISTS IN SYSBLK FOR A QAREA.			/EAG:197

/								/EAG:197

/   2.  A SYSBLK ENTRY EXISTS, BUT HAS ZERO LENGTH.		/EAG:197

/								/EAG:197

/   3.  A QAREA EXISTS, BUT THE TRANSFER OFFSET AND MEMSIZ	/EAG:197

/	ARE SUCH THAT NO INFORMATION WILL BE TRANSFERRED.	/EAG:197

/	THIS CASE WILL NEVER OCCUR, BUT IT IS STILL CHECKED	/EAG:197

/	FOR.							/EAG:197

/								/EAG:197

/ IN ALL OF THESE CASES ALL .GET/.PUT OPERATIONS MUST BE	/EAG:197

/ PROHIBITED, AS NO TRANSFERS TO THE QAREA ARE POSSIBLE.	/EAG:197

/								/EAG:197

								/EAG:197

INCQ.0	LAC (NOP)		/ CONDITION .GET/.PUT CAL	/EAG:197

	DAC* (PTGT.0)		/ ROUTINES APPROPRIATELY.	/EAG:197

	LAC (CLA)		/ DISABLE ^Q			/EAG:197

	DAC* (TTCTLQ)						/EAG:197

	DAC* (ER.CTQ)						/EAG:197

	JMP IN.TRN		/ FINISHED.			/EAG:197

								/EAG:197

								/EAG:197

								/EAG:197

INCQ.A	.SIXBT "^QAREA"		/ NAME OF QAREA FOR		/EAG:197

				/ SEARCHING SYSBLK.		/EAG:197

	.TITLE     IN.TRN -- INITIALIZE RES. MON. TRAN ROUTINE

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191

/ SET UP RESIDENT MONITOR .TRAN ROUTINE.  THIS INCLUDES		/EAG:191

/ STUFF TO THE BOOTSTRAP, AMONG OTHERS.  THIS ROUTINE		/EAG:191

/ DOES THE FOLLOWING:						/EAG:191

/								/EAG:191

/	1.  INSERTS A JUMP TO RM.TRN IN .SCOM LOCATION SC.TRN.	/EAG:191

/	    SEE THE COMMENTS PRECEEDING THE .MTRAN CAL FUNCTION	/EAG:191

/	    ROUTINE (ENTRY POINT MTRAN).			/EAG:191

/								/EAG:191

/	2.  ADDS BANK BITS TO SOME LOCATIONS WITHIN DSKTRN,	/EAG:191

/	    THE MONITOR .TRAN ROUTINE PROPER.  SEE THE		/EAG:191

/	    COMMENTS PRECEEDING IT FOR MORE INFORMATION.	/EAG:191

/								/EAG:191

/	3.  MODIFIES THE BOOTSTRAP SO THAT IT RETURNS TO THE	/EAG:191

/	    APPROPRIATE PLACE WITHIN DSKTRN IF IT ENCOUNTERS	/EAG:192

/	    ANY ERRORS.  THE TRANSFER IS ACCOMPLISHED WITH	/EAG:192

/	    A JMS INSTRUCTION.  NORMALLY THE BOOTSTRAP WOULD	/EAG:192

/	    HALT.						/EAG:192

/								/EAG:192

/	4.  PUTS A JMP TO THE BOOTSTRAP RE-BOOT ENTRY POINT	/EAG:192

/	    INTO LOCATION 2.  THIS IS FOR USE IN CASE OF A	/EAG:192

/	    SYSTEM CRASH OR SOME SUCH THING.  THE JMP IN	/EAG:192

/	    LOCATION 2 USES LOCATION 5 AS A TRANSFER VECTOR.	/EAG:192

/								/EAG:197

/ THERE IS ONE OTHER LOCATION IN THE RESIDENT MONITOR .TRAN	/EAG:197

/ ROUTINE WHICH GETS SET UP.  LOCATION DKTR.U IS INITIALIZED	/EAG:197

/ BY IN.SKP TO CONTAIN A JMP TO THE SKIP CHAIN.			/EAG:197

/								/EAG:191

								/EAG:191

								/EAG:191

IN.TRN	LAC (JMP+RM.TRN)	/ PUT JMP TO RM.TRN IN SC.TRN	/EAG:191

	DAC* (SC.TRN)						/EAG:191

	JMS IN.BBT		/ PUT BANK BITS INTO DSKTRN	/EAG:191

	  DKTR.V						/EAG:192

	  DKTR.W						/EAG:191

	  DKTR.X						/EAG:191

	  DKTR.Y						/EAG:191

	  DKTR.Z						/EAG:191

	  -1							/EAG:191

	LAC (JMS+20000+BT.ERR+1)				/EAG:191

	DAC BT.ERR		/ CAUSE BOOTSTRAP TO GO TO	/EAG:191

	LAC (DKTR.1)		/ DKTR.1 ON DISK ERRORS		/EAG:191

	DAC BT.ERR+1						/EAG:191

	LAC (JMP+20000+5)	/ PUT JMP* THROUGH 5 INTO LOC.	/EAG:192

	DAC* (2)		/ 2, AND POINT LOC. 5 AT	/EAG:192

	LAC (BT.BOO)		/ BOOTSTRAP RE-BOOT ENTRY	/EAG:192

	XOR IN.BNK		/ POINT.  THUS A USER/PROGRAM	/EAG:192

	DAC* (5)		/ CAN CAUSE A SYSTEM COLD-START	/EAG:192

				/ BY STARTING AT/JUMPING TO	/EAG:192

				/ LOCATION 2.			/EAG:192

	JMP IN.ERR						/EAG:191

	.TITLE     IN.ERR -- INITIALIZE MONITOR ERROR ROUTINES

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191

/ SET UP THE ERROR ROUTINES.  USUALLY ALL WE DO IS PUT		/EAG:195

/ TRANSFERS TO THE ERROR ROUTINES IN APPROPRIAE PLACES.		/EAG:195

/ HOWEVER IF EITHER THE HALT COMMAND OR THE QDUMP COMMAND	/EAG:195

/ HAS BEEN GIVEN TO THE NON-RESIDENT MONITOR (EITHER BIT	/EAG:195

/ SC.HLT OR BIT SC.DMP SET IN SC.NMF) THEN WE MUST ALTER	/EAG:195

/ THE MANNER IN WHICH NON-RECOVERABLE (FATAL) IOPS ERRORS	/EAG:195

/ ARE HANDLED.  THIS INVOLVES ALTERING LOCATIONS ER.FTL		/EAG:195

/ AND ER.FTL+1.  IT SHOULD BE NOTED THAT THESE LOCATIONS	/EAG:195

/ MAY ALSO BE ALTERED BY IN.BCH TO CAUSE ERRORS TO BE TREATED	/EAG:195

/ AS BATCH WANTS THEM TO BE.					/EAG:195

/								/EAG:197

/ LOCATION .MED+1 IS ALSO INITIALIZED BY THE RESIDENT MONITOR	/EAG:197

/ .TRAN ROUTINE (DSKTRN).					/EAG:197

/								/EAG:197

/ LOCATION ER.CTQ IS ALSO INITIALIZED BY IN.CTQ, THE ^Q		/EAG:197

/ SET UP ROUTINE.						/EAG:197

/								/EAG:191

								/EAG:191

								/EAG:191

IN.ERR	LAC (JMS+ER.MED)	/ PUT TRANSFERS TO ERROR	/EAG:192

	DAC* (.MED+1)		/ ROUTINES INTO .MED+1		/EAG:192

	LAC (JMS+ER.EEP)	/ AND SC.EEP+1.			/EAG:192

	DAC* (SC.EEP+1)						/EAG:192

	LAC* (SC.NMF)		/ CHECK IF HALT COMMAND HAS	/EAG:195

	AND (SC.HLT)		/ BEEN ISSUED.			/EAG:195

	SNA			/ SKIP IF IT HAS		/EAG:195

	JMP INER.0		/ IT HASN'T -- GO CHECK QDUMP	/EAG:195

	LAC (HLT)		/ HALT COMMAND IN EFFECT --	/EAG:195

	DAC* (ER.FTL)		/ CONDITION ERROR PROCESSOR TO	/EAG:195

	JMP INER.1		/ HALT ON FATAL IOPS ERRORS.	/EAG:195

								/EAG:195

INER.0	LAC* (SC.NMF)		/ CHECK IF QDUMP COMMAND HAS	/EAG:195

	AND (SC.DMP)		/ BEEN ISSUED.			/EAG:195

	SNA			/ SKIP IF IT HAS		/EAG:195

	JMP INER.1		/ IT HASN'T -- DO SOMETHIN ELSE	/EAG:195

	LAW 21			/ QDUMP COMMAND IN EFFECT --	/EAG:195

	DAC* (ER.FTL)		/ CONDITION ERROR PROCESSOR TO	/EAG:195

	LAC (JMP+ER.FAK)	/ DO AUTOMATIC ^Q DUMP ON	/EAG:195

	DAC* (ER.FTL+1)		/ FATAL IOPS ERRORS		/EAG:195

INER.1	JMP IN.CLK		/ DONE WITH ERROR ROUTINES	/EAG:195

	.TITLE     IN.CLK -- SET UP CLOCK INTERRUPT ROUTINES

								/EAG:195

								/EAG:195

								/EAG:195

								/EAG:195

/								/EAG:195

/ THIS ROUTINE CONDITIONS THE CLOCK INTERRUPT ROUTINES FOR	/EAG:195

/ API VS. NON-API OPERATION.  FOR DETAILS OF HOW THIS AFFECTS	/EAG:195

/ THE CLOCK INTERRUPT ROUTINES SEE THE COMMENTS FOR THEM.	/EAG:195

/								/EAG:195

								/EAG:195

IN.CLK	LAC* (SC.MOD)		/ CHECK IF API WILL BE USED	/EAG:195

	AND (SC.API)						/EAG:195

	SZA							/EAG:195

	JMP INCK.0		/ GO SET UP FOR API		/EAG:195

/ SET UP FOR NON-API OPERATION.					/EAG:195

/ CK.TMR AND CK.TLM ARE ALREADY SET UP.				/EAG:195

	LAC (JMP+20000+0)	/ SET UP CK.INT:		/EAG:195

	DAC* (CK.RET)		/	(JMP* 0) --> CK.RET	/EAG:195

	LAC (IOF)		/ SET UP CK.STRT:		/EAG:195

	DAC* (CKST.0)		/	(IOF) --> CKST.0	/EAG:195

	LAC (DAC+0)		/	(DAC 0) --> CKST.1	/EAG:195

	DAC* (CKST.1)						/EAG:195

	LAC (JMP+CK.INT)	/	(JMP CK.INT) --> CKST.2	/EAG:195

	DAC* (CKST.2)						/EAG:195

	LAC (ION)		/	(ION) --> CKST.3	/EAG:195

	DAC* (CKST.3)						/EAG:195

	JMP IN.TTA		/ FINISHED			/EAG:195

								/EAG:195

								/EAG:195

/ COME HERE TO SET UP FOR API OPERATION.			/EAG:195

/ CK.INT, CK.STRT, AND CK.TLM ARE ALREADY SET UP.		/EAG:195

								/EAG:195

INCK.0	CLX			/ COPY API VERSION OF CK.TMR	/EAG:195

	CLLR			/ FROM TEMPLATE BELOW INTO REAL	/EAG:195

	AXR INCK.A-INCK.B-1	/ CK.TMR.			/EAG:195

INCK.1	LAC INCK.B+1,X						/EAG:195

.X=(CKTR.1-INCK.A+INCK.B+1)

	DAC* .X,X				/EAG:196

	AXS 1							/EAG:195

	JMP INCK.1						/EAG:195

	JMP IN.TTA		/ FINISHED			/EAG:195

								/EAG:195

								/EAG:195

								/EAG:195

								/EAG:195

/								/EAG:195

/ BELOW IS THE TEMPLATE FOR THE API VERSION OF CK.TMR.		/EAG:195

/ LOCATIONS INCK.A THROUGH INCK.B INCLUSIVE ARE COPIED		/EAG:195

/ TO CK.TMR BEGINNING AT CKTR.1.  IN THE CODE BELOW		/EAG:195

/ THE "+10000"S ARE TO AVOID BANK ERRORS.  THEY			/EAG:195

/ HAVE NO OTHER MEANING.					/EAG:195

/								/EAG:195

								/EAG:195

INCK.A	DAC* CKTR.A+10000	/ GIVE TO USER'S ROUTINE	/EAG:195

	XOR CKTR.0+10000	/ PICK UP MODE BITS		/EAG:195

	XOR CKTR.A+10000	/ APPEND TO ROUTINE ADDRESS	/EAG:195

	IAC			/ BUMP TO FIRST INSTRUCTION	/EAG:195

	DAC CKTR.A+10000	/ PUT WHERE WE CAN USE IT	/EAG:195

	LAC CKTR.B+10000	/ RESTORE AC			/EAG:195

	DBR			/ AND GO TO USER'S ROUTINE	/EAG:195

INCK.B	JMP* CKTR.A+10000					/EAG:195

								/EAG:195

								/EAG:195

	.IFNEG CKTR.4-CKTR.1-INCK.B+INCK.A			/EAG:195

ERROR	THE NON-API VERSION OF CK.TMR IS SHORTER		/EAG:195

ERROR	THAN THE API VERSION, AND THUS THE API VERSION		/EAG:195

ERROR	WILL NOT FIT.						/EAG:195

ERROR	.LOC .-3						/EAG:195

	.ENDC							/EAG:195

	.TITLE     IN.TTA -- INITIALIZE TELETYPE HANDLER

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191

/ SET UP THE SYSTEM TELETYPE HANDLER.  THE ONLY STUFF WE	/EAG:191

/ DO IS TO ADJUST WHETHER IT OUTPUTS TABS OR AN APPROPRIATE	/EAG:191

/ NUMBER OF SPACES AND ALSO WHETHER OR NOT IT OUTPUTS FILL	/EAG:191

/ CHARACTERS AFTER CARRAIGE RETURNS.  WE ALSO SET UP .SCOM	/EAG:192

/ LOCATION SC.CTT.  WE MUST ALSO CHECK FOR API AND CONDITION	/EAG:201

/ THE CONTROL CHARACTER INTERRUPT PROCESSING ROUTINE FOR	/EAG:201

/ ITS PRESENCE OR ABSCENCE.					/EAG:201

/								/EAG:197

/ LOCATION TTCTLQ IS ALSO SET UP BY IN.CTQ, THE ^Q SET UP	/EAG:197

/ ROUTINE.							/EAG:197

/								/EAG:191

								/EAG:191

								/EAG:191

IN.TTA	LAC* (SC.MOD)		/ PICK UP SC.MOD,		/EAG:191

	AND (SC.TAB)		/ AND CHECK STATUS OF SC.TAB	/EAG:191

	SZA			/ IF CLEAR TYPE SPACES FOR TABS	/EAG:192

	JMP INTT.0		/ IF SET TYPE THE TABS		/EAG:192

	LAC (SAD+TTY011)	/ CONDITION TTA TO OUTPUT	/EAG:191

	DAC* (TT35N1)		/ SPACES FOR TABS		/EAG:191

	LAC (JMS+TABOUT)					/EAG:191

	DAC* (TT35N2)						/EAG:191

	LAC (JMP+NONULL)					/EAG:191

	DAC* (TT35N3)						/EAG:191

	JMP INTT.1		/ GO DO SOMETHING ELSE		/EAG:191

								/EAG:191

INTT.0	LAC (SKP)		/ CONDITION TTA TO OUTPUT	/EAG:191

	DAC* (TT35N1)		/ TABS THEMSELVES		/EAG:191

	LAC (JMS+TTOSVC)	/ FOLLOWED BY A FEW NULLS	/EAG:191

	DAC* (TT35N2)		/ (I DON'T KNOW HOW MANY)	/EAG:191

	LAW -2			/ (THOUGH I THINK THIS MEANS	/EAG:191

	DAC* (TT35N3)		/ ITS 2 NULLS)			/EAG:191

INTT.1	LAC* (SC.MOD)		/ NOW CHECK TO SEE IF WE	/EAG:191

	AND (SC.FIL)		/ WANT FILL CHARACTERS AFTER	/EAG:191

	SNA			/ CARRAIGE RETURNS		/EAG:191

	JMP INTT.2		/ NO -- GO DO SOMETHING ELSE	/EAG:191

	LAC (JMS+LA30CR)	/ YES -- CONDITION TTA TO	/EAG:191

	DAC* (TTYCR1)		/ OUTPUT FILL CHARACTERS AFTER	/EAG:191

	DAC* (TTYCR2)		/ CARRAIGE RETURNS		/EAG:191

	DAC* (TTYCR3)						/EAG:191

INTT.2	LAC (JMS+TTCBSW)	/ DONE WITH TTA. -- SET UP	/EAG:192

	DAC* (SC.CTT)		/ SC.CTT TO CONTAIN INSTR. TO	/EAG:192

				/ CLEAR TTA. BUSY SWITCH.	/EAG:192

				/ REENTRANT ROUTINE TTCBSW	/EAG:192

				/ DOES THIS.			/EAG:192

	LAC* (SC.MOD)		/ IS API IN USE?		/EAG:201

	AND (SC.API)		/ IF IT ISN'T, THE CONTROL CHAR	/EAG:201

	SNA			/ ROUTINES ARE ALREADY SET UP,	/EAG:201

	JMP INTT.3		/ SO SKIP THIS.			/EAG:201

	LAC (NOP)		/ API IN USE -- NOP APPROPRIATE	/EAG:201

	DAC* (TTL4.3)		/ PORTIONS OF CTRL CHAR ROUTINE	/EAG:201

	DAC* (TTL4.4)		/ NOP'ING THESE TWO LOCATINS	/EAG:201

				/ EFFECTIVELY TURNS OFF MUCH	/EAG:201

				/ OTHER CODE.			/EAG:201

	LAC (LAC+TTLV4R)	/ REPLACE OTHER INSTRUCTION	/EAG:201

	DAC* (TTL4.5)		/ WHICH MUST BE CHANGED.	/EAG:201

INTT.3	JMP IN.SKP						/EAG:192

	.TITLE     IN.SKP -- SET UP SKIP CHAIN AND .SETUP CAL

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191

/ SET UP SKIP CHAIN FROM LIST OF SKIPS IN SGNBLK.  THE SKIP	/EAG:191

/ CHAIN IS SET UP ACCORDING TO THE FOLLOWING FORMAT:		/EAG:191

/								/EAG:191

/	0/	0		/ INTERRUPT ENTRY POINT		/EAG:191

/	1/	JMP FOO		/ JMP TO SKIP CHAIN PROPER	/EAG:191

/								/EAG:191

/	FOO/	DAC TMP		/ SAVE AC			/EAG:191

/		IOTSKP		/ FOUR WORD ENTRY FOR FIRST	/EAG:191

/		  WD2		/ SKIP				/EAG:191

/		  WD3						/EAG:191

/		  WD4						/EAG:191

/		 .						/EAG:191

/		 .						/EAG:191

/		 .						/EAG:191

/		IOTSKP		/ ENTRY FOR LAST SKIP		/EAG:191

/		  WD2						/EAG:191

/		  WD3						/EAG:191

/		  WD4						/EAG:191

/		IORS		/ PRINT IOPS3 ERROR		/EAG:191

/		DAC .MED					/EAG:191

/		LAW 3						/EAG:191

/		JMP .MED+1					/EAG:191

/	TMP	0		/ PLACE TO SAVE AC		/EAG:191

/	RECVR	LAC TMP		/ COME HERE TO RECOVER FROM	/EAG:191

/		ION		/ FROM UNWANTED INTERRUPTS,	/EAG:191

/		DBR		/ SUCH AS WE GET FROM LT19	/EAG:191

/		JMP* 0		/ KEYBOARDS			/EAG:191

/								/EAG:191

/ THE BEGINNING OF THE SKIP CHAIN PROPER (LABEL FOO ABOVE) IS	/EAG:191

/ LOCATED IMMEDIATELY ABOVE THE RESIDENT PATCH AREA.  THE	/EAG:191

/ ADDRESS OF THIS LOCATION IS IN SC.RMS WHEN THIS		/EAG:191

/ ROUTINE IS ENTERED.  THIS ROUTINE UPDATES SC.RMS		/EAG:191

/ TO POINT TO THE END OF THE SKIP CHAIN.  THE FORMAT OF THE	/EAG:191

/ FOUR WORD ENTRY FOR EACH SKIP WILL BE ONE OF THE FORMATS	/EAG:191

/ DESCRIBED BELOW.						/EAG:191

/								/EAG:191

/ FOR AN ORDINARY, POSITIVE SKIP (A POSITIVE SKIP SKIPS IF	/EAG:191

/ THE INTERRUPT FLAG IS SET) BEFORE IT IS SET UP:		/EAG:191

/								/EAG:191

/	IOTSKP			/ THE SKIP IOT ITSELF		/EAG:191

/	JMP .+3			/ JMP TO NEXT ENTRY		/EAG:191

/	JMP .+2							/EAG:191

/	0			/ WILL BE TRANSFER VECTOR	/EAG:191

/								/EAG:191

/								/EAG:191

/ FOR A POSITIVE SKIP FOR A DEVICE, SUCH AS AN LT19 OR VP15,	/EAG:191

/ WHICH MAY GENERATE SPURIOUS INTERRUPTS (ALSO BEFORE IT	/EAG:191

/ IS SET UP):							/EAG:191

/								/EAG:191

/	IOTSKP			/ THE SKIP IOT ITSELF		/EAG:191

/	JMP .+3							/EAG:191

/	IOTCLR			/ IOT TO CLEAR THE INTERRUPTING	/EAG:191

/	JMP RECVR		/ FLAG, THEN GO TO RECOVER	/EAG:191

/				/ ROUTINE			/EAG:191

/								/EAG:191

/								/EAG:191

/ FOR A POSITIVE SKIP WHICH HAS BEEN SET UP FOR NON-API USE:	/EAG:191

/								/EAG:191

/	IOTSKP			/ THE SKIP IOT ITSELF		/EAG:191

/	JMP .+3							/EAG:191

/	JMP* .+1		/ JMP TO INTERRUPT ENTRY POINT	/EAG:191

/	ADDR			/ ADDRESS OF ENTRY POINT	/EAG:191

/								/EAG:191

/								/EAG:191

/ FOR A POSITIVE SKIP WHICH HAS BEEN SET UP FOR API USE:	/EAG:191

/								/EAG:191

/	IOTSKP			/ THE SKIP IOT ITSELF		/EAG:191

/	JMP .+3							/EAG:191

/	JMP .+2							/EAG:191

/	ADDR			/ ADDRESS OF ENTRY POINT	/EAG:191

/								/EAG:191

/								/EAG:191

/ FOR A NEGATIVE SKIP WHICH HAS NOT BEEN SET UP (A NEGATIVE	/EAG:191

/ SKIP DOES NOT SKIP IF THE INTERRUPT FLAG IS SET):		/EAG:191

/								/EAG:191

/	IOTSKP			/ THE SKIP IOT ITSELF		/EAG:191

/	JMP .+3							/EAG:191

/	JMP .+2							/EAG:191

/	777777			/ FLAGS THIS AS NEG. SKIP	/EAG:191

/								/EAG:191

/								/EAG:191

/ FOR A NEGATIVE SKIP WHICH HAS BEEN SET UP FOR NON-API USE:	/EAG:191

/								/EAG:191

/	IOTSKP			/ THE SKIP IOT ITSELF		/EAG:191

/	JMP* .+2		/ JMP TO INTERRUPT ENTRY POINT	/EAG:191

/	JMP .+2							/EAG:191

/	ADDR			/ ADDRESS OF ENTRY POINT	/EAG:191

/								/EAG:191

/								/EAG:191

/ FOR A NEGATIVE SKIP WHICH HAS BEEN SET UP FOR API USE:	/EAG:191

/								/EAG:191

/	IOTSKP			/ THE SKIP IOT ITSELF		/EAG:191

/	JMP .+3							/EAG:191

/	JMP .+2							/EAG:191

/	ADDR			/ ADDRESS OF ENTRY POINT	/EAG:191

/								/EAG:191

/								/EAG:191

/ IN ALL CASES, WHEN A SKIP IS SET UP, A JMS* THROUGH THE	/EAG:191

/ LAST WORD OF THE SKIP'S ENTRY (THE ENTRY POINT ADDRESS)	/EAG:191

/ WILL BE PLACED IN THE API VECTOR.  THIS WILL BE DONE		/EAG:191

/ REGARDLESS OF WHETHER OR NOT API IS ENABLED.			/EAG:191

/								/EAG:191

/ IN THE ABOVE DISCUSSION, WHEN WE SAY A SKIP GETS SET UP WE	/EAG:191

/ ARE TALKING ABOUT THE .SETUP CAL.  THE SKIP CHAIN ENTRIES	/EAG:191

/ ARE INITIALLY CONSTRUCTED AS ONE OF THE UN-SET UP FORMATS	/EAG:191

/ DESCRIBED ABOVE.  INVOKING THE .SETUP CAL CONVERTS THE	/EAG:191

/ ENTRY TO THE APPROPRIATE SET UP FORMAT.			/EAG:191

/								/EAG:191

/ THIS ROUTINE ALSO INITIALIZES SOME LOCATIONS IN THE .SETUP	/EAG:191

/ CAL FUNCTION ROUTINE.  THESE ROUTINES ARE STUP.2, STUP.X,	/EAG:191

/ AND STUP.Y.  FOR DETAILS ON WHAT THESE ARE SET UP AS SEE	/EAG:191

/ THE COMMENTS AT THE .SETUP CAL FUNCTION ROUTINE (ENTRY	/EAG:191

/ POINT NAME IS SETUP).						/EAG:191

/								/EAG:197

/ LOCATION 1 (CONTAINING A JMP TO THE SKIP CHAIN) IS ALSO	/EAG:197

/ SET UP BY THE RESIDENT MONITOR .TRAN ROUTINE (DSKTRN).	/EAG:197

/ WE SAVE THE APPROPRIATE JMP IN LOCATION DKTR.U SO THAT	/EAG:197

/ IT CAN DO THIS PROPERLY.					/EAG:197

/								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

IN.SKP	LAC* (SC.MOD)		/ FIRST WE WILL CHECK TO SEE	/EAG:191

	AND (SC.API)		/ IF API IS ENABLED,		/EAG:191

	SNA!CLA							/EAG:191

	LAC (SKP-SZA)		/ AND THEN INITIALIZE STUP.2	/EAG:191

	TAD (SZA)		/ FOR THE APPROPRIATE CASE.	/EAG:191

	DAC* (STUP.2)		/ API ENABLED => (STUP.2)=SZA	/EAG:191

				/ API DISABLED => (STUP.2)=SKP	/EAG:191

	LAC SG.NMP		/ CALCULATE BASE ADDRESS OF	/EAG:191

	TAD SG.NMD		/ SKIP CHAIN IN SGNBLK		/EAG:191

	TAD (SG.BAS+1)						/EAG:191

	XOR IN.BNK						/EAG:191

	DAC INSK.6		/ AND STICK IN INSK.6		/EAG:191

	LAC SG.NMS		/ GET NUMBER OF SKIPS,		/EAG:191

	TCA			/ TAKE TWO'S COMPLEMENT AND	/EAG:191

	DAC* (STUP.X)		/ GIVE TO .SETUP.		/EAG:191

	TCA			/ GET # OF SKIPS BACK AND	/EAG:191

	CLL!RTL			/ CONVERT TO LENGTH OF SKIP	/EAG:191

	IAC			/ CHAIN WHICH WE WILL BUILD	/EAG:191

	TAD* (SC.RMS)		/ AND GET END ADDR. OF SKP CHN	/EAG:191

	PAL			/ AND USE FOR LIMIT		/EAG:191

	LAC* (SC.RMS)		/ USE TOP OF MONITOR AS SKIP	/EAG:191

	PAX			/ CHAIN BASE			/EAG:191

	IAC			/ GET ADDRESS OF FIRST SKIP AND	/EAG:191

	DAC* (STUP.Y)		/ GIVE IT TO .SETUP		/EAG:191

	TAD (JMP-1)		/ CALCULATE JMP TO SKIP CHAIN	/EAG:191

	DAC* (1)		/ AND STICK IT WHERE IT BELONGS	/EAG:191

	DAC* (DKTR.U)		/ ALSO GIVE TO DSKTRN ROUTINE.	/EAG:197

	PLA			/ CALCULATE "DAC TMP"		/EAG:191

	TAD (DAC+INSK.E-INSK.D)					/EAG:191

.X=(0)

	DAC* .X,X		/ AND STICK "DAC TMP" THERE	/EAG:191

	AXS 1			/ BUMP XR.  SKIP IF NO SKIPS	/EAG:191

	SKP							/EAG:191

	JMP INSK.4		/ NO SKIPS IN SKIP CHAIN.  GO	/EAG:191

				/ FINISH OFF.			/EAG:191

INSK.1	PXA			/ CALCULATE 2ND AND 3RD WORDS	/EAG:191

	TAD (JMP+4)		/ OF ENTRY FOR NEXT SKIP	/EAG:191

.X=(1)

	DAC* .X,X		/ ASSUME WILL BE ENTRY FOR	/EAG:191

.X=(2)

	DAC* .X,X		/ SKIP (NO SPURIOUS INTERRUPTS)	/EAG:191

	LAC* INSK.6		/ GET SKIP FOR THIS ENTRY	/EAG:191

	ISZ INSK.6						/EAG:191

	SMA			/ SKIP IF "POSITIVE SKIP"	/EAG:191

	JMP INSK.2		/ GO HANDLE NEGATIVE SKIP	/EAG:191

.X=(0)

	DAC* .X,X		/ STUFF SKIP INTO ENTRY		/EAG:191

.X=(3)

	DZM* .X,X		/ FINISH OFF IF ORDINARY SKIP	/EAG:191

	JMS INSK.7		/ TRANSLATE TO CLEAR IOT	/EAG:191

				/ ON RETURN AC WILL BE ZERO IF	/EAG:191

				/ DEVICE DOES NOT CAUSE		/EAG:191

				/ SPURIOUS INTERRUPTS.  IF AC	/EAG:191

				/ NON-ZERO, DEVICE DOES CAUSE	/EAG:191

				/ SPURIOUS INTERRUPTS AND AC	/EAG:191

				/ CONTAINS IOT TO CLEAR FLAG	/EAG:191

	SNA			/ SKIP IF SPURIOUS INT. DEVICE	/EAG:191

	JMP INSK.3		/ NORMAL DEVICE -- THUS DONE	/EAG:191

.X=(2)

	DAC* .X,X		/ INSERT CLEAR IOT		/EAG:191

	PLA			/ NOW CALCULATE "JMP RECVR"	/EAG:191

	TAD (JMP+INSK.F-INSK.D)					/EAG:191

.X=(3)

	DAC* .X,X		/ AND INSERT			/EAG:191

	JMP INSK.3		/ FINISHED WITH THIS IOT	/EAG:191

								/EAG:191

								/EAG:191

INSK.2	CMA			/ UN-COMPLEMENT NEGATIVE SKIP	/EAG:191

.X=(0)

	DAC* .X,X		/ INSERT			/EAG:191

	LAW -1			/ INSERT NEGATIVE SKIP FLAG	/EAG:191

.X=(3)

	DAC* .X,X						/EAG:191

INSK.3	AXS 4			/ BUMP TO NEXT ENTRY, SKIP IF	/EAG:191

	JMP INSK.1		/ DONE WITH SKIP CHAIN		/EAG:191

INSK.4	PXA			/ NOW APPEND TAIL -- IOPS3,ETC	/EAG:191

	TAD (LAC+INSK.E-INSK.D)					/EAG:191

				/ CALCULATE "LAC TMP" FOR TAIL	/EAG:191

	DAC INSK.F						/EAG:191

	TAD (INSK.G-LAC-INSK.E)					/EAG:191

	PAL			/ CALCULATE END OF TAIL FOR LR	/EAG:191

	TCA			/ NOW CALCULATE MAGIC OFFSET	/EAG:191

	TAD (INSK.G)		/ TO IMAGE OF TAIL		/EAG:191

	TAD IN.BNK						/EAG:191

	DAC INSK.6						/EAG:191

INSK.5	LAC* INSK.6,X		/ COPY TAIL INTO SKIP CHAIN	/EAG:191

.X=(0)

	DAC* .X,X						/EAG:191

	AXS 1							/EAG:191

	JMP INSK.5						/EAG:191

	PXA			/ AND UPDATE RESIDENT MONITOR	/EAG:191

	DAC* (SC.RMS)		/ SIZE				/EAG:191

	AND (770000)		/ VERIFY MONITOR DIDN'T CROSS	/EAG:191

	SNA			/ PAGE BOUNDARY			/EAG:191

	JMP IN.UC15		/ IT DIDN'T, SO OK		/EAG:191

	JMS	IN.BIG		/ TYPE 'RES. MON. TOO BIG DUE TO/RKB-198

	JMS IN.MSG		/ MONITOR TOO BIG -- OUTPUT MSG	/EAG:191

	.ASCII	"SKIP CHAIN"<000>				/RKB-198

	JMS IN.MSG						/EAG:191

	.ASCII "DUE TO SKIP CHAIN"<000>				/EAG:191

	JMP IN.FAL		/ GO TO FAILURE ROUTINE		/EAG:191

								/EAG:191

								/EAG:191

INSK.6	0			/ TEMPORARY USED ABOVE		/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191

/ SUBROUTINE TO CHECK IF SKIP IS FOR A DEVICE WHICH MAY CAUSE	/EAG:191

/ SPURIOUS INTERRUPTS.  IF SO, RETURNS WITH CLEAR FLAG IOT IN	/EAG:191

/ AC.  IF NOT, RETURNS WITH ZERO IN AC.  EXPECTS SKIP IOT IN	/EAG:191

/ AC.								/EAG:191

/								/EAG:191

								/EAG:191

								/EAG:191

INSK.7	0							/EAG:191

	DAC INSK.A		/ SAVE THE SKIP FOR LATER	/EAG:191

	LAC (INSK.C-1)		/ POINT INSK.B TO TABLE		/EAG:191

	XOR IN.BNK						/EAG:191

	DAC INSK.B						/EAG:191

INSK.8	ISZ INSK.B		/ BUMP POINTER TO SKIP IOT	/EAG:191

	LAC* INSK.B		/ PICK UP SKIP IOT		/EAG:191

	ISZ INSK.B		/ BUMP PTR TO CLR FLG IOT	/EAG:191

	SNA			/ HAVE WE REACHED END OF TABLE?	/EAG:191

	JMP INSK.9		/ YES -- GO CHECK FOR LT19	/EAG:191

	SAD INSK.A		/ DO SKIP IOTS MATCH?		/EAG:191

	SKP							/EAG:191

	JMP INSK.8		/ NO -- KEEP LOOKING		/EAG:191

	LAC* INSK.B		/ YES -- PICK UP CLR FLG IOT	/EAG:191

	JMP* INSK.7		/ AND RETURN			/EAG:191

								/EAG:191

								/EAG:191

/ COME HERE AFTER WE'VE EXHAUSTED TABLE TO CHECK FOR LT19 OR	/EAG:191

/ LT15 SKIP.							/EAG:191

								/EAG:191

INSK.9	LAW 777117		/ MASK OUT LINE NUMBER		/EAG:191

	AND INSK.A						/EAG:191

	XOR (KSF1)		/ AND SEE IF ITS LT19 IOT	/EAG:191

	SZA!CLA			/ SKIP IF IT IS			/EAG:191

	JMP* INSK.7		/ IT ISN'T -- RETURN ZERO	/EAG:191

	LAC INSK.A		/ PICK UP SKIP IOT		/EAG:191

	TAD (KRB1-KSF1)		/ AND CONVERT TO CLR FLG IOT	/EAG:191

	JMP* INSK.7		/ AND RETURN			/EAG:191

								/EAG:191

								/EAG:191

INSK.A	0			/ TEMPORARY IN WHICH TO SAVE	/EAG:191

				/ THE SKIP IOT			/EAG:191

								/EAG:191

INSK.B	-1			/ USED TO HOLD POINTER INTO	/EAG:191

				/ FOLLOWING TABLE (INSK.C)	/EAG:191

								/EAG:191

/ FOLLOWING TABLE INDICATES CORRESPONDENCE BETWEEN SKIP IOTS	/EAG:191

/ AND CLEAR FLAG IOTS.  EACH TWO WORD ENTRY HAS THE SKIP IOT	/EAG:191

/ IN THE FIRST WORD AND THE CLEAR FLAG IOT IN THE SECOND.  THE	/EAG:191

/ TABLE IS TERMINATED BY A ZERO WORD.				/EAG:191

								/EAG:191

INSK.C	SDDF			/ VP15 STORAGE TUBE DISPLAY	/EAG:191

	CDDF							/EAG:191

	CLSF			/ KW15 REAL TIME CLOCK		/EAG:191

	CLON							/EAG:191

	KSF			/ CONSOLE TELETYPE KEYBOARD	/EAG:191

	KRB							/EAG:191

	TSF			/ CONSOLE TELETYPE PRINTER	/EAG:191

	TCF							/EAG:191

	0							/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191

/ THE FOLLOWING TABLE IS COPIED INTO THE SKIP CHAIN TO FORM	/EAG:191

/ THE "TAIL" OF THE SKIP CHAIN.  THE WORD IN THE CENTER		/EAG:191

/ (LABEL INSK.F) IS FIRST RELOCATED RELATIVE TO THE BASE OF THE	/EAG:191

/ "TAIL".							/EAG:191

/								/EAG:191

/ IT SHOULD BE NOTED THAT ALL THE "+10000"S BELOW ARE JUST	/EAG:191

/ THERE TO AVOID GETTING BANK ERRORS.  IF MACRO WERE ASSEMBLING	/EAG:191

/ THE CODE AT ITS ACTUAL LOCATION THEY WOULD ALL BE LEFT OFF.	/EAG:191

/								/EAG:191

								/EAG:191

								/EAG:191

INSK.D	IORS			/ GET IO STATUS WORD		/EAG:191

	DAC .MED+10000		/ TO OUTPUT IN IOPS 3 ERROR	/EAG:191

	LAW 3							/EAG:191

	JMP .MED+1+10000	/ AND GO OUTPUT ERROR MESSAGE	/EAG:191

								/EAG:191

INSK.E	0			/ TEMPORARY USED TO STORE AC	/EAG:191

								/EAG:191

INSK.F	LAC INSK.E-INSK.D+10000	/ RESTORE AC			/EAG:191

	ION			/ AND RETURN FROM THE INTERRUPT	/EAG:191

	DBR							/EAG:191

	JMP* 0+10000						/EAG:191

INSK.G=.							/EAG:191

	.TITLE     IN.UC15 -- SET UP FOR UC15 ON

								/EAG:193

								/EAG:193

								/EAG:193

								/EAG:193

/								/EAG:193

/ ALLOCATE SPACE FOR TASK CONTROL BLOCKS USED FOR		/EAG:193

/ COMMUNICATION WITH THE UNICHANNEL I/O PROCESSOR.  ONLY	/EAG:193

/ ALLOCATE THIS SPACE IF THE UC15 OPTION IS ON (I.E. BIT	/EAG:193

/ SC.UC15 IN SC.MOD IS SET).  ALSO CHECK IF UC15 IS OFF		/EAG:193

/ AND SYSTEM DISK IS RK -- GIVE ERROR MESSAGE IF THIS		/EAG:193

/ CONDITION HOLDS, AS IT'S ILLEGAL.				/EAG:193

/								/EAG:195

/ IN ADDITION TO ALLOCATING THE TCB AREA, IF UC15 IS ON WE	/EAG:195

/ ISSUE A STOP ALL TASKS DIRECTIVE TO THE UNICHANNEL.  IF	/EAG:195

/ THE UNICHANNEL FAILS TO RESPOND TO THIS WE PRINT AN		/EAG:195

/ APPROPRIATE MESSAGE AND TURN UC15 OFF.  IF UC15 IS STILL	/EAG:195

/ ON WHEN WE'RE DONE WITH ALL THIS WE APPEND TO THE MONITOR	/EAG:195

/ A ROUTINE (INUC.D BELOW) WHICH ISSUES A STOP ALL TASKS.  WE	/EAG:195

/ ARRANGE FOR THIS ROUTINE TO BE CALLED AT APPROPRIATE TIMES,	/EAG:195

/ SUCH AS DURING .EXIT PROCESSING.				/EAG:195

/								/EAG:193

								/EAG:193

								/EAG:193

IN.UC15	LAC* (SC.MOD)		/ CHECK IF UC15 IS ON		/EAG:193

	AND (SC.UC15)						/EAG:193

	SZA			/ SKIP IF IT ISN'T		/EAG:193

	JMP INUC.0		/ IT IS ON -- GO ALLOCATE TCB'S	/EAG:193

	DZM* (SC.TCB)		/ INDICATE NO TCB TABLE		/EAG:193

	LAC SG.SYS		/ CHECK IF SYSTEM DISK IS RK	/EAG:193

	SAD (221300)		/ SKIP IF IT ISN'T		/EAG:193

	SKP			/ IT IS -- ERROR!		/EAG:193

	JMP IN.PLR						/EAG:193

	JMS IN.MSG		/ PRINT MESSAGE			/EAG:193

	.ASCII	<15>"UC15 OFF ILL., SYS. DISK = RK"<000>	/RKB-198

	LAC* (SC.MOD)		/ FORCE UC15 ON			/EAG:193

	XOR (SC.UC15)						/EAG:193

	DAC* (SC.MOD)						/EAG:193

	LAC* (SC.NMF)		/ AND CAUSE MODE MESSAGE	/EAG:193

	AND (777777-SC.TMM)	/ PRINTOUT			/EAG:193

	XOR (SC.TMM)						/EAG:193

	DAC* (SC.NMF)						/EAG:193

INUC.0=.							/EAG:193

	.IFZER RKTCB						/EAG:193

	LAC SG.SYS		/ IF RK TCB WILL NOT BE		/EAG:193

	SAD (221300)		/ GENERATED CANNOT HAVE RK FOR	/EAG:193

	JMP INUC.7		/ SYSTEM DISK.  IF SO, ERROR.	/EAG:193

	.ENDC							/EAG:193

	LAC (INUC.B)		/ SET UP A POINTER TO		/EAG:193

	XOR IN.BNK		/ THE TCB DEFINITION TABLE	/EAG:193

	DAC INUC.A						/EAG:193

	LAC* (SC.RMS)		/ ALLOCATE SPACE FOR TCB	/EAG:193

	PAX			/ TABLE, AND POINT XR AND	/EAG:193

	DAC* (SC.TCB)		/ AND SC.TCB TO IT.		/EAG:193

	AAC INUC.C-INUC.B					/EAG:193

	DAC* (SC.RMS)						/EAG:193

	PAL			/ ALSO POINT LR PAST IT		/EAG:193

.X=(0)

INUC.1	DAC* .X,X		/ STORE ADDRESS NEXT TCB INTO	/EAG:193

	TAD* INUC.A		/ TABLE, THEN CALC. ITS END.	/EAG:193

	SAD* (SC.RMS)		/ CHECK IF ZERO LENGTH TCB.	/EAG:193

.X=(0)

	DZM* .X,X		/ AND ZERO POINTER IF IT IS	/EAG:193

	DAC* (SC.RMS)		/ REMEMBER HOW MUCH MEMORY	/EAG:193

	ISZ INUC.A		/ USED SO FAR, BUMP TCB DEF.	/EAG:196

	AXS 1			/ POINTER, AND CHECK IF AT END	/EAG:196

	JMP INUC.1		/ OF LOOP.			/EAG:196

	PAL			/ POINT LR PAST ALL TCB'S	/EAG:193

	AND (770000)		/ AND VERIFY THAT TCB AREA	/EAG:193

	SZA			/ DIDN'T OVERFLOW PAGE ZERO.	/EAG:193

	JMP INUC.8		/ ERROR IF IT DID.		/EAG:193

.X=(0)

INUC.2	DZM* .X,X		/ AND CLEAR OUT TCB'S		/EAG:193

	AXS 1							/EAG:193

	JMP INUC.2						/EAG:193

	LAC* (SC.RMS)		/ RELOCATE TRANSFER VECTOR	/EAG:195

	AAC INUC.I-INUC.D	/ USED BY INUC.D		/EAG:195

	DAC INUC.H						/EAG:195

	JMS IN.MOV		/ AND APPEND INUC.D TO MONITOR	/EAG:195

	  INUC.D						/EAG:195

	  INUC.G		/ START OF ABSOLUTE SECTION	/EAG:195

	  INUC.J+1		/ END OF INUC.D			/EAG:195

	SZL			/ DID IT FIT?  SKIP IF YES.	/EAG:195

	JMP INUC.8		/ DIDN'T FIT -- GO ERROR	/EAG:195

	CLA!IAC			/ ISSUE STOP ALL TASKS TO	/EAG:195

INUC.3	SNA!IAC			/ UNICHANNEL, PUTTING TIME	/EAG:195

	JMP INUC.5		/ OUTS ON EVERYTHING.  IF WE	/EAG:195

	SIOA			/ TIME OUT GO TO INUC.5 TO GIVE	/EAG:195

	JMP INUC.3		/ ERROR.			/EAG:195

	LAC INUC.H		/ USE TCB FROM INUC.D		/EAG:195

	AAC INUC.J-INUC.I	/ FORM POINTER TO EVENT		/EAG:195

	DAC INUC.H		/ VARIABLE, AND CLEAR EVENT	/EAG:195

	DZM* INUC.H		/ VARIABLE			/EAG:195

	AAC INUC.I-INUC.J	/ ISSUE TCB TO UNICHANNEL	/EAG:195

	LIOR							/EAG:195

	DZM INUC.G		/ SET UP TIME OUT COUNTER	/EAG:195

INUC.4	LAC* INUC.H		/ TCB FINISHED YET?		/EAG:195

	SZA			/ SKIP IF IT ISN'T		/EAG:195

	JMP INUC.6		/ YES -- GO FINISH UP		/EAG:195

	ISZ INUC.G		/ CHECK TIMEOUT			/EAG:195

	JMP INUC.4		/ KEEP TRYING			/EAG:195

INUC.5	JMS IN.MSG		/ UNICHANNEL TIMEOUT ERROR	/EAG:195

	.ASCII	<15>"UC15 DOESN'T RESPOND"<000>			/RKB-198

	JMP INUC.9		/ GO CHECK IF FATAL ERROR	/EAG:195

								/EAG:195

								/EAG:195

/ COME HERE AFTER STOP ALL TASKS COMPLETES			/EAG:195

								/EAG:195

INUC.6	LAC INUC.H		/ FORM JMS TO INUC.D		/EAG:195

	TAD (JMS+INUC.D-INUC.J)					/EAG:195

	DAC* (UCSTP1)		/ PUT IT WHERE IT BELONGS	/EAG:195

	JMP IN.PLR		/ DONE				/EAG:195

								/EAG:195

								/EAG:193

								/EAG:193

								/EAG:193

	.IFZER RKTCB						/EAG:193

								/EAG:193

/ COME HERE IF RK TCB WILL NOT BE GENERATED AND SYSTEM DISK	/EAG:193

/ IS RK.  THIS COMBINATION OF EVENTS IS A FATAL ERROR.		/EAG:193

								/EAG:193

INUC.7	JMS IN.MSG		/ TYPE MESSAGE			/EAG:193

	.ASCII	<15>"NO RK TCB"<000>				/RKB-198

	JMP IN.FAL						/EAG:193

								/EAG:193

	.ENDC							/EAG:193

								/EAG:193

								/EAG:193

								/EAG:193

/ COME HERE IF TCB AREA OVERFLOWS PAGE ZERO.			/EAG:193

								/EAG:193

INUC.8	JMS	IN.BIG		/ "RES. MON. TOO BIG DUE TO "	/RKB-198

	JMS	IN.MSG		/ TYPE THE REST			/RKB-198

	.ASCII	"UC15 TCB AREA"<000>				/RKB-198

	DZM IN.OVF		/ INDICATE MEMORY OVERFLOW	/EAG:195

				/ HAS OCCURED			/EAG:195

INUC.9	LAC SG.SYS		/ IF SYSTEM DEVICE IS RK	/EAG:193

	SAD (221300)		/ DISK, FATAL ERROR		/EAG:193

	JMP IN.FAL						/EAG:193

	LAC* (SC.MOD)		/ ELSE CAN RECOVER BY TURNING	/EAG:193

	AND (777777-SC.UC15)	/ UC15 OFF			/EAG:193

	DAC* (SC.MOD)						/EAG:193

	LAC* (SC.NMF)		/ ALSO SET MODE MESSAGE TYPE	/EAG:193

	AND (777777-SC.TMM)	/ OUT BIT IN SC.NMF		/EAG:193

	XOR (SC.TMM)						/EAG:193

	DAC* (SC.NMF)						/EAG:193

	LAC* (SC.TCB)		/ DELETE SPACE ALREADY		/EAG:193

	DAC* (SC.RMS)		/ ALLOCATED TO TCB AREA.	/EAG:193

	DZM* (SC.TCB)		/ AND INDICATE NO TCB AREA.	/EAG:193

	JMS IN.MSG		/ AND FINISH MESSAGE		/EAG:193

	.ASCII " -- "<015><011><011>"UC15 ON IGNORED."<000>	/EAG:193

	JMP IN.PLR		/ AND TRY SOMETHING ELSE.	/EAG:193

 								/EAG:193

 								/EAG:193

 								/EAG:193

INUC.A	0			/ POINTER TO TCB DEFINITION	/EAG:193

				/ TABLE				/EAG:193

								/EAG:193

								/EAG:193

								/EAG:193

/								/EAG:193

/ TCB DEFINTION TABLE.  EACH ENTRY CONTAINS LENGTH OF		/EAG:193

/ CORRESPONDING TCB OR ZERO IF IT DOESN'T EXIST.		/EAG:193

/								/EAG:193

								/EAG:193

INUC.B	RKTCB			/ RK DISK DRIVE(S)		/EAG:193

	LPTCB			/ LINE PRINTER			/EAG:193

	CDTCB			/ CARD READER			/EAG:193

	PLTCB			/ PLOTTER (XY)			/EAG:193

	TCB1			/ SPARE #1			/EAG:193

	TCB2			/ SPARE #2			/EAG:193

	TCB3			/ SPARE #3			/EAG:193

	LVTCB			/ PRINTER/PLOTTER		/EAG:197

	DLTCB			/ COMMUNICATIONS		/EAG:197

INUC.C=.							/EAG:193

								/EAG:195

								/EAG:195

								/EAG:195

								/EAG:195

/								/EAG:195

/ FOLLOWING ROUTINE ISSUES A STOP ALL TASKS TO THE UNICHANNEL.	/EAG:195

/ IT IS APPENDED TO THE MONITOR WHEN UC15 IS ON AND WILL BE	/EAG:195

/ INVOKED FROM ALL THE RIGHT PLACES.  IT PLACES A TIME LIMIT	/EAG:195

/ ON HOW LONG THE UNICHANNEL HAS TO RESPOND.  IF THE UNICHANNEL	/EAG:195

/ DOESN'T RESPOND IN TIME THE ROUTINE TIMES OUT AND RETURNS	/EAG:195

/ ANYWAY, WITHOUT WAITING FOR THE STOP ALL TASKS TO COMPLETE.	/EAG:195

/ NORMALLY THIS ROUTINE WAITS FOR THE STOP ALL TASKS TO		/EAG:195

/ COMPLETE BEFORE RETURNING.  THE POLLER SHOULD BE SHUT DOWN	/EAG:195

/ PRIOR TO CALLING THIS ROUTINE.				/EAG:195

/								/EAG:195

/ THE LABELS INUC.D, INUC.G, AND INUC.J ARE USED TO DELIMIT	/EAG:195

/ THE VARIOUS SECTIONS OF THE ROUTINE, IN ADDITION TO		/EAG:195

/ BEING USED AS ORDINARY LABELS.				/EAG:195

/								/EAG:195

								/EAG:195

INUC.D	0							/EAG:195

	CLA!IAC			/ SET UP TIMEOUT FOR SIOA	/EAG:195

INUC.E	SNA!IAC			/ WAIT FOR UNICHANNEL TO BE	/EAG:195

	JMP* INUC.D		/ ABLE TO ACCEPT TCB POINTER	/EAG:195

	SIOA							/EAG:195

	JMP INUC.E						/EAG:195

	DZM INUC.J		/ CLEAR EVENT VARIABLE		/EAG:195

	LAC INUC.H		/ PICK UP TCB POINTER		/EAG:195

	LIOR			/ GIVE IT TO UNICHANNEL		/EAG:195

	DZM INUC.G		/ SET UP TIMEOUT		/EAG:195

INUC.F	LAC INUC.J		/ TCB COMPLETE YET?		/EAG:195

	SZA			/ SKIP IF NOT			/EAG:195

	JMP* INUC.D		/ YES -- RETURN			/EAG:195

	ISZ INUC.G		/ CHECK TIMEOUT			/EAG:195

	JMP INUC.F		/ KEEP TRYING			/EAG:195

	JMP* INUC.D		/ TIMED OUT -- RETURN		/EAG:195

								/EAG:195

INUC.G	0			/ TIMEOUT COUNTER		/EAG:195

								/EAG:195

INUC.H	INUC.I			/ TCB POINTER.  RELOCATED BY	/EAG:195

				/ IN.UC15			/EAG:195

								/EAG:195

INUC.I	0			/ STOP ALL TASKS TCB		/EAG:195

	200							/EAG:195

INUC.J	0			/ EVENT VARIABLE		/EAG:195

	.TITLE     IN.PLR -- SET UP UNICHANNEL POLLER

								/EAG:194

								/EAG:194

								/EAG:194

								/EAG:194

								/EAG:194

/								/EAG:194

/ APPEND THE UNICHANNEL POLLER TO THE RESIDENT MONITOR AND	/EAG:194

/ INITIALIZE IT APPROPRIATELY.  THE POLLER WILL BE SET UP	/EAG:194

/ ONLY IF BOTH UC15 AND POLLER ARE ON -- I.E. IF BOTH BIT	/EAG:194

/ SC.UC15 AND BIT SC.PLR ARE SET IN SC.MOD.  BESIDES		/EAG:194

/ APPENDING THE POLLER TO THE MONITOR (VIA IN.MOV) WE MUST	/EAG:194

/ ALSO RELOCATE SEVERAL TRANSFER VECTORS WITHIN THE POLLER,	/EAG:194

/ INSERT CALLS TO THE POLLER AT VARIOUS PLACES WITHIN THE	/EAG:194

/ MONITOR, AND INVOKE PLR.ST TO START IT UP.  THE POLLER	/EAG:194

/ MUST BE ENTIRELY CONTAINED WITHIN THE FIRST 4K OF MEMORY	/EAG:194

/ AS IT CONTAINS TCB'S REFERENCED BY THE UNICHANNEL.		/EAG:194

/								/EAG:194

								/EAG:194

IN.PLR	LAC* (SC.MOD)		/ VERIFY THAT UC15 IS		/EAG:194

	AND (SC.UC15)		/ ENABLED			/EAG:194

	SNA							/EAG:194

	JMP IN.BAT						/EAG:194

	LAC* (SC.MOD)		/ AND ALSO THE POLLER		/EAG:194

	AND (SC.PLR)						/EAG:194

	SNA							/EAG:194

	JMP IN.BAT						/EAG:194

	LAW -10000		/ AVOID BANK ERROR		/EAG:197

	PAX							/EAG:194

	LAC PLST.A+10000,X	/ AND RELOCATE TRANSFER VECTORS	/EAG:194

	TAD* (SC.RMS)		/ WITHIN THE POLLER		/EAG:194

	DAC PLST.A+10000,X					/EAG:194

	LAC PLMS.E+10000,X					/EAG:194

	TAD* (SC.RMS)						/EAG:194

	DAC PLMS.E+10000,X					/EAG:194

	LAC PLMS.F+10000,X					/EAG:194

	TAD* (SC.RMS)						/EAG:194

	DAC PLMS.F+10000,X					/EAG:194

	LAC (PLR.MB)		/ ZERO MESSAGE BUFFER WITHIN	/EAG:194

	PAX			/ POLLER'S TCB AS A PRECAUTION	/EAG:194

	AAC PLR.NT*3		/ AGAINST SPURIOUS MESSAGES.	/EAG:194

	PAL							/EAG:194

INPL.0	DZM* IN.BNK,X						/EAG:194

	AXS 1							/EAG:194

	JMP INPL.0						/EAG:194

	JMS IN.MOV		/ APPEND POLLER TO MONITOR	/EAG:194

	  PLRREL						/EAG:194

	  PLRABS						/EAG:194

	  PLREND						/EAG:194

	SZL			/ AND VERIFY THAT IT FIT	/EAG:194

	JMP INPL.2		/ IT DIDN'T -- GO GIVE ERROR	/EAG:194

	LAW 770000		/ VERIFY THAT IT DIDN'T		/EAG:194

	AND* (SC.RMS)		/ OVERFLOW PAGE ZERO		/EAG:194

	SZA							/EAG:194

	JMP INPL.1		/ GO DEALLOCATE MEMORY AND	/EAG:194

				/ GIVE ERROR MESSAGE		/EAG:194

	LAC* (SC.RMS)		/ CALCULATE XCT PLR.SW		/EAG:194

	TAD (XCT+PLR.SW-PLREND)					/EAG:194

	DAC* (PLR.X1)		/ AND PUT IT WHERE ITS WANTED	/EAG:194

	DAC* (PLR.X2)						/EAG:194

	TAD (JMS+PLR.CK-XCT-PLR.SW)	/ CALCULATE JMS PLR.CK	/EAG:194

	DAC* (PLR.J1)		/ STICK IT AWAY			/EAG:194

	TAD (PLR.FN-PLR.CK)	/ DITTO WITH JMS PLR.FN		/EAG:194

	DAC* (PLR.F1)						/EAG:194

	TAD (PLR.ST-PLR.FN)	/ DITTO WITH JMS PLR.ST		/EAG:194

	DAC* (PLR.S1)						/EAG:194

	DAC* (PLR.S2)						/EAG:194

	TAD (-JMS)		/ GET ADDRESS OF PLR.ST		/EAG:194

	DAC INPL.A		/ STORE IT			/EAG:194

	LAC (JMS* INPL.A)	/ AND PUT JMS TO PLR.ST		/EAG:194

	DAC PLR.S3		/ INTO INITIAL START UP		/EAG:194

	JMP IN.BAT						/EAG:194

								/EAG:194

								/EAG:194

								/EAG:194

/ COME HERE IF POLLER HAS BEEN APPENDED TO MONITOR ALREADY YET	/EAG:194

/ IT OVERFLOW PAGE ZERO (WHICH CAN'T BE ALLOWED).  DEALLOCATE	/EAG:194

/ THE SPACE IT OCCUPIES, THEN FALL INTO ERROR MESSAGE ROUTINE.	/EAG:194

								/EAG:194

INPL.1	LAW PLRREL-PLREND	/ PICK UP NEG. LENGTH OF POLLER	/EAG:194

	TAD* (SC.RMS)		/ AND BACK UP SIZE OF MONITOR	/EAG:194

	DAC* (SC.RMS)						/EAG:194

INPL.2	DZM IN.OVF		/ POLLER DIDN'T FIT, SO		/EAG:194

	LAC* (SC.MOD)		/ INDICATE MEMORY OVERFLOW	/EAG:194

	AND (777777-SC.PLR)	/ AND CLEAR POLLER BIT SO IT	/EAG:194

	DAC* (SC.MOD)		/ WON'T HAPPEN AGAIN.		/EAG:194

	JMS	IN.BIG		/ "RES. MON. TOO BIG DUE TO"	/RKB-198

	JMS IN.MSG						/EAG:194

	.ASCII	"UC15 POLLER"<000>				/RKB-198

	JMP IN.BAT		/ AND CONTINUE INITIALIZATION	/EAG:194

								/EAG:194

								/EAG:194

								/EAG:194

								/EAG:194

INPL.A	0			/ TEMPORARY USED ABOVE		/EAG:194

	.TITLE     IN.BAT -- SET UP MONITOR BATCH FACILITY

								/EAG:196

								/EAG:196

								/EAG:196

								/EAG:196

/								/EAG:196

/ CHECK IF BATCH IS REQUESTED AND SET IT UP IF IT IS.  BATCH	/EAG:196

/ IS REQUESTED IF BIT SC.BCH OF THE OLD SC.NMF IS SET AND	/EAG:196

/ BIT SC.BMD OF THE OLD SC.BOS IS CLEAR.			/EAG:196

/								/EAG:196

								/EAG:196
IN.BAT	LAC BT.FLG		/ CLEAR BATCH FLAGS		/EAG:196

	AND (77777)		/ IN BOOTSTRAP			/EAG:196

	DAC BT.FLG						/EAG:196

	LAW -10000		/ AVOID BANK ERRORS		/EAG:196

	PAX							/EAG:196

	LAC SC.NMF+10000,X	/ HAS BATCH BEEN REQUESTED?	/EAG:196

	AND (SC.BCH)						/EAG:196

	SNA							/EAG:196

	JMP IN.VT		/ SC.BCH CLEAR -- NO		/EAG:196

	LAC SC.BOS+10000,X					/EAG:196

	AND (SC.BMD)						/EAG:196

	SZA							/EAG:196

	JMP IN.BOS		/ BOSS MODE -- SO GO DO IT	/RKB-198

	LAC SC.BFNM+10000,X	/ BATCH HAS BEEN REQUESTED.	/EAG:196

	SZA!CLA			/ SET BA.CNT TO NUMBER OF	/EAG:196

	LAC SC.RTF+10000,X	/ LINES TO SKIP AT BEGINNING	/EAG:196

	CMA			/ OF FILE.			/EAG:196

	DAC BA.CNT+10000,X					/EAG:196

	JMS IN.MOV		/ APPEND BATCH TO MONITOR	/EAG:196

	  BA.REL						/EAG:196

	  BA.ABS						/EAG:196

	  BA.END						/EAG:196

	SZL			/ DID IT FIT?			/EAG:196

	JMP INBT.0		/ NO -- GO ERROR		/EAG:196

	LAC BT.FLG		/ SET FLAG BIT IN BOOTSTRAP	/EAG:196

	XOR (400000)		/ FOR COMPATABILITY WITH	/EAG:196

	DAC BT.FLG		/ OLD (DOS-15) BATCH.		/EAG:196

	LAC* (SC.NMF)		/ SET FLAGS IN SC.NMF FOR	/EAG:196

	XOR (SC.BCH+SC.DT7)	/ SYSTEM LOADER.		/EAG:196

	DAC* (SC.NMF)						/EAG:196

	LAW -10000		/ AVOID BANK ERROR		/EAG:196

	PAX							/EAG:196

	LAC SC.RTF+10000,X	/ COPY .SCOM LOCATIONS USED	/EAG:196

	DAC* (SC.RTF)		/ BY BATCH FROM OLD .SCOM	/EAG:196

	LAC SC.BFNM+10000,X	/ TO NEW .SCOM.			/EAG:196

	DAC* (SC.BFNM)						/EAG:196

	LAC SC.BFNM+1+10000,X					/EAG:196
	DAC* (SC.BFNM+1)					/EAG:196
	LAC	SC.BFXT+10000,X					/RKB-205
	DAC*	(SC.BFXT)					/RKB-205

	LAC SC.BUIC+10000,X					/EAG:196

	DAC* (SC.BUIC)						/EAG:196

	LAC SC.BDEV+10000,X					/EAG:196
	DAC* (SC.BDEV)						/EAG:196
	LAC	SC.BUNT+10000,X					/RKB-205
	DAC*	(SC.BUNT)					/RKB-205
	LAC	SC.BOSS+10000,X					/RKB-204
	DAC*	(SC.BOSS)					/RKB-204
								/RKB-210
/ NEED TO PATCH A TRANSFER VECTOR				/RKB-210
/ IN BA.PAU'S .WRITE OF THE $PAUSE				/RKB-210
/ REPLY PROMPTING MESSAGE.					/RKB-210
								/RKB-210
	LAW	BA.PTV-BA.END	/ CALCULATE THE DISPLACEMENT	/RKB-210
				/ OF THE .WRITE BUFFADD T.V.	/RKB-210
				/ FROM THE BACK OF BATCH EXEC	/RKB-210
	TAD*	(SC.RMS)	/ NOW GET THE RELOCATED ADDRESS	/RKB-210
	DAC	INBT.A		/ AND SAVE IT IN A TEMPORARY	/RKB-210
	LAW	BA.PRMT-BA.END	/ NOW COMPUTE THE DISPACEMENT	/RKB-210
				/ OF THE ACTUAL BUFFER FROM	/RKB-210
				/ THE BACK OF BATCH		/RKB-210
	TAD*	(SC.RMS)	/ MAKE IT THE RELOCATED VALUE	/RKB-210
	DAC*	INBT.A		/ STUFF IT INTO .WRITE MACRO	/RKB-210
								/RKB-210
	LAW	BA.CTT-BA.END	/ MODIFY TTA. CONTROL CHAR.	/RKB-198

	TAD*	(SC.RMS)	/ TO  CAUSE ^T TO SCAN FOR	/RKB-198

	DAC*	(TTTABL+2)	/ NEXT $JOB CARD		/RKB-198

	LAW	BA.REL-BA.END	/ AND TO			/RKB-198

	TAD* (SC.RMS)		/ TREAT ^C AS A $EXIT		/EAG:196

	DAC* (TTTABL+1)						/EAG:196
	IAC			/ CAUSE BATCH FILE TO BE USED	/EAG:196

	DAC IN.CMD		/ FOR COMMAND INPUT DEVICE.	/EAG:196

	JMP IN.VT						/EAG:196

								/EAG:196

								/EAG:196

								/EAG:196
/ COME HERE IF INSUFFICIENT ROOM FOR BATCH.			/EAG:196

								/EAG:196

INBT.0	DZM IN.OVF		/ INDICATE MEMORY OVERFLOW	/EAG:196

	LAC* (SC.NMF)		/ AND CAUSE MODE MESSAGE	/EAG:196

	AND (777777-SC.TMM)	/ TYPEOUT			/EAG:196

	XOR (SC.TMM)						/EAG:196

	DAC* (SC.NMF)						/EAG:196

	JMS	IN.BIG		/ "RES. MON. TOO BIG DUE TO"	/RKB-198

	JMS IN.MSG		/ AND DO THE MESSAGE		/EAG:196
	.ASCII	"BATCH"<000>					/RKB-198
	JMP IN.VT						/EAG:196
								/RKB-210
								/RKB-210
								/RKB-210
/			THE FOLLOWING LOCATION IS A		/RKB-210
/			TEMPORARY USED TO HOLD THE		/RKB-210
/			ADDRESS OF THE BUF ADD PARAMETER	/RKB-210
/			OF THE .WRITE REQUEST IN		/RKB-210
/			BA.PAU FOR RELOCATING THE		/RKB-210
/			POINTER TO THE LINE BUFFER.		/RKB-210
								/RKB-210
INBT.A	0							/RKB-210
	.TITLE	    IN.BOSS -- SET UP BOSS

/								/RKB-198

/								/RKB-198

/								/RKB-198

/ CHECK SC.BMD OF SC.BOS TO SEE IF RESIDENT BOSS SHOULD BE	/RKB-198

/ INCLUDED IN THIS MOITOR LOAD.  IF WE ARE IN BOSS MODE WE	/RKB-198

/ CHECK FURTHER TO SEE IF WE ARE LOADING NON-RESIDENT BOSS	/RKB-198

/ AND IF SO, DON'T SET UP RESIDENT BOSS, SINCE NON-RES BOSS	/RKB-198

/ DOESN'T USE RES BOSS.						/RKB-198

/								/RKB-198

/								/RKB-198

/								/RKB-198

IN.BOS	LAW	-10000		/ SET UP XR			/RKB-198

	PAX			//				/RKB-198

	LAC	SC.BOS+10000,X	/ IS BOSS REQUIRED? (LOOK IN	/RKB-198

	AND	(SC.BMD)	/ THE OLD SCOM)			/RKB-198

	SNA			/ SKIP IF WE NEED BOSS		/RKB-198

	JMP	IN.VT		/ NOT BOSS'ING, TRY NEXT THING	/RKB-198

	LAC	SC.BOS+10000,X	/ MOVE DOWN BOSS-RELATED .SCOMS	/RKB-198

	DAC*	(SC.BOS)	//				/RKB-198

	LAC	SC.RTF+10000,X	//				/RKB-198

	DAC*	(SC.RTF)	//				/RKB-198

	LAC	SC.ETS+10000,X	//				/RKB-198

	DAC*	(SC.ETS)	//				/RKB-198

	LAC	SC.TLM+10000,X	//				/RKB-198

	DAC*	(SC.TLM)	//				/RKB-198

	LAC	SC.SPN+10000,X	/ ARE WE TRYING TO LOAD		/RKB-198

	SAD	IN.BSS		/ NON-RES BOSS? (.SIXBT 'BOS')	/RKB-198

	SKP			/ PERHAPS, LOOK AT SECOND HALF	/RKB-198

	JMP	IN.BS1		/ DEFINATELY NOT BOSS, CONTINUE	/RKB-198

	LAC	SC.SPN+1+10000,X / PICK UP SECOND HALF		/RKB-198

	SAD	IN.BSS+1	/ AND CHECK (.SIXBT 'S@@')	/RKB-198

	JMP	IN.BSNR		/ YES, WE'RE GOING FOR NRBOSS	/RKB-198

IN.BS1	LAC	(IN.BSS)	/ LOOKUP 'BOSS' IN SYSBLK	/RKB-198

	TAD	IN.BNK		/ ADD IN BANK BITS		/RKB-198

	JMS	IN.SSB		/ CALL THE SEARCH SYSBLK RTNE	/RKB-198

	JMP	IN.BSM		/ RETURN 1, BOSS IS MISSING	/RKB-198

	LAC	SB.BAS+SB.FB,X	/ RETURN 2, FOUND, GET # OF BLK	/RKB-198

	DAC	INBS.2		/ SAVE IT TEMPORARILY		/RKB-198

	LAC*	(SC.RMS)	/ GET WHERE WE'RE PUTTING BOSS	/RKB-198

	DAC	IN.BSTR		/ SAVE START OF RES BOSS	/RKB-198

	JMS	IN.MOVE		/ MOVE RES BOSS DOWN TO MONITOR	/RKB-198

	.DSA	BS.REL		/ START OF BOSS			/RKB-198

	.DSA	BS.ABS		/ ABSOLUTE SECTION		/RKB-198

	.DSA	BS.END		/ END OF ABSOLUTE		/RKB-198

	SZL			/ DID IT FIT OK?		/RKB-198

	JMP	IN.BSRM		/ NO, GO ANNOUNCE ERROR		/RKB-198

/								/RKB-198

/ BOSS RESIDENT CODE IS NOW IN PLACE				/RKB-198

/ NOW GO AND MAKE THE REQUIRED PATCHES				/RKB-198

/ TO BOSS (RESIDENT) AND THE MONITOR				/RKB-198

/								/RKB-198

/ MAKE PATCHES FOR IOPS ERRORS AND ^Q				/RKB-198

/								/RKB-198

	LAC	(JMP+BS.ERR-BS.REL) / GET OFFSET OF ERROR ENTRY	/RKB-198

	TAD	IN.BSTR		/ ADD BASE ADDR OF RES BOSS	/RKB-198
	DAC*	(ER.FTL)	/ TRAP THE FATAL ERROR PROCESS	/RKB-198

/								/RKB-198

/ PATCH RESMON SO THAT A .EXIT GOES TO RES BOSS			/RKB-198

/								/RKB-198

	LAC	(JMP+BS.XT0-BS.REL) / OFFSET TO .EXIT PROCESS	/RKB-198

	TAD	IN.BSTR		/ THIS IS WHERE IT IS NOW	/RKB-198

	DAC*	(EXIT.1)	/ STUFF IT IN .EXIT ROUTINE	/RKB-198

/								/RKB-198

/ PATCH THE CONTENTS OF DAT SLOTS -2 AND -3			/RKB-198

/ SO THAT THEY POINT TO RES-BOSS				/RKB-198

/								/RKB-198

	LAC	(BS.DT3-BS.REL)	/ GET ADDR OF .DAT -3 ROUTINE	/RKB-198

	TAD	IN.BSTR		/ PLUS BASE ADDR		/RKB-198

	DAC	IN.CNSL		/ AND PUT IT IN TELEPRINTER	/RKB-198

	LAC	(BS.DT2-BS.REL)	/ GET ADDR OF .DAT -2 ROUTINE	/RKB-198

	TAD	IN.BSTR		//				/RKB-198

	DAC	IN.CMD		/ ASSIGN TO THE 'CMD' SLOT	/RKB-198

/								/RKB-198

/ PATCH TTY HANDLER SO THAT CONTROL "T" GOES			/RKB-198

/ TO RES-BOSS							/RKB-198

/								/RKB-198

	LAC	(BS.CTT-BS.REL)	/ GET ADDRESS IN BOSS TO GO	/RKB-198

	TAD	IN.BSTR		/ UPON ^T			/RKB-198

	DAC*	(TTTABL+2)	/ AND SET IT IN TTY HANDLER	/RKB-198

/								/RKB-198

/ PATCH TTY SO THAT CONTROL 'C' (^C) EXITS FROM BOSS MODE	/RKB-198

/								/RKB-198

	LAC	(BS.CTC-BS.REL)	/ ADDR OF BOSS ^C ROUTINE	/RKB-198

	TAD	IN.BSTR		//				/RKB-198

	DAC*	(TTTABL+1)	/ SET IT IN ^C PLACE		/RKB-198

/								/RKB-198

/ PATCH RESMON SO THAT CONTROL GOES TO				/RKB-198

/ RESIDENT BOSS ON A TIME OUT (USER EXCEEDED HIS OR  		/RKB-198

/ HER TIME ESTIMATE).						/RKB-198

/								/RKB-198

	LAC	(JMP+BS.TLE-BS.REL) / OFFSET TO TIME LIMIT EXP.	/RKB-198

	TAD	IN.BSTR		/ ADD IN BASE ADDRESS		/RKB-198

	DAC*	(CKTL.0)	/ AND STUFF JMP IN CK.TLM RTNE	/RKB-198

/								/RKB-198

/ MAKE PATCH FOR .PUT AND .GET CAL'S TO GO TO RES BOSS		/RKB-198

/								/RKB-198

	LAC	(JMP+BS.GPR-BS.REL) / FUNNEL .GET/.PUT REQUESTS	/RKB-198

	TAD	IN.BSTR		/ INTO RESIDENT BOSS		/RKB-198

	DAC*	(PTGT.B)	//				/RKB-198

/								/RKB-198

/ PATCH RES-BOSS CODE THAT WAS NOT RELOCATED			/RKB-198

/ CORRECTLY BY SUBR. "IN.MOVE"					/RKB-198

/								/RKB-198

	LAC	(BS.TRN-4-BS.REL) /GET OFFSET OF MTRAN CPB TV	/RKB-198

	TAD	IN.BSTR		/ MAKE IT RIGHT			/RKB-198

	DAC	INBS.1		/ SAVE ADDRESS			/RKB-198

	IAC			/ GET ADDR OF CPB PROPER	/RKB-198

	DAC*	INBS.1		/ BS.TRN-4 POINTS TO BS.TRN-3	/RKB-198

	ISZ	INBS.1		/ NOW POINT AT BS.TRN-3 ITSELF	/RKB-198

	LAC	INBS.2		/ FIRST BLOCK OF BOSS		/RKB-198

	DAC*	INBS.1		/ IS NOW IN MTRAN CPB		/RKB-198

/								/RKB-198

/ PATCH UP BUFFER ADDRESSES FOR DAT -3 PROCESSING		/RKB-198

/								/RKB-198

	LAC	(BS.LBUF-BS.REL) / OFFSET TO LP BUFFER		/RKB-198

	TAD	IN.BSTR		/ MAKE IT REAL ADDRESS		/RKB-198

	DAC	INBS.1		/ SAVE IT TEMPORARILY		/RKB-198

	LAC	(BS.LPCL+2-BS.REL) / DISPL. OF TV IN .WRITE	/RKB-198

	TAD	IN.BSTR		//				/RKB-198

	DAC	INBS.2		/ SAVE IT			/RKB-198

	LAC	INBS.1		/ RECALL BUFFER ADDRESS		/RKB-198

	DAC*	INBS.2		/ STUFF IN '.WRITE 6,2,XX,54'	/RKB-198

	LAC	(BS.LPBF-BS.REL) / OFFSET TO POINTER TO 	/RKB-198

	TAD	IN.BSTR		/ 'BS.LPBF+2', DATA IN LP BUF	/RKB-198

	DAC	INBS.2		/ PUT ADDRESS AWAY		/RKB-198

	LAC	INBS.1		/ RECALL BUFFER ADDRESS		/RKB-198

	AAC	2		/ POINT PAST HEADER WP TO DATA	/RKB-198

	DAC*	INBS.2		/ AND SET IT UP			/RKB-198

/								/RKB-198

/ SETUP THE LINE COUNT SKIP INDEX "BS.LCNT"			/RKB-198

/ SO THAT RES-BOSS WILL SKIP OVER THE LINES			/RKB-198

/ THAT IT HAS ALREADY READ					/RKB-198

/								/RKB-198

	ISZ	INBS.2		/ BUMP POINTER, THESE TWO FOL-	/RKB-198

	LAC*	(SC.RTF)	/ LOW EACH OTHER IN RES BOSS	/RKB-198

	AND	(777)		/ SET NUMBER OF RTF LINES READ	/RKB-198

	CMA			/ ALREADY, MINUS MINUS ONE	/RKB-198

	DAC*	INBS.2		/ AND STUFF IT IN RES BOSS	/RKB-198

/								/RKB-198

/ ALL PATCHES HAVE BEEN MADE					/RKB-198

/ MAKE SURE BITS SC.DT6, SC.DT7, AND SC.BCH		/RKB-198

/ OF SC.NMF ARE SET SO THAT THE				/RKB-198

/ SYSTEM LOADER WILL DO THE INITIALIZATION			/RKB-198

/ FOR DAT SLOTS 6 AND -7					/RKB-198

/								/RKB-198

	LAW	SC.DT6!SC.DT7!SC.BCH\777777 / FIRST CLEAR THEM	/RKB-198

	AND*	(SC.NMF)	/ IN THE NEW SCOM		/RKB-198

	AAC	SC.DT6!SC.DT7!SC.BCH	/ THEN TURN THEM ON	/RKB-198

	DAC*	(SC.NMF)	/ AND PUT THE FLAG WORD BACK	/RKB-198

	JMP	IN.VT		/ ALL DONE, DO NEXT THING	/RKB-198

/								/RKB-198

/ NON-RESIDENT BOSS IS TO BE LOADED, THEREFORE, WE		/RKB-198

/ DON'T NEED RES-BOSS, SO CLEAR IT'S .SYSLD INDICATOR BITS	/RKB-198

/ IN SC.NMF SO THE .SYSLD DOES NOT TRY TO			/RKB-198

/ DO THE AUTOMATIC LOADING OF THE DISK AND LP HANDLERS		/RKB-198

/								/RKB-198

IN.BSNR	LAW	SC.DT6!SC.DT7!SC.BCH\777777 /TURN 'EM OFF	/RKB-198

	AND*	(SC.NMF)	//				/RKB-198

	DAC*	(SC.NMF)	/ AND PUT BACK THE FLAG WORD	/RKB-198

	JMP	IN.VT		/ THAT'S ALL FOLKS		/RKB-198

/								/RKB-198

/								/RKB-198

/ NON-RESIDENT BOSS IS NOT IN SYS BLOCK				/RKB-198

/ THEREFORE CAN NOT RUN IN BOSS MODE				/RKB-198

/ CLEAR ALL BITS IN SCOM REG'S USED BY				/RKB-198

/ BOSS, AND DO A .EXIT, CAUSING US 				/RKB-198

/ TO RECONFIGURE THE MONITOR OVER.				/RKB-198

/								/RKB-198

IN.BSM	JMS	IN.MSG		/ TELL USER BOSS IS MISSING	/RKB-198

	.ASCII	<15>"BOSS NOT IN SYSBLK"<000>		/RKB-198

IN.BSER	DZM*	(SC.ETS)	/ CLEAR TIME ESTIMATE		/RKB-198

	DZM*	(SC.BOSS)	/ CLEAR BOSS MODE FLAG WORD	/RKB-198

	DZM*	(SC.RTF)	/ CLEAR RTF LINES READ COUNT	/RKB-198

	DZM*	(SC.TLM)	/ SHUT OFF THE TIME LIMIT	/RKB-198

	LAW	SC.DT6!SC.DT7!SC.BCH\777777 / CLEAR MORE BITS	/RKB-198

	AND*	(SC.NMF)	//				/RKB-198

	DAC*	(SC.NMF)	//				/RKB-198

	DZM	IN.OVF		/ IT MAY NOT REALLY BE AN OVERFL	/RKB-198

				/ BUT THIS WILL  CAUSE A .EXIT	/RKB-198

				/ AS SOON AS THE MONITOR CAN	/RKB-198

				/ TAKE IT.			/RKB-198

	LAW	777777-SC.TMM	/ FORCE MODE MESSAGE TYPE OUT	/RKB-198

	AND*	(SC.NMF)	//				/RKB-198

	XOR	(SC.TMM)	//				/RKB-198

	DAC*	(SC.NMF)	//				/RKB-198

	JMP	IN.VT		/ CONTINUE WITH INITIALIZATION	/RKB-198

/								/RKB-198

/								/RKB-198

/ RESIDENT BOSS DOESN'T FIT IN PAGE 0.				/RKB-198

/ TYPE ERROR MESSAGE, SET MONITOR TO TYPE			/RKB-198

/ THE 'MODE' MESSAGE, CLEAR ALL BOSS-				/RKB-198

/ RELATED .SCOM LOCATIONS AND ABORT				/RKB-198

/ FURTHER BUILDING OF THE RESIDENT MONITOR			/RKB-198

/								/RKB-198

/								/RKB-198

IN.BSRM	JMS	IN.BIG		/ "RES. MON. TOO BIG DUE TO "	/RKB-198

	JMS	IN.MSG		/				/RKB-198

	.ASCII	"BOSS"<000>					/RKB-198

	JMP	IN.BSER		/ CONTINUE ERROR PROCESSING	/RKB-198

/								/RKB-198

/								/RKB-198

IN.BSS	.SIXBT	'BOSS@@'	/ SYSBLK NAME FOR NON-RES BOSS	/RKB-198

IN.BSTR	0			/ START OF RES BOSS AFTER MOVE	/RKB-198

INBS.1	0			/ TEMPORARIES			/RKB-198

INBS.2	0			//				/RKB-198

	.TITLE     IN.VT -- SET UP CTRL-X FEATURE

								/EAG:193

								/EAG:193

								/EAG:193

								/EAG:193

/								/EAG:193

/ THIS ROUTINE ADDS THE VT15 CODE (CTRL-X FEATURE) TO THE	/EAG:193

/ RESIDENT MONITOR, INITIALIZES IT, AND CONNECTS IT TO		/EAG:193

/ TTA.								/EAG:193

/								/EAG:193

								/EAG:193

								/EAG:193
IN.VT	LAW -10000		/ AVOID BANK ERROR		/EAG:197

	PAX							/EAG:197

	LAC SC.VTF+10000,X	/ COPY SC.VTN AND SC.HFN BITS	/EAG:193

	AND (SC.VTN!SC.HFN)	/ FROM OLD TO NEW .SCOM,	/EAG:193

	DAC* (SC.VTF)		/ ON ASSUMPTION THAT VT IS	/EAG:193

	AND (SC.VTN)		/ OFF.  CHECK IF VT IS ON OR	/EAG:193

	SNA			/ OFF.  SKIP IF IT'S ON.	/EAG:193

	JMP IN.DT1		/ VT OFF -- DONE.		/EAG:193

	XCT IN.SVT		/ IS VT15 PRESENT ON SYSTEM?	/EAG:193

	JMP INVT.7		/ NO -- GO GIVE ERROR.		/EAG:193

	LAC SC.VTF+10000,X	/ VT ON -- MUST ALSO COPY	/EAG:193

.X=SC.VTN!SC.HFN!SC.DMN		/ SC.DMN FROM OLD .SCOM TO	/EAG:193

	AND (.X)		/ THE NEW.			/EAG:193

	DAC* (SC.VTF)						/EAG:193

	LAC* (SC.RMS)		/ VERIFY THAT VT15 CODE WILL BE	/EAG:193

	AND (770000)		/ GOING INTO PAGE ZERO, AS IT	/EAG:193

	SZA			/ CONNECTS TO TTA. AND .SCOM	/EAG:193
	JMP INVT.6		/ DIRECTLY.  JMP IF WON'T.	/EAG:193

	LAC IN.OVF		/ IF PREVIOUS MEMORY OVERFLOW	/EAG:193

	SNA			/ OCCURED IT MAY HAVE CLOBBERED	/EAG:193

	DZM SC.VTR+10000,X	/ SAVED DISPLAY BUFFER, SO	/EAG:193

				/ DELETE IT.			/EAG:193

	LAC* (SC.RMS)		/ ASSUME SAVED DISPLAY BUFFER	/EAG:193

	TAD (VTBUF-VTREL)	/ DOESN'T EXIST AND POINT VTMN3	/EAG:193

	DAC VTMN3+10000,X	/ TO WHERE DISPLAY BUFFER WILL	/EAG:193

	LAC* (SC.VTF)		/ BE.  CHECK IF HALF IS ON	/EAG:193

	AND (SC.HFN)		/ AND GET PROPER LINE COUNT	/EAG:193

	SNA!CLA			/ FOR VTM26.			/EAG:193

	AAC 34			/ 67 OCTAL IF HALF IS OFF.	/EAG:193

	AAC 33			/ 33 OCTAL IF HALF IS ON.	/EAG:193

	DAC VTM26+10000,X	/ ALSO COMPARE AGAINST LINE	/EAG:193

	SAD* (10000-VTCOPY+VTM26)	/ COUNT IN SAVED	/EAG:193

	SKP			/ DISPLAY BUFFER AND DELETE THE	/EAG:193

	DZM SC.VTR+10000,X	/ BUFFER IF THEY'RE DIFFERENT.	/EAG:193

				/ NOTE THAT VTMN3 AND VTM26	/EAG:193

				/ WILL BE OVERWRITTEN LATER IF	/EAG:193

				/ A SAVED BUFFER EXISTS AND IS	/EAG:193

				/ NOT DELETED.			/EAG:193

	LAC* (SC.MOD)		/ CHECK IF TTA. WILL ECHO TABS	/EAG:193

	AND (SC.TAB)		/ AS SPACES AND CONDITION VT15	/EAG:193

	SNA!CLA			/ TO ACCEPT OR IGNORE TABS (ON	/EAG:193

	LAC (JMP+VTIGNR\NOP)	/ INPUT ONLY!) AS APPROPRIATE.	/EAG:193

	XOR (NOP)						/EAG:193

	DAC VTTAB+10000,X					/EAG:193
	JMS IN.MOV		/ APPEND VT15 CODE TO MONITOR	/EAG:193

	  VTREL							/EAG:193

	  VTABS							/EAG:193

	  VTBUF							/EAG:193
	SZL			/ DID IT SUCCEED?		/EAG:193
	JMP INVT.6		/ NO -- GO PRINT MESSAGE.	/EAG:193
	LAC* (SC.RMS)		/ SET UP MAIN DISPLAY FILE.	/EAG:193

	TAD (VTMAIN-VTBUF)	/ FIRST SAVE ITS ADDRESS IN	/EAG:193

	DAC INVT.A		/ INVT.A			/EAG:193

	AAC VTMREL-VTMAIN	/ THEN BRACKET XR,LR ABOUT	/EAG:193

	PAX			/ ABOUT DISPLAY INSTRUCTIONS	/EAG:193

	AAC VTMFIL+1-VTMREL	/ WHICH NEED TO BE RELOCATED.	/EAG:193

	PAL							/EAG:193

.X=(0)

INVT.1	LAC* .X,X		/ NOW RELOCATE THE DISPLAY	/EAG:193

	TAD INVT.A		/ INSTRUCTIONS.  DO IT		/EAG:193

.X=(0)

	DAC* .X,X		/ OURSELVES BECAUSE IN.MOV	/EAG:193

	AXS 1			/ DOESN'T KNOW HOW TO RELOCATE	/EAG:193

	JMP INVT.1		/ DISPLAY INSTRUCTIONS.		/EAG:193

	LAW -10000		/ AVOID BANK ERROR		/EAG:197

	PAX							/EAG:197

	LAC SC.VTR+10000,X	/ EXISTS PREVIOUS DISPLAY BUF?	/EAG:193

	SNA			/ SKIP IF YES			/EAG:193

	JMP INVT.5		/ NO -- DON'T NEED TO SET IT UP	/EAG:193

	TAD (VTBUF-VTMAIN)	/ MUST APPEND DISPLAY BUFFER TO	/EAG:193

	TCA			/ VT15 CODE.  FIRST WE WILL	/EAG:193

	TAD* (SC.RMS)		/ RELOCATE ALL THE DISPLAY	/EAG:193

	DAC INVT.A		/ BUFFER POINTERS.  RELOCATION	/EAG:193

	TAD SC.VTR+10000,X	/ FACTOR IN INVT.A, RELOCATE	/EAG:193

	DAC* (SC.VTR)		/ RESTART ADDRESS FIRST.	/EAG:193

	LAC (INVT.E)		/ GET POINTER TO DISPLAY BUFFER	/EAG:193

	XOR IN.BNK		/ POINTER TABLE.		/EAG:193

	DAC INVT.C						/EAG:193

INVT.2	LAC* INVT.C		/ PICK UP ADDRESS NEXT DISPLAY	/EAG:193

	SPA			/ BUFFER POINTER, CHECK IF AT	/EAG:193

	JMP INVT.3		/ END.				/EAG:193

	PAX			/ IF NOT AT END RELOCATE IT.	/EAG:193

.X=(10000)

	LAC* .X,X						/EAG:193

	TAD INVT.A						/EAG:193

.X=(10000)

	DAC* .X,X						/EAG:193

	ISZ INVT.C						/EAG:193

	JMP INVT.2						/EAG:193

								/EAG:193

INVT.3	LAC* (SC.RMS)		/ MUST ALSO RELOCATE DJMSI	/EAG:194

	AAC VTCOPY-VTBUF	/ INSTRUCTIONS LOCATED WITHIN	/EAG:194

	TCA			/ VT LINE BUFFER.  THERE ARE	/EAG:194

	TAD* (10000-VTCOPY+VTPT0)	/ TWO OF THESE, POINTED	/EAG:194

	PAX			/ TO BY VTPT0 AND VTPT1.  HERE	/EAG:194

.X=(10000)

	LAC* .X,X		/ WE USE THE FACTS THAT BOTH	/EAG:194

	TAD INVT.A		/ INSTRUCTIONS ARE IDENTICAL	/EAG:194

.X=(10000)

	DAC* .X,X		/ AND VTPT1 ALWAYS POINTS ONE	/EAG:194

.X=(10001)

	DAC* .X,X		/ WORD PAST VTPT0.		/EAG:194

	LAC* (SC.RMS)		/ NOW COPY DISPLAY BUFFER FROM	/EAG:193

	AAC VTCOPY-VTBUF	/ WHERE IT HAS BEEN SAVED (AT	/EAG:193

	DAC INVT.A		/ BEGINNING OF PAGE ONE) TO	/EAG:193

	CLX			/ JUST ABOVE VT15 CODE.		/EAG:193

	LAC* (SC.VTF)		/ DETERMINE LENGTH OF BUFFER	/EAG:193

	AND (SC.HFN)		/ JUST COPY WHAT WE NEED TO.	/EAG:193

	SZA!CLA							/EAG:193

	LAC (VT.HAF-VT.FUL)					/EAG:193

	TAD (VTEND-VTCOPY)					/EAG:193

	PAL							/EAG:193

.X=(10000)

INVT.4	LAC* .X,X						/EAG:193

	DAC* INVT.A,X						/EAG:193

	AXS 1							/EAG:193

	JMP INVT.4						/EAG:193

INVT.5	LAC* (SC.RMS)		/ REMEMBER LOCATION OF VTBUF	/EAG:193

	DAC INVT.A		/ IN VT15 CODE.			/EAG:193

	LAC* (SC.VTF)		/ DETERMINE LENGTH OF BUFFER	/EAG:193

	AND (SC.HFN)		/ AND ALLOCATE SPACE FOR IT.	/EAG:193

	SNA!CLA							/EAG:193

	LAC (VT.FUL-VT.HAF)					/EAG:193

	TAD (VT.HAF)						/EAG:193

	TAD* (SC.RMS)						/EAG:193

	DAC* (SC.RMS)						/EAG:193

	LAC INVT.A		/ PICK UP BUF. ADDR. OF VT15	/EAG:193

	TAD (JMP+VTDISP-VTBUF)	/ CODE AND GET (JMP VTDISP).	/EAG:193

	DAC* (TTYVT2)		/ PUT INTO TTA.			/EAG:193

	TAD (VTLBUF-JMP-VTDISP)	/ GET ADDRESS OF VTLBUF AND PUT	/EAG:193

	DAC* (EDCXAD)		/ AT TTA.-2 FOR EDITVT.		/EAG:193

	TAD (VTTEST-VTLBUF)	/ GET ADDRESS OF VT SETUP	/EAG:193

	DAC INVT.A		/ ROUTINE,			/EAG:193

	JMS* INVT.A		/ AND CALL VT SETUP ROUTINE.	/EAG:193

	JMP IN.DT1		/ DONE.				/EAG:193

								/EAG:193

								/EAG:193

/ COME HERE IF CANNOT LOAD VT15 CODE DUE TO INSUFFICIENT ROOM	/EAG:193

/ IN PAGE ZERO.							/EAG:193

								/EAG:193

INVT.6	DZM* (SC.VTR)		/ INDICATE DISP. BUF. NOT	/EAG:193

				/ SET UP (JUST IN CASE).	/EAG:193

	LAC* (SC.VTF)		/ AND TURN OF VT ON		/EAG:194

	AND (777777-SC.VTN)					/EAG:194

	DAC* (SC.VTF)						/EAG:194

	JMS	IN.BIG		/ "RES. MON. TOO BIG DUE TO "	/RKB-198

	JMS IN.MSG		/ TYPE APPRO. MESSAGE.		/EAG:193

	.ASCII	"VT ON"<000>					/RKB-198

	DZM IN.OVF		/ INDICATE MEM. OVERFLOW	/EAG:193

				/ HAS OCCURED.			/EAG:193

	JMP IN.DT1		/ AND PROCEED.			/EAG:193

								/EAG:193

								/EAG:193

								/EAG:193

/ COME HERE IF VT ON HAS BEEN REQUESTED BUT VT15 ISN'T PRESENT	/EAG:193

/ ON SYSTEM.							/EAG:193

								/EAG:193

INVT.7	JMS IN.MSG		/ TYPE ERROR MESSAGE		/EAG:193

	.ASCII <015>"VT15 NOT AVAILABLE"<000>			/EAG:193

	LAC* (SC.VTF)		/ CLEAR VT ON BIT IN SC.VTF	/EAG:193

	AND (777777-SC.VTN)					/EAG:193

	DAC* (SC.VTF)						/EAG:193

	LAC* (SC.NMF)		/ AND SET MODE MESSAGE TYPE	/EAG:193

	AND (777777-SC.TMM)	/ OUT BIT IN SC.NMF		/EAG:193

	XOR (SC.TMM)						/EAG:193

	DAC* (SC.NMF)						/EAG:193

	JMP IN.DT1		/ AND GO TRY NEXT THING		/EAG:193

								/EAG:193

								/EAG:193

								/EAG:193

/ TEMPORARIES USED ABOVE					/EAG:193

								/EAG:193

INVT.A	0			/ MISCELLANEOUS TEMPORARY	/EAG:193

								/EAG:193

INVT.C	0			/ HOLDS POINTER TO DISPLAY	/EAG:193

				/ BUFFER POINTER TABLE.		/EAG:193

								/EAG:193

								/EAG:193

/ DISPLAY BUFFER POINTER TABLE.  FOLLOWING TABLE LISTS ALL	/EAG:193

/ POINTERS (WITHIN THE VT15 CODE) TO THE DISPLAY BUFFER.	/EAG:193

/ THIS TABLE IS USED TO RELOCATE THE POINTERS WHEN THE		/EAG:193

/ DISPLAY BUFFER SHIFTS.					/EAG:193

								/EAG:193

INVT.E	VTMN1-VTCOPY						/EAG:193

	VTMN2-VTCOPY						/EAG:193

	VTMN3-VTCOPY						/EAG:193

	VTPT0-VTCOPY						/EAG:193

	VTPT1-VTCOPY						/EAG:193

	VTPT2-VTCOPY						/EAG:193

	VTPT3-VTCOPY						/EAG:193

	VTPT4-VTCOPY						/EAG:193

	VTPT6-VTCOPY						/EAG:193

	VTPT7-VTCOPY						/EAG:193

	-1			/ NEGATIVE FLAGS END		/EAG:193

	.TITLE     IN.DT1 -- INITIALIZE .DAT AND .UFDT, PHASE 1

								/EAG:195

								/EAG:195

								/EAG:195

								/EAG:195

/								/EAG:195

/ THE INITIALIZATION OF .DAT AND .UFDT IS DIVIDED INTO TWO	/EAG:195

/ PHASES.  THE INITIAL PHASE, PERFORMED HERE, MUST BE DONE	/EAG:195

/ BEFORE INTERRUPTS ARE ENABLED (BY IN.GO).  THE SECOND PHASE	/EAG:195

/ USES THE MONITOR .TRAN ROUTINE (.MTRAN) AND THUS MUST BE	/EAG:195

/ PERFORMED AFTER INTERRUPTS ARE ENABLED.			/EAG:195

/								/EAG:195

/ THIS ROUTINE PERFORMS THE FIRST PART OF INITIALIZING .DAT	/EAG:195

/ AND .UFDT.  THIS INVOLVES ALLOCATING THE SPACE FOR THESE	/EAG:195

/ TABLES, SETTING UP THE .SCOM LOCATIONS WHICH REFER TO		/EAG:195

/ THEM, AND COPYING THE OLD IMAGE OF .DAT AND .UFDT (FROM	/EAG:195

/ THE PREVIOUS CORE LOAD, OR FROM SGNBLK IF THIS IS A		/EAG:195

/ COLD-START) INTO .DAT AND .UFDT.  ADDITIONALLY WE CAUSE	/EAG:200

/ .DAT SLOTS -2 AND -3 TO REFER TO DEVICES CMD AND TTA,		/EAG:200

/ RESPECTIVELY, AND ZERO .DAT SLOT -7 (CAUSING IT TO REFER	/EAG:200

/ TO NON).							/EAG:200

/								/EAG:195

/ THE NET EFFECT OF THIS IS AS FOLLOWS.  THE ONLY .DAT SLOTS	/EAG:195

/ USED BY THE NON-RESIDENT MONITOR ARE -2, -3, AND -12,		/EAG:195

/ PLUS -7 IF EITHER OF BATCH OR BOSS IS IN USE.  		/EAG:195

/ THE NON-RESIDENT MONITOR RESTORES -12 TO A HANDLER NUMBER	/EAG:195

/ (INDEX INTO SGNBLK) BEFORE IT EXITS.  HERE WE RESTORE		/EAG:195

/ SLOTS -2, -3, AND -7 TO HANDLER NUMBERS.  THUS, IF THE NON-	/EAG:195

/ RESIDENT MONITOR WAS THE LAST PROGRAM IN CORE WE END UP	/EAG:195

/ WITH A .DAT TABLE IN WHICH NO SLOTS ARE SET UP.  ALL SLOTS	/EAG:195

/ CONTAIN HANDLER NUMBERS; NO SLOTS CONTAIN HANDLER ADDRESSES.	/EAG:195

/ THIS IDEALIZED OR VIRGIN .DAT TABLE IS WHAT WE WILL WRITE	/EAG:195

/ OUT TO DISK AS PART OF IN.DT2.  THE ABSENSE OF HANDLER	/EAG:195

/ ADDRESSES IS ESSENTIAL AS WHEN THE .DAT TABLE IS READ BACK	/EAG:195

/ FROM DISK FOR A LATER CORE LOAD THE APPROPRIATE HANDLER	/EAG:195

/ ADDRESSES MAY HAVE CHANGED.					/EAG:195

/								/EAG:195

/ IF THE NON-RESIDENT MONITOR WAS NOT THE LAST PROGRAM IN	/EAG:195

/ CORE, MOST OF THE WORK WE DO HERE GOES FOR NAUGHT.  WHEN	/EAG:195

/ WE GET TO IN.DT2 A NEW .DAT TABLE WILL BE READ IN FROM	/EAG:195

/ DISK (WHICH WILL HAVE NO SET UP DEVICES, AS DESCRIBED		/EAG:195

/ ABOVE) TO REPLACE THE ONE WE CONSTRUCT HERE.  THE ONLY	/EAG:195

/ PURPOSE IN CONSTRUCTING A .DAT TABLE HERE (ONLY TO THROW	/EAG:195

/ IT AWAY) IS IF A ^C SHOULD BE TYPED BEFORE WE REACH IN.DT2.	/EAG:195

/ IN THIS CASE WE NEED A .DAT TABLE -- ANY .DAT TABLE -- TO	/EAG:195

/ BE THERE TO BE FOUND BY THE INITIALIZATION CODE.  WHILE	/EAG:195

/ ALL WE NEED DO IS ALLOCATE SPACE FOR .DAT AND .UFDT AND	/EAG:195

/ SET UP THE .SCOM LOCATIONS, IT IS EASIER NOT TO CHECK FOR	/EAG:195

/ THIS CASE							/EAG:195

/								/EAG:195

/ IT SHOULD BE NOTED THAT SC.SLT HAS BEEN COPIED (BY IN.SCM)	/EAG:195

/ FROM THE OLD .SCOM TO THE NEW .SCOM PRIOR TO REACHING		/EAG:195

/ THIS ROUTINE.							/EAG:195

/								/EAG:195

/ THE OTHER THING DONE BY THIS ROUTINE IS TO TRANSLATE ALL	/EAG:200

/ REFERENCES TO SYS TO REFERENCES TO SYA, AND ALL REFERENCES	/EAG:200

/ TO CMA TO CMD.  THIS ALLOWS THE USER TO TYPE SY, SYS, AND	/EAG:200

/ SYA INTERCHANGEABLY YET ALWAYS GET SYA, OR TO TYPE CM, CMA	/EAG:200

/ AND CMD INTERCHANGEABLY YET ALWAYS GET CMD.			/EAG:200

/								/EAG:200

								/EAG:195

IN.DT1	LAC* (SC.RMS)		/ ALLOCATE SPACE FOR .DAT	/EAG:195

	DAC IND1.A		/ AND .UFDT TABLES.  ALSO	/EAG:195

	AAC 15			/ REMEMBER BASE ADDRESS OF	/EAG:195

	DAC* (SC.DAT)		/ THEM IN IND1.A FOR LATER	/EAG:195

	TAD* (SC.SLT)		/ COPY LOOP.  ALSO SET UP	/EAG:195

	AAC 16			/ SC.DAT AND SC.UFD.		/EAG:195

	DAC* (SC.UFD)						/EAG:195

	TAD* (SC.SLT)						/EAG:195

	IAC							/EAG:195

	DAC* (SC.RMS)						/EAG:195

	DZM IN.SVD+15-7		/ ZERO .DAT -7			/EAG:200

	LAC (242401)		/ .SIXBT "TTA"			/EAG:200

	JMS IN.GNU		/ PUT HANDLER NUMBER OF TTA	/EAG:200

	  CLA			/ INTO .DAT -3			/EAG:200

	DAC IN.SVD+15-3						/EAG:200

	LAC (031504)		/ .SIXBT "CMD"			/EAG:200

	JMS IN.GNU		/ PUT HANDLER NUMBER OF CMD	/EAG:200

	  CLA			/ INTO .DAT -2			/EAG:200

	DAC IN.SVD+15-2						/EAG:200

	LAC (031501)		/ .SIXBT "CMA"			/EAG:200

	JMS IN.GNU		/ REMEMBER HANDLER NUMBER OF	/EAG:200

	  LAW -1		/ CMA FOR TRANSLATE/COPY LOOP	/EAG:200

	DAC IND1.B						/EAG:200

	LAC (233123)		/ .SIXBT "SYS"			/EAG:200

	JMS IN.GNU		/ REMEMBER HANDLER NUMBER OF	/EAG:200

	  LAW -1		/ SYS FOR TRANSLATE/COPY LOOP	/EAG:200

	DAC IND1.C						/EAG:200

	LAC (233101)		/ .SIXBT "SYA"			/EAG:200

	JMS IN.GNU		/ REMEMBER HANDLER NUMBER OF	/EAG:200

	  CLA			/ SYA FOR TRANSLATE/COPY LOOP	/EAG:200

	DAC IND1.D						/EAG:200

	CLX			/ SET UP FOR COPY LOOP.  ZERO	/EAG:195

	LAC* (SC.SLT)		/ TO XR, LENGTH OF .DAT TO LR	/EAG:200

	AAC 16							/EAG:200

	PAL							/EAG:195

IND1.0	LAC IN.SVD,X		/ AND COPY .DAT TO BANK ZERO	/EAG:200

	AND (77777)		/ EXTRACT HANDLER NUMBER	/EAG:200

	SAD IND1.B		/ IS IT CMA?			/EAG:200

	LAC IN.SVD+15-2		/ IF SO, SUBSTITUTE CMD		/EAG:200

	SAD IND1.C		/ IS IT SYS?			/EAG:200

	LAC IND1.D		/ IF SO, SUBSTITUTE SYA		/EAG:200

	XOR IN.SVD,X		/ RESTORE UNIT NUMBER TO	/EAG:200

	AND (77777)		/ (POSSIBLY ALTERED) HANDLER	/EAG:200

	XOR IN.SVD,X		/ NUMBER.			/EAG:200

	DAC* IND1.A,X		/ SAVE IN BANK ZERO.		/EAG:200

	AXS 1							/EAG:195

	JMP IND1.0						/EAG:195

	PLA			/ MULTIPLY LR BY TWO, SO	/EAG:200

	CLL!RAL			/ IT NOW CONTAINS COMBINED	/EAG:200

	PAL			/ LENGTH OF .DAT AND .UFDT.	/EAG:200

IND1.1	LAC IN.SVD,X		/ COPY .UFDT TO BANK ZERO	/EAG:200

	DAC* IND1.A,X						/EAG:200

	AXS 1							/EAG:200

	JMP IND1.1						/EAG:200

	JMP IN.GO		/ FINISHED UNTIL IN.DT2.	/EAG:195

								/EAG:195

								/EAG:195

IND1.A	0			/ SAVES ADDRESS OF .DAT		/EAG:195

								/EAG:200

IND1.B	0			/ SAVES HANDLER NUMBER OF CMA	/EAG:200

								/EAG:200

IND1.C	0			/ SAVES HANDLER NUMBER OF SYS	/EAG:200

								/EAG:200

IND1.D	0			/ SAVES HANDLER NUMBER OF SYA	/EAG:200

	.TITLE     IN.GO -- CRANK UP THE MONITOR

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191

/ START UP MONITOR NOW THAT WE HAVE THE SKIP CHAIN		/EAG:191

/ SET UP.  THIS PRIMARILY INVOLVES ISSUEING AN ION AND		/EAG:191

/ ALSO TURNING API ON (IF PRESENT AND REQUESTED).  WE		/EAG:191

/ MUST ALSO CONNECT THE VARIOUS MONITOR INTERRUPT		/EAG:191

/ HANDLERS TO THEIR SKIP CHAIN ENTRIES AND API VECTORS.		/EAG:191

/ THE HANDLERS WE ARE CONCERNED WITH ARE THE CLOCK		/EAG:191

/ INTERRUPT HANDLER AND THE TELETYPE.  ALSO THE VARIOUS		/EAG:191

/ ERROR INTERRUPTS -- NON-EXISTENT MEMORY, ETC.			/EAG:191

/ THE VERY LAST THING WE DO IS ENABLE THE CLOCK.  THIS MAY	/EAG:191

/ NOT BE NECESSARY (AS WE'VE TURNED IT ON PREVIOUSLY), BUT IS	/EAG:191

/ DONE AS A "JUST IN CASE" MEASURE.  NOTE THAT IF THE CLOCK	/EAG:191

/ INTERRUPTS BETWEEN OUR ENABLING INTERRUPTS AND OUR CONNECTING	/EAG:191

/ IT TO THE SKIP CHAIN IT WILL BE TURNED OFF.			/EAG:191

/								/EAG:191

/ IT SHOULD BE NOTED THAT THE MONITOR IS RUNNING AND		/EAG:191

/ OPERATIONAL AS SOON AS WE TURN ON INTERRUPTS.  THUS WE	/EAG:191

/ COMPLETELY INITIALIZE THE MONITOR PROPER (WHICH WE HAVE	/EAG:191

/ DONE) BEFORE TURNING ON INTERRUPTS.  AFTER THIS POINT		/EAG:191

/ WE MUST USE THE REAL TELETYPE HANDLER (TTA.) TO DO ANY	/EAG:191

/ CONSOLE I/O, RATHER THAN DOING IT OURSELVES (AS WE HAVE	/EAG:191

/ BEEN DOING).  IF A FATAL ERROR OCCURS, THOUGH, WE CAN		/EAG:191

/ STILL DO THE I/O OURSELVES AFTER FIRST TURNING OFF		/EAG:191

/ INTERRUPTS AND ISSUEING A CAF.  THIS IS BEST ACCOMPLISHED	/EAG:191

/ BY A JMS* (RM.CAF)						/EAG:191

/								/EAG:191

/ IF WE ARE RUNNING IN XVM MODE WE MUST SET UP THE MM		/EAG:192

/ REGISTER BEFORE TURNING ON INTERRUPTS.			/EAG:192

/								/EAG:191

								/EAG:191

								/EAG:191
IN.GO=.			/ CRANK UP THE MONITOR		/RKB-210
/								/RKB-203
/ I AM ASSUMING THAT ALL INITIALIZATION MESSAGES HAVE BEEN	/RKB-203
/ DETECTED AND PRINTED BY NOW.  THESE MESSAGES HAVE BEEN	/RKB-203
/ GOING DIRECTLY TO THE CONSOLE TERMINAL.  ANY FURTHER		/RKB-203
/ MESSAGES WILL BE GOING TO THE VT, SO WE WOULD LIKE TO DO	/RKB-203
/ A CR/LF TO THE CONSOLE TERMINAL TO LEAVE THE PRINT HEAD	/RKB-203
/ IN A NICE PLACE.						/RKB-203
/								/RKB-203
	LAC	IN.CHR		/ HAS THE TTY ROUTINE BEEN	/RKB-203
	SNA			/ CALLED?  SKIP IF YES		/RKB-203
	JMP	.+3		/ NO TYPEOUT, NO CR/LF!		/RKB-203
	LAW	15		/ IN.CHR GIVES A FREE LF	/RKB-203
	JMS	IN.CHR		/ FOLLOWING A CR.		/RKB-203
	CAF			/ DO CAF JUST IN CASE A FLAG	/EAG:191

				/ HAS BEEN SET			/EAG:191

	LAC* (SC.MOD)		/ CHECK IF XVM MODE ENABLED	/EAG:192

	AND (SC.XVM)						/EAG:192

	SNA			/ SKIP IF IT IS			/EAG:192

	JMP INGO.0						/EAG:192

	.IFUND %PRTCT						/EAG:193

	LAC (700000)		/ MAGIC CONSTANT CONSISTS OF	/EAG:192

				/ RELOCATE DISABLE AND 17-BIT	/EAG:192

				/ G-MODE ENABLE FLAGS		/EAG:192

	LDMM			/ AND STICK IT THERE		/EAG:192

	.ENDC							/EAG:193

	.IFDEF %PRTCT						/EAG:193

	LAC (040000)		/ SET UP TO RUN			/EAG:193

	LDMM			/ IN PROTECT MODE.  SET IOT	/EAG:193

	LAC* (SC.MSZ)		/ PROTECT DISABLE IN MM		/EAG:193

	AAC -377		/ REGISTER, POINT BOUNDARY	/EAG:193

	MPLD			/ REGISTER TO MEMSIZ, AND	/EAG:193

	CLA			/ RELOCATION REGISTER TO ZERO.	/EAG:193

	MPLR							/EAG:193

	MPEU			/ AND ENTER USER MODE SO LIMIT	/EAG:193

				/ CHECKING WILL HAPPEN.		/EAG:193

	.ENDC							/EAG:193

PLR.S3=.							/EAG:194

INGO.0	NOP			/ START UP UNICHANNEL POLLER	/EAG:194

				/ (IF IT'S ENABLED).  THIS	/EAG:194

				/ INSTRUCTION IS MODIFIED BY	/EAG:194

				/ IN.PLR.			/EAG:194

	LAC* (SC.MOD)		/ CHECK IF API REQUESTED	/EAG:191

	AND (SC.API)						/EAG:191

	SNA			/ SKIP IF YES			/EAG:191

	JMP INGO.1						/EAG:191

	LAC (API.ON)		/ TURN ON API			/EAG:191

	ISA							/EAG:191

INGO.1	ION			/ TURN ON INTERRUPTS		/EAG:191

	.ENB			/ JUST IN CASE			/EAG:194

	.SETUP KW.API,CLSF,CK.INT	/ CONNECT CLOCK INT.	/EAG:191

	.SETUP 0,KSF,TIINT	/ CONNECT CONSOLE TTY KEYBOARD	/EAG:191

	.SETUP 0,TSF,TOINT	/ AND TTY PRINTER		/EAG:191

	JMS INGO.2		/ SET UP NXM ERROR IF IN SKIP	/EAG:192

	  .SETUP 0,MPSNE,NEMERR	/ CHAIN				/EAG:192

	JMS INGO.2		/ ALSO MEM. PROTECT VIOLATION	/EAG:192

	  .SETUP 0,MPSK,MPVERR					/EAG:192

	JMS INGO.2		/ ALSO MEM. PARITY ERROR	/EAG:192

	  .SETUP MP.API,SPE,MPEERR				/EAG:192

	JMS INGO.2		/ ALSO POWER FAIL TRAP		/EAG:192

	  .SETUP KF.API,PFSF,PFERR				/EAG:192

	JMS* (CK.STRT)		/ START UP CLOCK		/EAG:194

	LAC* (SC.VTR)		/ CHECK IF VT15 DISPLAY BUFFER	/EAG:193

	SZA			/ HAS BEEN SET UP (I.E. EXISTS)	/EAG:193

	LSD			/ AND START UP DISPLAY IF SO.	/EAG:193

	JMP IN.DT2						/EAG:191

								/EAG:192

								/EAG:192

								/EAG:192

/								/EAG:192

/ SUBOUTINE TO CHECK IF SKIP IS IN SKIP CHAIN AND ISSUE .SETUP	/EAG:192

/ IF THE SKIP IS IN THE SKIP CHAIN, BYPASS THE .SETUP IF THE	/EAG:192

/ SKIP IS NOT IN THE SKIP CHAIN.				/EAG:192

/								/EAG:192

/ CALLING SEQUENCE:						/EAG:192

/								/EAG:192

/	JMS INGO.2						/EAG:192

/	  .SETUP API,SKIP,ENTRY					/EAG:192

/								/EAG:192

/ THIS SUBROUTINE EXTRACTS THE SKIP FROM THE .SETUP EXPANSION	/EAG:192

/ AND CHECKS TO SEE IF IT IS IN THE SKIP CHAIN.  IF SO, IT	/EAG:192

/ RETURNS NORMALLY AND THE .SETUP IS EXECUTED.  IF NOT, IT	/EAG:192

/ RETURNS BY SKIPPING PAST THE .SETUP.				/EAG:192

/								/EAG:192

								/EAG:192

INGO.2	0							/EAG:192

	ISZ INGO.2		/ POINT TO SKIP IN .SETUP	/EAG:192

	ISZ INGO.2		/ EXPANSION			/EAG:192

	LAC SG.NMP		/ POINT XR AND LR TO SKIP	/EAG:192

	TAD SG.NMD		/ CHAIN IN SGNBLK		/EAG:192

	PAX							/EAG:192

	TAD SG.NMS						/EAG:192

	PAL

	LAC* INGO.2		/ PICK UP SKIP IOT		/EAG:192

INGO.3	SAD SG.BAS+1,X		/ AND SEARCH FOR IT		/EAG:192

	JMP INGO.4		/ FOUND IT			/EAG:192

	AXS 1							/EAG:192

	JMP INGO.3						/EAG:192

	CLA!IAC			/ IT ISN'T THERE -- BUMP INGO.2	/EAG:192

	IAC!SKP			/ PAST .SETUP			/EAG:192

INGO.4	LAW -2			/ FOUND IT -- BACK UP INGO.2 TO	/EAG:192

				/ START OF .SETUP		/EAG:192

	TAD INGO.2						/EAG:192

	DAC INGO.2						/EAG:192

	JMP* INGO.2		/ AND RETURN			/EAG:192

	.TITLE     IN.DT2 -- INITIALIZE .DAT AND .UFDT, PHASE 2

								/EAG:195

								/EAG:195

								/EAG:195

								/EAG:195

/								/EAG:195

/ THE INITIALIZATION OF THE .DAT AND .UFDT TABLES IS PERFORMED	/EAG:195

/ IN TWO PHASES.  THIS PHASE, THE SECOND AND FINAL PHASE,	/EAG:195

/ USES THE MONITOR TRAN ROUTINE (.MTRAN) AND THUS MUST		/EAG:195

/ BE DONE AFTER THE INTERRUPT SYSTEM HAS BEEN TURNED ON		/EAG:195

/ BY IN.GO.  THE FIRST PHASE MUST BE PERFORMED BEFORE		/EAG:195

/ INTERRUPTS ARE ALLOWED.					/EAG:195

/								/EAG:195

/ THE FIRST PHASE ALLOCATED SPACE FOR THESE TABLES AND		/EAG:195

/ SET THEM UP TO BE (ESSENTIALLY) WHAT THEY WERE FOR THE	/EAG:195

/ PREVIOUS CORE LOAD.  IF THE PREVIOUS CORE LOAD WAS THE	/EAG:195

/ NON-RESIDENT MONITOR WE WANT TO SAVE THE TABLES (IN DISK	/EAG:195

/ BLOCK 37) FOR LATER RE-USE.  IF THE PREVIOUS CORE LOAD WAS	/EAG:195

/ NOT THE NON-RESIDENT MONITOR WE THROW AWAY THE TABLES FROM	/EAG:195

/ THE PREVIOUS CORE LOAD AND USE THE ONES SAVED IN DISK BLOCK	/EAG:195

/ 37 INSTEAD.							/EAG:195

/								/EAG:195

/ IT SHOULD BE NOTED THAT IT IS ESSENTIAL THAT THE SAVED IMAGE	/EAG:195

/ OF THESE TABLES (SAVED IN DISK BLOCK 37) MUST NOT CONTAIN	/EAG:195

/ ANY SET UP .DAT SLOTS -- I.E. .DAT SLOTS WHICH CONTAIN	/EAG:195

/ HANDLER ADDRESSES RATHER THAN HANDLER NUMBERS.  HANDLER	/EAG:195

/ NUMBERS ARE INDICES INTO THE SGNBLK HANDLER TABLE.  BASED	/EAG:195

/ ON THE ASSUMPTION THAT THE NON-RESIDENT MONITOR ONLY USES	/EAG:195

/ .DAT SLOTS -2, -3, -7, AND -12 (-7 IS ONLY USED IF BATCH	/EAG:195

/ OR BOSS IS IN USE), AND THUS THESE FOUR .DAT SLOTS ARE THE	/EAG:195

/ ONLY .DAT SLOTS WHICH MIGHT BE SET UP, IN.DT1 HAS ENSURED	/EAG:195

/ THAT THE .DAT TABLE MEETS THIS CONDITION IF THE		/EAG:195

/ NON-RESIDENT MONITOR WAS THE PREVIOUS CORE LOAD.		/EAG:195

/								/EAG:195

/ FOLLOWING THE TRANSFERRAL OF .DAT AND .UFDT TO OR FROM	/EAG:200

/ DISK BLOCK 37, WE HANDLE .DAT SLOT TRANSLATION.  UNLESS	/EAG:200

/ WE ARE LOADING THE NON-RESIDENT MONITOR, WE TRANSLATE THE	/EAG:200

/ ENTIRE .DAT TABLE.  IF WE ARE LOADING THE NON-RESIDENT	/EAG:200

/ MONITOR, THEN WE TRANSLATE SLOTS -2 AND -3.  ADDITIONALLY,	/EAG:200

/ WHEN LOADING THE NON-RESIDENT MONITOR WE CHECK WHETHER	/EAG:200

/ LP IS ON OR OFF AND DO THE RIGHT THING FOR SLOT -12.		/EAG:200

/ THE ACTUAL TRANSLATION IS PERFORMED BY THE ROUTINE IND2.E	/EAG:200

/ BELOW, WHICH ROUTINE SHOULD BE REFERENCED TO DETERMINE	/EAG:200

/ WHICH I/O HANDLERS ARE MAPPED INTO WHICH OTHER I/O HANDLERS.	/EAG:200

/								/EAG:200

								/EAG:195

IN.DT2	LAW -10000		/ AVOID BANK ERROR		/EAG:197

	PAX							/EAG:195

	LAC SC.MOD+10000,X	/ WAS LAST CORE LOAD THE	/EAG:195

	AND (SC.NRM)		/ NON-RESIDENT MONITOR?		/EAG:195

	SZA!CLL			/ CLEAR LINK IF NOT,		/EAG:195

	STL			/ SET LINK IF IT WAS		/EAG:195

	JMS IND2.D		/ TRANSFER .DAT TO/FROM DISK	/EAG:195

	LAC* (SC.UFD)		/ SET UP .UFDT -7 TO BNK	/EAG:195

	PAX			/ OR PAG AS APPROPRIATE		/EAG:195

	AXR -7			/ POINT XR TO .UFDT -7		/EAG:195

	LAC* (SC.MOD)						/EAG:195

	AND (SC.BNK)						/EAG:195

	SZA!CLA							/EAG:195

	LAC (021613\200107)	/ CONSTANT IS:			/EAG:195

				/ <.SIXBT "BNK">\<.SIXBT "PAG">	/EAG:195

	XOR (200107)		/ CONSTANT IS:			/EAG:195

				/	.SIXBT "PAG"		/EAG:195

.X=(7-7)

	DAC* .X,X						/EAG:195

	DZM IND2.9		/ ASSUME NOT LOADING NON-RES.	/EAG:200

				/ MONITOR.  ZERO HANDLER #	/EAG:200

				/ TO BE TRANSLATED NEXT.	/EAG:200

	LAC* (SC.SPN)		/ ARE WE LOADING THE		/EAG:200

	SAD* (SC.NMN)		/ NON-RESIDENT MONITOR?		/EAG:200

	SKP			/ FALL THROUGH IF WE ARE,	/EAG:200

	JMP IND2.5		/ GO TO IND2.5 IF WE AREN'T.	/EAG:200

	LAC* (SC.SPN+1)						/EAG:200

	SAD* (SC.NMN+1)						/EAG:200

	SKP							/EAG:200

	JMP IND2.5						/EAG:200

	LAC* (SC.DAT)		/ CONSTRUCT A POINTER TO .DAT-3	/EAG:200

	AAC -3							/EAG:200

	DAC IND2.9						/EAG:200

	AAC 3-12		/ AND A POINTER TO .DAT-12	/EAG:200

	DAC IND2.8						/EAG:200

	LAC* IND2.8		/ SAVE ORIGINAL CONTENTS OF	/EAG:200

	DAC* (SC.FNM)		/ .DAT-12 IN SC.FNM SO THAT	/EAG:200

				/ THE NON-RESIDENT MONITOR CAN	/EAG:200

				/ RESTORE IT AS REQUIRED.	/EAG:200

	LAC* IND2.9		/ TRANSLATE CONTENTS OF .DAT-3	/EAG:200

	JMS IND2.E						/EAG:200

	  DAC* IND2.9						/EAG:200

	LAC* (SC.NMF)		/ CHECK FOR LP ON		/EAG:200

	AND (SC.LPON)		/ IF LP OFF JMP TO IND2.0	/EAG:200

	SNA			/ TO USE TTA (FROM .DAT-3)	/EAG:200

	JMP IND2.0		/ FOR .DAT-12.			/EAG:200

	LAC (142001)		/ .SIXBT "LPA"			/EAG:200

	JMS IN.GNU		/ IF LP ON PUT HANDLER NUMBER	/EAG:200

IND2.0	  LAC* IND2.9		/ OF LPA INTO .DAT-12.  IF LPA	/EAG:200

	DAC* IND2.8		/ NOT PRESENT OR LP OFF USE	/EAG:200

	ISZ IND2.9		/ TTA FROM .DAT-3.  NOTE THAT	/EAG:200

	LAC* IND2.9		/ WE ASSUME LPA NEED NOT BE	/EAG:200

	JMS IND2.E		/ TRANSLATED.			/EAG:200

	  DAC* IND2.9		/ TRANLATE .DAT-2		/EAG:200

	JMP IND2.6		/ BACK TO COMMON CODE		/EAG:200

								/EAG:200

								/EAG:200

/ FOLLOWING LOOP IS RUN WHEN NOT LOADING NON-RESIDENT MONITOR.	/EAG:200

/ IT TRANSLATES SUCCESSIVE HANDLER NUMBERS (BEGINNING AT ONE)	/EAG:200

/ UNTIL A HANDLER NUMBER IS REACHED WHICH DOES NOT GET		/EAG:200

/ TRANSLATED.  THE LOOP IS ENTERED BY ZEROING THE HANDLER	/EAG:200

/ NUMBER COUNTER (IND2.9) AND JUMPING TO IND2.5.		/EAG:200

								/EAG:200

.X=(1)

IND2.1	XOR* .X,X		/ EXTRACT UNIT NUMBER		/EAG:200

	XOR IND2.8		/ APPEND TO NEW I/O HANDLER #	/EAG:200

.X=(1)

	DAC* .X,X		/ AND STORE TRANSLATED SLOT	/EAG:200

	JMP IND2.4		/ AND REJOIN LOOP		/EAG:200

								/EAG:200

IND2.2	DAC IND2.8		/ SAVE VALUE WHICH I/O HANDLER	/EAG:200

	LAC* (SC.DAT)		/ NUMBER IN IND2.9 IS TO BE	/EAG:200

	PAX			/ TRANSLATED TO, SO WE CAN	/EAG:200

	AXR -16			/ UPDATE APPROPRIATE .DAT SLOTS	/EAG:200

	TAD* (SC.SLT)		/ SET UP XR AND LR TO SCAN .DAT	/EAG:200

	PAL							/EAG:200

.X=(1)

IND2.3	LAC* .X,X		/ FETCH NEXT .DAT SLOT, EXTRACT	/EAG:200

	AND (77777)		/ HANDLER NUMBER, AND CHECK IF	/EAG:200

	SAD IND2.9		/ IT MATCHES THE HANDLER WE'RE	/EAG:200

	JMP IND2.1		/ TRANSLATING.  IF IT DOES, GO	/EAG:200

IND2.4	AXS 1			/ TRANSLATE IT.			/EAG:200

	JMP IND2.3						/EAG:200

IND2.5	ISZ IND2.9		/ TRANSLATE NEXT HANDLER NUMBER	/EAG:200

	LAC IND2.9		/ FETCH VALUE TO WHICH IT	/EAG:200

	JMS IND2.E		/ WANTS TO BE TRANSLATED.	/EAG:200

	  JMP IND2.2		/ GO TRANSLATE IT.		/EAG:200

				/ SKIP RETURN FROM IND2.E	/EAG:200

				/ INDICATES HANDLER DOESN'T	/EAG:200

				/ WANT TO BE TRANSLATED, THUS	/EAG:200

				/ WE ARE DONE.			/EAG:200
IND2.6	LAC* (SC.DAT)		/ POINT .DAT+0 TO ITSELF	/EAG:200

	DAC IND2.9						/EAG:200
	DAC* IND2.9						/EAG:200
								/RKB-210
								/RKB-210
/ WE NOW WANT TO ARM THE '.WAIT -3' IN IO.WAT.			/RKB-210
/ THIS WAIT IS NEEDED TO ALOW THE TELETYPE			/RKB-210
/ TO STOP BEFORE DOING .EXITS, .OVERLYS, AND .MTRANS		/RKB-210
/ FAILURE TO DO THIS .WAIT RESULTS IN LOST			/RKB-210
/ CONSOLE MESSAGES IF THE USER OMMITS HIS			/RKB-210
/ .WAIT PRIOR TO A .EXIT, ETC.					/RKB-210
								/RKB-210
/ ADDITIONALLY, IT PREVENTS THE BUG KNOWN			/RKB-210
/ AS THE 'BATCH JIGGLES', WHERE TTA. IS				/RKB-210
/ .INITED WHILE I/O IS IN PROGRESS.				/RKB-210
								/RKB-210
/ HOWEVER, SINCE IO.WAT IS MATTER-OF-FACTLY			/RKB-210
/ INVOKED BY THE MONITOR TRAN ROUTINE,				/RKB-210
/ IF THE .DAT TABLE IS NOT YET SETUP,				/RKB-210
/ WHEN MTRAN IS USED, AN IOPS2 RESULTS.				/RKB-210
/ IN FACT, MTRAN IS USED IN THIS ROUTINE			/RKB-210
/ SO IT IS AFTER THIS ROUTINE THAT THE				/RKB-210
/ .DAT IS SAFE TO USE.  THEREFORE, WE				/RKB-210
/ WILL CHANGE:							/RKB-210
/IOWT.S	SKP							/RKB-210
/	12							/RKB-210
/ TO:								/RKB-210
/IOWT.S	CAL -3&777						/RKB-210
/	12							/RKB-210
/ WHICH IS A LEGAL '.WAIT -3' EXPANSION.			/RKB-210
								/RKB-210
	LAC	(CAL -3&777)	/ OVERLAY THE 'SKP'		/RKB-210
	DAC*	(IOWT.S)	/ WITH THE PROPER 'CAL'		/RKB-210
				/ TO TURN ON THE '.WAIT -3'	/RKB-210
				/ IN IO.WAT.			/RKB-210
								/RKB-210

	JMP IN.LDR		/ DONE!				/EAG:200

								/EAG:195

								/EAG:195

								/EAG:195

IND2.8	0			/ TEMPORARY USED ABOVE		/EAG:200

								/EAG:200

IND2.9	0			/ TEMPORARY USED ABOVE		/EAG:195

								/EAG:195

								/EAG:195

								/EAG:195

								/EAG:195

/								/EAG:195

/ SUBROUTINE USED TO TRANSFER .DAT AND .UFDT TO OR FROM DISK	/EAG:195

/ BLOCK 37.  ENTRY POINT IS IND2.D.  ENTER WITH LINK CLEAR	/EAG:195

/ TO READ .DAT AND .UFDT FROM DISK, WITH LINK SET TO WRITE	/EAG:195

/ .DAT AND .UFDT ONTO DISK.					/EAG:195

/								/EAG:195

								/EAG:195

								/EAG:195

IND2.A	37			/ DISK BLOCK NUMBER		/EAG:195

IND2.B	0			/ CORE ADDRESS -1 OF .DAT	/EAG:195

IND2.C	0			/ - LENGTH OF .DAT AND .UFDT	/EAG:195

IND2.D	0			/ ADDRESS TO RETURN TO AFTER	/EAG:195

				/ TRANSFER.  THUS, JMS ENTRY	/EAG:195

				/ POINT.			/EAG:195

	LAC* (SC.DAT)		/ CALCULATE BEGIN OF .DAT	/EAG:195

	AAC -16			/ ACTUALLY BEGIN -1		/EAG:195

	DAC IND2.B						/EAG:195

	LAC* (SC.SLT)		/ CALCULATE LENGTH OF TABLES	/EAG:195

	TAD* (SC.SLT)		/ MUL. *2 WITHOUT GRITCHING LNK	/EAG:195

	CMA			/ AGAIN DON'T DISTURB LINK.	/EAG:195

				/ IAC PART OF TCA INCLUDED IN	/EAG:195

	AAC -16*2+1		/ THIS INSTRUCTION		/EAG:195

	DAC IND2.C						/EAG:195

	LAC (IND2.A)		/ GET ADDRESS OF CONTROL TABLE	/EAG:195

	TAD IN.BNK						/EAG:195

	.MTRAN			/ AND GO TO MONITOR .TRAN	/EAG:195

								/EAG:200

								/EAG:200

								/EAG:200

								/EAG:200

/								/EAG:200

/ THE FOLLOWING ROUTINE TRANSLATES I/O HANDLER NUMBERS FROM	/EAG:200

/ WHAT GETS ASSIGNED TO .DAT TO WHAT IS NEEDED FOR EXECUTION.	/EAG:200

/ IT ASSUMES THAT THE TRANSLATIONS CMA -> CMD AND SYS -> SYA	/EAG:200

/ HAVE ALREADY BEEN TAKEN CARE OF.  IT ALSO ASSUMES THAT	/EAG:200

/ IN.CMD CONTAINS THE HANDLER ADDRESS OF THE COMMAND INPUT	/EAG:200

/ INPUT DEVICE (CMD) AND IN.CNSL CONTAINS THE HANDLER ADDRESS	/EAG:200

/ OF THE CONSOLE OUTPUT DEVICE (TTA).  NORMALLY THESE ARE BOTH	/EAG:200

/ WIRED TO TTA., BUT BOSS AND BATCH MAY WIRE THEM TO SOMETHING	/EAG:200

/ DIFFERENT.							/EAG:200

/								/EAG:200

/ THE EXACT MAPPING IMPLEMENTED BY THIS ROUTINE IS AS FOLLOWS:	/EAG:200

/								/EAG:200

/	CM* -> IN.CMD	(COMMAND INPUT DEVICE)			/EAG:200

/								/EAG:200

/	TT* -> IN.CNSL	(CONSOLE OUTPUT DEVICE)		/EAG:200

/								/EAG:200

/	SY* -> THE IDENTICALLY LETTERED VERSION OF THE SYSTEM	/EAG:200

/		DISK HANDLER.					/EAG:200

/								/EAG:200

/ THIS ROUTINE IS CALLED WITH THE ORIGINAL .DAT SLOT CONTENTS	/EAG:200

/ (I/O HANDLER NUMBER IN LOW 15 BITS) IN THE AC.  IF THE	/EAG:200

/ HANDLER IS ONE TO BE TRANSLATED A NON-SKIP RETURN IS TAKEN	/EAG:200

/ WITH THE NEW .DAT SLOT CONTENTS IN THE AC.  IF THE HANDLER	/EAG:200

/ IS NOT ONE WHICH IS TRANSLATED A SKIP RETURN IS TAKEN WITH	/EAG:200

/ ALL REGISTERS CLOBBERED.					/EAG:200

/								/EAG:200

/ THIS ROUTINE CLOBBERS ALL REGISTERS.				/EAG:200

/								/EAG:200

								/EAG:200

IND2.E	0							/EAG:200

	JMS IN.GNA		/ GET HANDLER NAME		/EAG:200

	  JMP IND2.F		/ IF NOT FOUND, DON'T TRANSLATE	/EAG:200

	DAC IND2.J		/ SAVE HANDLER NAME		/EAG:200

	AND (777700)		/ MASK OUT DEVICE NAME		/EAG:200

	SAD (242400)		/ IS IT TT?			/EAG:200

	JMP IND2.I						/EAG:200

	SAD (031500)		/ IS IT CM?			/EAG:200

	JMP IND2.H						/EAG:200

	SAD (233100)		/ IS IT SY?			/EAG:200

	JMP IND2.G						/EAG:200

IND2.F	ISZ IND2.E		/ DEVICE DOES NOT GET		/EAG:200

	JMP* IND2.E		/ TRANSLATED -- TAKE SKIP RTRN	/EAG:200

								/EAG:200

IND2.G	XOR IND2.J		/ DEVICE IS SY -- EXTRACT	/EAG:200

	XOR SG.SYS		/ HANDLER VERSION LETTER AND	/EAG:200

	JMS IN.GNU		/ JOIN TO SYSTEM DISK NAME	/EAG:200

	  CLA			/ GET HANDLER NUMBER, ZERO IF	/EAG:200

	JMP* IND2.E		/ DOESN'T EXIST, AND RETURN	/EAG:200

								/EAG:200

IND2.H	LAC IN.CMD		/ DEVICE IS CM -- USE COMMAND	/EAG:200

	JMP* IND2.E		/ INPUT DEVICE			/EAG:200

								/EAG:200

IND2.I	LAC IN.CNSL		/ DEVICE IS TT -- USE CONSOLE	/EAG:200

	JMP* IND2.E		/ OUTPUT DEVICE			/EAG:200

								/EAG:200

								/EAG:200

IND2.J	0			/ SAVES ORIGINAL HANDLER NAME	/EAG:200

	.TITLE     IN.LDR -- TRANSFER TO SYSTEM LOADER

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191

/ SET UP LOCATIONS DESCRIBING FREE MEMORY, CHECK FOR A		/EAG:199

/ PREVIOUS MEMORY OVERFLOW, AND THEN DO .OVRLA TO .SYSLD.	/EAG:199

/								/EAG:191

								/EAG:191

								/EAG:191

IN.LDR	LAC* (SC.RMS)		/ SET UP SC.FRL			/EAG:191

	DAC* (SC.FRL)		/ SC.FRL+1 SET UP BELOW		/EAG:191

	LAC* (SC.BOS)		/ CHECK IF BOSS IS ACTIVE.	/EAG:193

	AND (SC.BMD)						/EAG:193

	SNA			/ SKIP IF IT IS.		/EAG:193

	JMP INLD.0						/EAG:193

	ISZ IN.OVF		/ SKIP UNLESS MEMORY OVERFLOW	/EAG:193

				/ OCCURED.			/EAG:193

	JMP INLD.3		/ IF BOSS IS ACTIVE AND MEM.	/EAG:193

				/ OVRFLO OCCURED, ISSUE		/EAG:193

				/ .SYSLD 1 AND EXIT.		/EAG:193

INLD.0	LAC (INLD.A)		/ SEARCH SYSBLK FOR .SYSLD	/EAG:199

	TAD IN.BNK						/EAG:199

	JMS IN.SSB						/EAG:199

	  JMP INLD.2		/ NOT FOUND -- FATAL ERROR	/EAG:199

	LAC SB.BAS+SB.FB,X	/ SET UP .MTRAN PARAMETER	/EAG:199

	DAC INLD.B		/ BLOCK FROM DESCRIPTION OF	/EAG:199

	LAC SB.BAS+SB.FA,X	/ .SYSLD IN SYSBLK		/EAG:199

	AAC -1							/EAG:199

	TAD IN.BNK						/EAG:199

	DAC INLD.C						/EAG:199

	DAC* (SC.FRL+1)		/ SET UP SC.FRL+1		/EAG:199

	LAC SB.BAS+SB.PS,X					/EAG:199

	TCA							/EAG:199

	DAC INLD.D						/EAG:199

	LAC SB.BAS+SB.SA,X					/EAG:199

	TAD IN.BNK						/EAG:199

	DAC INLD.E						/EAG:199

	LAC (INLD.B)		/ POINT AC TO PARAMETER BLOCK	/EAG:199

	TAD IN.BNK						/EAG:199

	EBA			/ .SYSLD RUNS IN BANK MODE	/EAG:199

	CLL			/ AND GO TO SYSLD		/EAG:199

	.MTRAN							/EAG:199

								/EAG:199

								/EAG:199

/ COME HERE IF ENTRY FOR .SYSLD ISN'T FOUND IN SYSBLK		/EAG:199

								/EAG:199

INLD.2	JMS* (RM.CAF)		/ TURN OFF INTERRUPT SYSTEM	/EAG:199

	JMS IN.MSG		/ GIVE ERROR MESSAGE		/EAG:199

	.ASCII <15>".SYSLD NOT IN SYSBLK"<0>			/EAG:199

	JMP IN.FAL		/ THIS ERROR IS FATAL		/EAG:199

								/EAG:199

								/EAG:199

/ COME HERE IF WE OBSERVED A MEMORY OVERFLOW AND BOSS IS	/EAG:199

/ RUNNING							/EAG:199

								/EAG:199

INLD.3	LAC* (SC.BOS)		/ FORCE OUTPUT TO TTA		/EAG:199

	XOR (SC.BTT)						/EAG:199

	DAC* (SC.BOS)						/EAG:199

	LAC (INLD.F)						/EAG:199

	TAD IN.BNK						/EAG:199

	DAC INLD.4		/ WRITE OUT ERROR MESSAGE	/EAG:199

	.WRITE -3,2,INLD.F,6					/EAG:199

INLD.4=.-2							/EAG:199

	LAC* (SC.BOS)		/ FORCE .WAIT TO TTA		/EAG:199

	XOR (SC.BTT)						/EAG:199

	DAC* (SC.BOS)						/EAG:199

	.WAIT -3						/EAG:199

	LAC (777777-SC.BAB-SC.BERR)				/EAG:199

	AND* (SC.BOS)						/EAG:199

	XOR (2+SC.BAB)		/ SET ERROR CODE IN SC.BOS	/EAG:199

	DAC* (SC.BOS)						/EAG:199

	.EXIT							/EAG:199

								/EAG:199

								/EAG:199

								/EAG:199

								/EAG:199

INLD.A	.SIXBT ".SYSLD"		/ NAME OF SYSTEM LOADER		/EAG:199

								/EAG:199

								/EAG:199

/ .MTRAN PARAMETER BLOCK FOR BRINGING IN .SYSLD			/EAG:199

								/EAG:199

INLD.B	-1			/ FIRST DISK BLOCK NUMBER	/EAG:199

INLD.C	-2			/ FIRST CORE ADDRESS MINUS ONE	/EAG:199

INLD.D	0			/ TWO'S COMPLEMENT PGM. SIZE	/EAG:199

INLD.E	-1			/ PROGRAM START ADDRESS		/EAG:199

								/EAG:199

								/EAG:199

								/EAG:199

INLD.F	6*400							/EAG:199

	0							/EAG:199

	.ASCII ".SYSLD 1"<15>					/EAG:199

	.TITLE     IN.BBT -- BANK BIT INITIALIZATION ROUTINE

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191

/ ROUTINE TO APPEND BANK BITS TO TRANSFER VECTORS.  CALLING	/EAG:191

/ SEQUENCE:							/EAG:191

/								/EAG:191

/	JMS IN.BBT						/EAG:191

/	  VCTR.1	/ ADDRESS OF FIRST TRANSFER VECTOR	/EAG:191

/	  VCTR.2	/ ADDRESS OF SECOND TRANSFER VECTOR	/EAG:191

/	    .							/EAG:191

/	    .							/EAG:191

/	    .							/EAG:191

/	  VCTR.N	/ ADDRESS OF LAST TRANSFER VECTOR	/EAG:191

/	  -1		/ FLAG END OF LIST			/EAG:191

/								/EAG:191

/ THE TRANSFER VECTOR ADDRESSES MUST ALL BE BETWEEN 0 AND 32K.	/EAG:191

/ THE AC AND THE LINK ARE CLOBBERED.  ALL OTHER REGISTERS ARE	/EAG:191

/ PRESERVED, INCLUDING THE XR AND LR.  LOCATION IN.BNK MUST	/EAG:191

/ BE SET UP BEFORE CALLING THIS ROUTINE.			/EAG:191

/								/EAG:191

/ IT SHOULD BE NOTED THAT THE TRANSFER VECTOR ADDRESSES		/EAG:191

/ IN THE ARGUMENT LIST WILL NOT BE BANK BIT RELOCATED.  THUS	/EAG:191

/ THIS ROUTINE IS ONLY USEFUL FOR BANK BIT INITIALIZING		/EAG:191

/ TRANSFER VECTORS IN BANK ZERO -- I.E. TRANSFER VECTORS IN	/EAG:191

/ THE RESIDENT MONITOR PROPER.					/EAG:191

/								/EAG:191

								/EAG:191

								/EAG:191

IN.BBT	0							/EAG:191

INBB.0	LAC* IN.BBT		/ PICK UP ADDR. NXT XFER VCTR.	/EAG:191

	ISZ IN.BBT						/EAG:191

	SPA			/ HAVE WE REACHED END YET?	/EAG:191

	JMP* IN.BBT		/ YES -- RETURN			/EAG:191

	DAC INBB.A		/ PUT WHERE WE CAN USE IT	/EAG:191

	LAC* INBB.A		/ GET XFER VECTOR CONTENTS	/EAG:191

	AND (17777)		/ TRIM OFF ANY OLD BANK BITS	/EAG:191

	XOR IN.BNK		/ AND ADD IN THE NEW		/EAG:191

	DAC* INBB.A		/ PUT IT BACK IN ITS PLACE	/EAG:191

	JMP INBB.0		/ AND GO DO NEXT ONE		/EAG:191

								/EAG:191

								/EAG:191

INBB.A	-1			/ TEMPORARY USED ABOVE		/EAG:191

	.TITLE     IN.FAL -- FAILURE ROUTINE.  COME HERE TO DIE

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191

/ IN THE COURSE OF INITIALIZING THE RESIDENT MONITOR, WE	/EAG:191

/ CHECK FOR VARIOUS PATHOLOGICAL CONDITIONS WHICH WILL NOT	/EAG:191

/ ALLOW US TO SUCCESSFULLY LOAD AND INITIALIZE THE RESIDENT	/EAG:191

/ MONITOR.  IF ANY SUCH FATAL PROBLEMS ARE ENCOUNTERED WE	/EAG:191

/ FIRST TYPE A MESSAGE STATING WHAT THE PROBLEM IS AND THEN	/EAG:191

/ JUMP HERE.  THIS ROUTINE THEN TYPES A MESSAGE STATING THAT	/EAG:191

/ WE CANNOT LOAD THE MONITOR AND THEN DIES -- I.E. IT HALTS.	/EAG:191

/ 								/EAG:191

								/EAG:191

								/EAG:191

IN.FAL	JMS IN.MSG		/ OUTPUT MESSAGE		/EAG:191

	.ASCII " -- "<015><011><011>"CANNOT LOAD "<000>		/EAG:191

	JMS IN.MSG						/EAG:191

	.SYSID <	.ASCII ">,< RESIDENT MONITOR."<15><0>>	/EAG:191

INFL.0	HLT							/EAG:191

	JMP INFL.0						/EAG:191

/

/								/RKB-198

/								/RKB-198

/ ROUTINE TO TYPE "RES. MON. TOO BIG DUE TO " AS A PREAMBLE	/RKB-198

/ TO MANY INITIALIZATION ERROR MESSAGES.			/RKB-198

/								/RKB-198

/ CALLING SEQUENCE (TYPICAL):					/RKB-198

/	JMS	IN.BIG		/ TYPE PREAMBLE			/RKB-198

/	JMS	IN.MSG		/ FINISH LINE WITH MY PART. ERR	/RKB-198

/	.ASCII	"PARTICULAR REASON"<000>			/RKB-198

/

/								/RKB-198

IN.BIG	XX							/RKB-198

	JMS	IN.MSG		/ TYPE IT			/RKB-198

	.ASCII	<015>"RES. MON. TOO BIG DUE TO "<000>		/RKB-198

	JMP*	IN.BIG		/ PROVIDED ONLY TO SAVE SPACE	/RKB-198
	.TITLE     IN.MSG,IN.TYP,IN.CHR -- CHAR. I/O SUBR.'S

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191

/ IN.MSG -- TYPE A MESSAGE (INCLUDED IN CALLING SEQUENCE) ON	/EAG:191

/ THE CONSOLE TERMINAL.  THE MESSAGE MAY INCLUDE THE ASCII	/EAG:191

/ GRAPHICS, TABS, AND CARRAIGE RETURNS.  TAB STOPS ARE EVERY	/EAG:191

/ EIGHT SPACES AND CARRAIGE RETURNS ARE TRANSLATED INTO		/EAG:191

/ CARRAIGE RETURN/LINE FEEDS.  THE MESSAGE IS TERMINATED	/EAG:191

/ BY A CHARACTER WITH OCTAL CODE ZERO (I.E., A NULL).		/EAG:191

/								/EAG:191

/ CALLING SEQUENCE:						/EAG:191

/								/EAG:191

/	JMS IN.MSG						/EAG:191

/	.ASCII "MESSAGE TO BE TYPED"<000>			/EAG:191

/	(RETURN)						/EAG:191

/								/EAG:191

/ THIS SUBROUTINE CLOBBERS THE AC, THE LINK, AND THE XR.	/EAG:191

/								/EAG:191

								/EAG:191

								/EAG:191

IN.MSG	0							/EAG:191

	LAC IN.MSG		/ TAKE POINTER TO MESSAGE	/EAG:191

	AND (77777)		/ STRIP OFF MODE BITS		/EAG:191

	PAX			/ AND PUT IN XR FOR IN.TYP	/EAG:191

	JMS IN.TYP		/ TYPE OUT THE MESSAGE		/EAG:191

.X=(0)

	JMP* .X,X		/ IN.MSG LEAVES XR POINTING TO	/EAG:191

				/ WORD FOLLOWING MESSAGE --	/EAG:191

				/ I.E. OUR RETURN		/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191

/ IN.TYP -- TYPE A MESSAGE (POINTED TO BY XR) ON THE CONSOLE	/EAG:191

/ TERMINAL.  THE MESSAGE MAY INCLUDE THE ASCII GRAPHICS, TABS,	/EAG:191

/ AND CARRIAGE RETURNS.  TAB STOPS ARE EVERY EIGHT SPACES AND	/EAG:191

/ CARRAIGE RETURNS ARE TRANSLATED INTO CARRAIGE RETURN/LINE	/EAG:191

/ FEEDS.  THE MESSAGE IS TERMINATED BY A CHARACTER WITH		/EAG:191

/ OCTAL CODE ZERO (I.E., A NULL).  UPON RETURN THE XR IS LEFT	/EAG:191

/ POINTING TO THE WORD FOLLOWING THE MESSAGE.			/EAG:191

/								/EAG:191

/ CALLING SEQUENCE:						/EAG:191

/								/EAG:191

/	JMS IN.TYP						/EAG:191

/								/EAG:191

/ EXAMPLE OF ARGUMENT TRANSMISSION:				/EAG:191

/								/EAG:191

/	XR (AT TIME OF CALL) --------->	.ASCII "MESSA"		/EAG:191

/					.ASCII "GE TO"		/EAG:191

/					.ASCII " BE T"		/EAG:191

/					.ASCII "YPED"<000>	/EAG:191

/	XR (AT TIME OF RETURN) ------->				/EAG:191

/								/EAG:191

/ THIS SUBROUTINE CLOBBERS THE AC AND THE LINK.			/EAG:191

/								/EAG:191

/ THIS SUBROUTINE MAKES USE OF THE FACT THAT .ASCII STRINGS	/EAG:191

/ ARE PADDED OUT TO A MULTIPLE OF TWO WORDS BY PADDING WITH	/EAG:191

/ NULLS.  THUS THE ONLY CHARACTERS CHECKED TO SEE IF THEY	/EAG:191

/ ARE A NULL (TERMINATING THE MESSAGE) ARE THE FIFTH (LAST)	/EAG:191

/ CHARACTER IN EVERY DOUBLE WORD.  THE NULL CHARACTERS ARE	/EAG:191

/ OUTPUT (VIA IN.CHR) BEFORE THEY ARE KNOWN TO BE NULLS --	/EAG:191
/ IN.CHR IS SMART ENOUGH TO IGNORE THEM.			/EAG:191

/								/EAG:191

								/EAG:191

								/EAG:191

IN.TYP	0							/EAG:191

.X=(0)

INTP.1	LAC* .X,X		/ GET FIRST CHAR (OF FIVE)	/EAG:191

	SWHA							/EAG:191

	RTR							/EAG:191

	JMS IN.CHR		/ AND TYPE IT			/EAG:191

.X=(0)

	LAC* .X,X		/ GET SECOND CHAR (OF FIVE)	/EAG:191

	RTR							/EAG:191

	RTR							/EAG:191

	JMS IN.CHR		/ AND TYPE IT			/EAG:191

.X=(1)

	LAC* .X,X		/ GET THIRD CHAR (OF FIVE)	/EAG:191

	RAL							/EAG:191

.X=(0)

	XOR* .X,X						/EAG:191

	AND (600000)						/EAG:191

.X=(0)

	XOR* .X,X						/EAG:191

	RTL							/EAG:191

	RAL							/EAG:191

	JMS IN.CHR		/ AND TYPE IT			/EAG:191

.X=(1)

	LAC* .X,X		/ GET FOURTH CHAR (OF FIVE)	/EAG:191

	RAL							/EAG:191

	SWHA							/EAG:191

	JMS IN.CHR		/ AND TYPE IT			/EAG:191

.X=(1)

	LAC* .X,X		/ GET FIFTH CHAR (OF FIVE)	/EAG:191

	RAR							/EAG:191

	JMS IN.CHR		/ AND TYPE IT			/EAG:191

.X=(1)

	LAC* .X,X		/ ARE WE AT END OF MESSAGE?	/EAG:191

	AND (376)		/ ZERO IF SO			/EAG:191

	AXR 2			/ BUMP XR PAST OLD WORD PAIR	/EAG:191

	SZA							/EAG:191

	JMP INTP.1		/ NO -- GO DO NEXT WORD PAIR	/EAG:191

	JMP* IN.TYP		/ YES -- RETURN			/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191
/ IN.CHR -- TYPE ONE CHARACTER FROM THE AC.  ONLY THE LOW 7	/EAG:191

/ BITS OF THE AC MATTER -- THE REST ARE IGNORED (MASKED OUT).	/EAG:191
/ LEGAL CHARACTERS INCLUDE THE ASCII GRAPHICS, TABS, AND	/EAG:191
/ CARRAIGE RETURNS.  TAB STOPS ARE EVERY EIGHT SPACES AND	/EAG:191

/ CARRAIGE RETURNS ARE TRANSLATED TO CARRAIGE RETURN/LINE	/EAG:191

/ FEEDS.							/EAG:191

/								/EAG:191

/ CALLING SEQUENCE:						/EAG:191

/								/EAG:191

/	JMS IN.CHR						/EAG:191

/								/EAG:191
/ THIS SUBROUTINE CLOBBERS THE AC AND THE LINK.			/EAG:191
/								/RKB-210
/								/RKB-210
/		N O T I C E					/RKB-210
/								/RKB-210
/ NOTE THAT THE ENTRY POINT (IN.CHR) IS USED AS A FLAG BY	/RKB-203
/ IN.GO TO DETERMINE IF A CR/LF SHOULD BE ISSUED TO THE		/RKB-203
/ CONSOLE TERMINAL BEFORE WE START UP THE MONITOR.  THIS	/RKB-203
/ IS IN ORDER TO LEAVE THE PRINT HEAD AT THE LEFT MARGIN	/RKB-203
/ AFTER THE MONITOR IS UP IF ANY INITIALIZATION MESSAGES	/RKB-203
/ WERE TYPED.							/RKB-203
/ ZERO MEANS NO MESSAGES, ERGO NO CR/LF.  THUS IT IS		/RKB-203
/ NECESSARY TO HAVE IN.CHR BE A '0'.				/RKB-203

/								/EAG:191

								/EAG:191

								/EAG:191

IN.CHR	0							/EAG:191

	AND (177)		/ MASK OUT CHARACTER		/EAG:191

	SNA			/ IGNORE NULLS (ZEROS)		/EAG:191

	JMP INCR.3						/EAG:191

	SAD (11)		/ CONVERT TABS TO SPACES WITH	/EAG:191

INCR.0	LAW 40			/ SIGN BIT SET			/EAG:191

	ISZ INCR.A		/ INCR. COLUMN COUNT (FOR TABS)	/EAG:191

INCR.1	TLS			/ PRINT CHARACTER		/EAG:191

INCR.2	TSF			/ WAIT FOR PRINTER TO FINISH	/EAG:191

	JMP INCR.2						/EAG:191

	TCF			/ AND CLEAR FLAG SO WON'T	/EAG:191

				/ BOTHER US (WITH INTERRUPTS)	/EAG:191

	SAD (15)		/ WAS IT CARRAIGE RETURN?	/EAG:191

	JMP INCR.4		/ YES -- OUTPUT LINE FEED	/EAG:191

	CMA			/ CLEAR LINK IF DOING TAB, SET	/EAG:191

	RAL			/ LINK IF NOT DOING TAB		/EAG:191

	LAC INCR.A		/ HAVE WE REACHED TAB STOP YET?	/EAG:191

	AND (7)			/ ZERO SIGNIFIES YES		/EAG:191

	SZA!SNL			/ SKIPS IF NOT DOING TAB, OR	/EAG:191

				/ TAB HAS REACHED TAB STOP	/EAG:191

	JMP INCR.0		/ NOT DONE WITH TAB -- GO	/EAG:191

				/ OUTPUT ANOTHER SPACE		/EAG:191

INCR.3	JMP* IN.CHR		/  RETURN TO CALLER		/EAG:191

								/EAG:191

/ COME HERE AFTER OUTPUTTING CARRAIGE RETURN			/EAG:191

								/EAG:191

INCR.4	DZM INCR.A		/ RESET TAB COLUMN COUNTER	/EAG:191

	AAC 12-15		/ CONVERT CR TO LF		/EAG:191

	JMP INCR.1		/ AND GO OUTPUT IT		/EAG:191

								/EAG:191

								/EAG:191

INCR.A	0			/ COLUMN POSITION COUNTER.	/EAG:191

				/ USED FOR TABBING.		/EAG:191

	.TITLE     IN.NMK,IN.NUM,IN.OCT -- NUMERIC I/O SUBR.'S

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191

/ IN.NMK -- TYPE A NUMBER (SUCH AS A MEMORY SIZE) IN "K"	/EAG:191

/ FORMAT.  THIS SUBROUTINE ACCEPTS A NUMBER IN THE AC.  THIS	/EAG:191

/ NUMBER IS INCREMENTED BY 1, DIVIDED (WITH TRUNCATION) BY	/EAG:191

/ 1024, AND PRINTED.  IMMEDIATELY FOLLOWING THE NUMBER THE	/EAG:191

/ LETTER "K" IS OUTPUT.  THIS FORMAT IS DESIGNED FOR		/EAG:191

/ OUTPUTTING MEMORY SIZES AND ADDRESSES.  THE STANDARD		/EAG:191

/ INTERNAL FORMATS OF SUCH THINGS MAY BE GIVEN DIRECTLY TO	/EAG:191

/ THIS ROUTINE AND HANDLED PROPERLY.  THE NUMBER WILL BE	/EAG:191

/ TYPED WITH LEADING ZEROS SUPPRESSED.				/EAG:191

/								/EAG:191

/ CALLING SEQUENCE:						/EAG:191

/								/EAG:191

/	JMS IN.NMK						/EAG:191

/								/EAG:191

/ THIS SUBROUTINE CLOBBERS THE AC, LINK, AND THE EAE REGISTERS	/EAG:191

/ (MQ AND STEP COUNTER).					/EAG:191

/								/EAG:191

								/EAG:191

								/EAG:191

IN.NMK	0							/EAG:191

	IAC			/ INCREMENT SO THAT THINGS LIKE	/EAG:191

				/ 077777 WILL PRINT AS "32K"	/EAG:191

	AND (776000)		/ MASK TO "K"			/EAG:191

	SWHA			/ AND SHIFT "K" DOWN TO UNITS	/EAG:191

	CLL!RAR							/EAG:191

	JMS IN.NUM		/ TYPE NUMBER W/ ZERO SUPPRES.	/EAG:191

	LAW 113			/ ASCII CODE FOR "K"		/EAG:191

	JMS IN.CHR		/ OUTPUT "K"			/EAG:191

	JMP* IN.NMK		/ AND RETURN			/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191

/ IN.NUM -- TYPE A NUMBER (PASSED IN THE AC) IN DECIMAL WITH	/EAG:191

/ LEADING ZEROS SUPPRESSED.  THE NUMBER IS ASSUMED TO BE AN	/EAG:191

/ UNSIGNED, POSITIVE, 18-BIT QUANTITY.  IF IT IS ZERO THE	/EAG:191

/ SINGLE DIGIT "0" WILL BE TYPED.				/EAG:191

/								/EAG:191

/ CALLING SEQUENCE:						/EAG:191

/								/EAG:191

/	JMS IN.NUM						/EAG:191

/								/EAG:191

/ TO AVOID LEADING ZERO SUPPRESSION EXECUTE A:			/EAG:193

/								/EAG:193

/	DZM INNM.B						/EAG:193

/								/EAG:193

/ BEFORE CALLING THIS ROUTINE.					/EAG:193

/								/EAG:193

/ THIS SUBROUTINE CLOBBERS THE AC, LINK, AND THE EAE REGISTERS	/EAG:191

/ (MQ AND STEP COUNTER).					/EAG:191

/								/EAG:191

								/EAG:191

								/EAG:191

IN.NUM	0							/EAG:191

	LMQ			/ PUT # INTO MQ			/EAG:193

	LAW -5			/ SET UP DIGIT COUNTER.  NOTE	/EAG:193

	DAC INNM.A		/ THAT COUNT DOESN'T INCLUDE	/EAG:193

				/ FIRST DIGIT.			/EAG:193

	LAC (200000)		/ MAGIC CONSTANT IS ONE AFTER	/EAG:193

				/ POSITION OF BINARY POINT IS	/EAG:193

				/ CONSIDERED.			/EAG:193

	CLL			/ FOR MUL.			/EAG:193

	MUL-13000		/ RESULT=(MQ)*(1/100000.)+(AC)	/EAG:193

	  517427		/ (1/100000.)*2**(16+18)	/EAG:193

	LRS+20			/ ALIGN BINARY POINT BETWEEN	/EAG:193

				/ AC AND MQ.			/EAG:193

INNM.0	AAC 60			/ CONVERT DIGIT TO .ASCII	/EAG:193

	SAD INNM.B		/ SKIP UNLESS LEADING ZERO.	/EAG:193

	JMP INNM.1		/ LEADING ZERO -- IGNORE IT.	/EAG:193

	DZM INNM.B		/ NOT A LEADING ZERO -- CLEAR	/EAG:193

				/ SWITCH SO FOLLOWING ZEROS	/EAG:193

				/ WON'T BE SUPPRESSED.		/EAG:193

	JMS IN.CHR		/ AND TYPE OUT THE DIGIT.	/EAG:193

INNM.1	CLL!CLA			/ FOR MUL			/EAG:193

	MUL-13000		/ RESULT=(MQ)*(10.)*0		/EAG:193

	  12			/ 10.				/EAG:193

	ISZ INNM.A		/ REACHED LAST DIGIT YET?	/EAG:193

	JMP INNM.0		/ NO -- GO CHECK FOR LEADING	/EAG:193

				/ ZEROS.			/EAG:193

	AAC 60			/ LAST DIGIT -- CONVERT TO	/EAG:193

	JMS IN.CHR		/ ASCII AND TYPE IT, REGARDLESS	/EAG:193

				/ OF WHETHER OR NOT IT'S ZERO.	/EAG:193

	LAC (60)		/ RESTORE ZERO SUPPRESS SWITCH	/EAG:193

	DAC INNM.B						/EAG:193

	JMP* IN.NUM						/EAG:193

								/EAG:193

								/EAG:193

INNM.A	0			/ DIGIT COUNTER			/EAG:193

								/EAG:193

INNM.B	60			/ ZERO SUPPRESS SWITCH		/EAG:193

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191

/ IN.OCT -- TYPE A NUMBER OUT IN OCTAL WITHOUT ZERO SUPPRESSION	/EAG:191

/ (I.E. LEADING ZEROS ARE OUTPUT).  THE NUMBER IS PASSED IN	/EAG:191

/ THE AC.							/EAG:191

/								/EAG:191

/ CALLING SEQUENCE:						/EAG:191

/								/EAG:191

/	JMS IN.OCT						/EAG:191

/								/EAG:191

/ THIS ROUTINE CLOBBERS THE AC AND THE LINK.			/EAG:191

/								/EAG:191

								/EAG:191

								/EAG:191

IN.OCT	0							/EAG:191

	LMQ			/ SAVE NUMBER TO OUTPUT		/EAG:191

	LAW -6			/ SET UP DIGIT COUNTER		/EAG:191

	DAC INOC.B						/EAG:191

INOC.0	CLA!CLL			/ GET NEXT DIGIT		/EAG:193

	LLS+3							/EAG:193

	AAC 60			/ CONVERT TO ASCII		/EAG:191

	JMS IN.CHR		/ AND OUTPUT IT			/EAG:191

	ISZ INOC.B		/ DONE YET?			/EAG:191

	JMP INOC.0		/ NO				/EAG:191

	JMP* IN.OCT		/ YES -- RETURN TO CALLER	/EAG:191

								/EAG:191

								/EAG:191

INOC.B	0			/ DIGIT COUNTER			/EAG:192

	.TITLE     IN.GNU,IN.GNA,IN.GNX -- SGNBLK SEARCH RTN.'S

								/EAG:192

								/EAG:192

								/EAG:192

								/EAG:192

/								/EAG:192

/ THE FOLLOWING ROUTINES ARE FOR CONVERTING BETWEEN HANDLER	/EAG:192

/ NUMBERS AND HANDLER NAMES.  HANDLER NAMES ARE STANDARD	/EAG:192

/ .SIXBT NAMES.  HANDLER NUMBERS ARE NUMERIC INDICES INTO	/EAG:192

/ THE DEVICE HANDLER TABLE IN SGNBLK.  THE FIRST TWO		/EAG:192

/ DEVICE HANDLERS IN THIS TABLE ARE ALWAYS "NON" AND "TTA"	/EAG:192

/ RESPECTIVELY.  DEVICE HANDLER NUMBER ZERO IS "NON" AND	/EAG:192

/ NUMBER ONE IS "TTA".						/EAG:192

/								/EAG:192

								/EAG:192

								/EAG:192

								/EAG:192

								/EAG:192

/								/EAG:192

/ ROUTINE TO FIND A HANDLER NUMBER GIVEN A HANDLER NAME.	/EAG:192

/ CALLING SEQUENCE:						/EAG:192

/								/EAG:192

/	JMS IN.GNU						/EAG:192

/	  NOT FOUND RETURN					/EAG:192

/	FOUND RETURN						/EAG:192

/								/EAG:192

/ EXPECTS THE HANDLER NAME (IN .SIXBT) IN THE AC.  SEARCHES	/EAG:192

/ THE SGNBLK DEVICE HANDLER TABLE FOR THE NAMED HANDLER.  IF	/EAG:192

/ THE NAMED HANDLER CANNOT BE FOUND THE NOT FOUND (NON-SKIP)	/EAG:192

/ RETURN IS TAKEN.  IF THE NAMED HANDLER IS FOUND THE FOUND	/EAG:192

/ (SKIP) RETURN IS TAKEN AND THE HANDLER NUMBER IS RETURNED	/EAG:192

/ IN THE AC.							/EAG:192

/								/EAG:192

/ CLOBBERS THE XR AND LR AND LINK.				/EAG:192

/								/EAG:192

								/EAG:192

								/EAG:192

IN.GNU	0							/EAG:192

	DAC INGU.A		/ REMEMBER HANDLER NAME		/EAG:192

	DZM INGU.B		/ ZERO HANDLER NUMBER		/EAG:192

	CLA			/ AND SET UP IN.GNX TO		/EAG:192

	JMS IN.GNA		/ START AT HANDLER #1 (TTA.)	/EAG:192

	  JMP* IN.GNU		/ NOT FOUND -- RETURN		/EAG:192

INGU.0	SAD INGU.A		/ FOUND HANDLER YET?		/EAG:192

	JMP INGU.1		/ YES -- GO RETURN		/EAG:192

	ISZ INGU.B		/ NO -- BUMP HANDLER NUMBER	/EAG:192

	JMS IN.GNX		/ AND GET NEXT HANDLER		/EAG:192

	  JMP* IN.GNU		/ NOT FOUND -- RETURN		/EAG:192

	JMP INGU.0		/ GO CHECK OUT THIS ONE		/EAG:192

								/EAG:192

								/EAG:192

INGU.1	LAC INGU.B		/ PICK UP HANDLER NUMBER	/EAG:192

	ISZ IN.GNU		/ BUMP RETURN ADDRESS		/EAG:192

	JMP* IN.GNU		/ AND RETURN			/EAG:192

								/EAG:192

								/EAG:192

INGU.A	0			/ TEMPORARY IN WHICH TO		/EAG:192

				/ SAVE HANDLER NAME		/EAG:192

								/EAG:192

INGU.B	0			/ TEMPORARY IN WHICH TO		/EAG:192

				/ ACCUMULATE HANDLER #		/EAG:192

								/EAG:192

								/EAG:192

								/EAG:192

								/EAG:192

/								/EAG:192

/ ROUTINE TO FIND A HANDLER NAME GIVEN A HANDLER NUMBER.	/EAG:192

/ CALLING SEQUENCE:						/EAG:192

/								/EAG:192

/	JMS IN.GNA						/EAG:192

/	  NOT FOUND RETURN					/EAG:192

/	FOUND RETURN						/EAG:192

/								/EAG:192

/ THE HANDLER NUMBER IS EXPECTED IN THE AC.  IF SAID		/EAG:192

/ HANDLER NUMBER EXISTS ITS NAME (IN .SIXBT) IS RETURNED	/EAG:192

/ IN THE AC AND THE FOUND (SKIP) RETURN IS TAKEN.  IF		/EAG:192

/ SAID HANDLER DOES NOT EXIST (I.E., THE HANDLER NUMBER IS	/EAG:192

/ LARGER THAN THE NUMBER OF HANDLERS IN SGNBLK) THE NOT		/EAG:192

/ FOUND (NON-SKIP) RETURN IS TAKEN.				/EAG:192

/								/EAG:192

/ CLOBBERS THE XR AND LR AND LINK.				/EAG:192

/								/EAG:192

								/EAG:192

								/EAG:192

IN.GNA	0							/EAG:192

	AND (77777)		/ MASK OFF ANY UNIT NUMBER	/EAG:200

	CMA			/ TRANSFORM HANDLER #		/EAG:192

	DAC INGA.A		/ INTO LOOP COUNT		/EAG:192

	LAC SG.NMP		/ SET UP XR TO START OF		/EAG:192

	TAD SG.NMD		/ DEVICE HANDLER TABLE -1	/EAG:192

	TAD SG.NMS						/EAG:192

	PAX							/EAG:192

	LAC SG.FRE		/ AND LR TO ITS END		/EAG:192

	PAL							/EAG:192

INGA.0	JMS IN.GNX		/ GET FIRST HANDLER NAME	/EAG:192

	  JMP* IN.GNA		/ REACHED END OF TABLE		/EAG:192

				/ => NOT FOUND RETURN		/EAG:192

	ISZ INGA.A		/ REACHED RIGHT HANDLER?	/EAG:192

	JMP INGA.0		/ NO -- LOOP SOME MORE		/EAG:192

	ISZ IN.GNA		/ YES -- BUMP RETURN ADDRESS	/EAG:192

	JMP* IN.GNA		/ AND RETURN WITH HANDLER	/EAG:192

				/ NAME STILL IN AC		/EAG:192

								/EAG:192

								/EAG:192

INGA.A	0			/ TEMPORARY USED FOR LOOP	/EAG:192

				/ COUNTER			/EAG:192

								/EAG:192

								/EAG:192

								/EAG:192

								/EAG:192

/								/EAG:192

/ ROUTINE TO GET THE NEXT HANDLER NAME.  THIS ROUTINE IS	/EAG:192

/ PRIMARILY A SUBROUTINE USED BY IN.GNA, BUT IT ALSO		/EAG:192

/ MAY BE CALLED INDEPENDENTLY TO SEARCH THROUGH THE		/EAG:192

/ ENTIRE DEVICE HANDLER TABLE.  CALLING SEQUENCE:		/EAG:192

/								/EAG:192

/	JMS IN.GNX						/EAG:192

/	  END OF TABLE REACHED RETURN				/EAG:192

/	NORMAL RETURN						/EAG:192

/								/EAG:192

/ THE XR AND LR MUST BE PRESERVED FROM THE PREVIOUS CALL	/EAG:192

/ TO IN.GNA OR IN.GNX (THIS ROUTINE).  IN.GNA MUST BE		/EAG:192

/ CALLED BEFORE CALLING THIS ROUTINE SO AS TO SET UP		/EAG:192

/ THE XR AND LR.  TO LOOP THROUGH ALL THE DEVICE HANDLERS	/EAG:192

/ (EXCEPTING "NON") IN THE DEVICE HANDLER TABLE PROCEED		/EAG:192

/ AS FOLLOWS:							/EAG:192

/								/EAG:192

/		CLA						/EAG:192

/		JMS IN.GNA					/EAG:192

/		  SGNBLK FORMAT ERROR				/EAG:192

/	LOOP	JMS IN.GNX					/EAG:192

/		  JMP DONE					/EAG:192

/		<PROCESS DEVICE HANDLER NAME IN AC>		/EAG:192

/		JMP LOOP					/EAG:192

/								/EAG:192

/ NOTE THAT THIS ROUTINE RETURNS THE HANDLER NAME IN THE AC.	/EAG:192

/								/EAG:192

/ CLOBBERS THE LINK, UPDATES THE XR AND LR.			/EAG:192

/								/EAG:192

								/EAG:192

								/EAG:192

IN.GNX	0							/EAG:192

INGX.0	LAW 777700		/ ARE WE AT END OF HANDLERS	/EAG:192

	AND SG.BAS+1,X		/ FOR THIS DEVICE?		/EAG:192

	SNA			/ SKIP IF NOT			/EAG:192

	JMP INGX.1		/ YES -- GO BUMP XR PAST	/EAG:192

				/ SKIPS FOR THIS DEVICE		/EAG:192

	LAC SG.BAS+1,X		/ PICK UP HANDLER NAME (OR	/EAG:192

				/ WORD FOLLOWING HANDLER	/EAG:192

				/ TABLE)			/EAG:192

	AXS 1			/ BUMP XR AND CHECK FOR		/EAG:192

				/ END OF HANDLER TABLE		/EAG:192

	ISZ IN.GNX		/ NOT END OF TABLE --		/EAG:192

				/ TAKE NORMAL RETURN		/EAG:192

	JMP* IN.GNX						/EAG:192

								/EAG:192

								/EAG:192

/ COME HERE IF WE'VE RUN OUT OF HANDLERS FOR THIS DEVICE	/EAG:192

/ WE BUMP THE XR PAST THE SKIPS FOR THIS DEVICE AND THEN GO	/EAG:192

/ TRY AGAIN.							/EAG:192

								/EAG:192

INGX.1	PXA							/EAG:192

	TAD SG.BAS+1,X						/EAG:192

	TAD SG.BAS+1,X						/EAG:192

	TAD SG.BAS+1,X						/EAG:192

	PAX							/EAG:192

	AXS 1			/ CHECK IF HAVE REACHED END	/EAG:192

	JMP INGX.0		/ NO -- GO TRY AGAIN		/EAG:192

	JMP* IN.GNX		/ YES -- TAKE THAT RETURN	/EAG:192

	.TITLE     IN.SSB -- ROUTINE TO SEARCH SYSBLK

								/EAG:197

								/EAG:197

								/EAG:197

								/EAG:197

/								/EAG:197

/ THIS ROUTINE SEARCHES SYSBLK FOR A SPECIFIED ENTRY.		/EAG:197

/ WHEN THIS ROUTINE IS CALLED THE AC SHOULD CONTAIN A		/EAG:197

/ POINTER TO TWO WORDS CONTAINING THE ENTRY'S NAME IN		/EAG:197

/ .SIXBT.  AT EXIT THE XR CONTAINS A POINTER, RELATIVE		/EAG:197

/ TO SB.BAS, TO THE APPROPRIATE SYSBLK ENTRY.			/EAG:197

/								/EAG:197

/ CALLING SEQUENCE:						/EAG:197

/								/EAG:197

/		LAC (NAMBLK)					/EAG:197

/		JMS IN.SSB					/EAG:197

/		  <NOT FOUND RETURN>				/EAG:197

/		<FOUND RETURN>					/EAG:197

/		  .						/EAG:197

/		  .						/EAG:197

/		  .						/EAG:197

/	NAMBLK	.SIXBT "NAME"					/EAG:197

/								/EAG:197

/ THE SYSBLK ENTRY SHOULD BE ACCESSED BY INSTRUCTIONS OF	/EAG:197

/ THE FORM:							/EAG:197

/								/EAG:197

/	LAC SB.BAS+SB.FA,X	/ GET FIRST CORE ADDRESS	/EAG:197

/	LAC SB.BAS+SB.NB,X	/ GET NUMBER OF DISK BLOCKS	/EAG:197

/	  ETC.							/EAG:197

/								/EAG:197

/ FOR DETAILS OF THE FORMAT OF SYSBLK AND ITS ENTRIES SEE	/EAG:197

/ THE COMMENTS AT THE BEGINNING OF THE MONITOR, WHERE THE	/EAG:197

/ SYMBOLS SB.** ARE DEFINED.					/EAG:197

/								/EAG:197

/ CLOBBERS THE XR, LR, AC, AND LINK.				/EAG:197

/								/EAG:197

								/EAG:197

IN.SSB	0							/EAG:197

	DAC INSS.A		/ SAVE POINTERS TO THE TWO	/EAG:197

	IAC			/ NAME WORDS			/EAG:197

	DAC INSS.B						/EAG:197

	LAC SB.FRE		/ POINT LR TO END OF		/EAG:197

	PAL			/ SYSBLK ENTRIES.		/EAG:197

	CLX			/ AND XR TO FIRST ENTRY		/EAG:197

	AXR SB.BEG-SB.BAS					/EAG:197

INSS.0	LAC SB.BAS+SB.NM1,X	/ GET FIRST NAME WORD		/EAG:197

	SAD* INSS.A		/ IS IT WHAT WE'RE LOOKING FOR	/EAG:197

	SKP			/ MAYBE				/EAG:197

	JMP INSS.1		/ NO -- TRY NEXT ENTRY		/EAG:197

	LAC SB.BAS+SB.NM2,X	/ GET SECOND NAME WORD		/EAG:197

	SAD* INSS.B		/ IS IT A MATCH?		/EAG:197

	JMP INSS.2		/ YES -- GO TAKE FOUND RETURN	/EAG:197

INSS.1	AXS SB.LEN		/ TRY NEXT ENTRY		/EAG:197

	JMP INSS.0						/EAG:197

	JMP* IN.SSB		/ REACHED END OF SYSBLK --	/EAG:197

				/  TAKE NOT FOUND EXIT.		/EAG:197

								/EAG:197

								/EAG:197

/ COME HERE WHEN FIND ENTRY WE WANT.				/EAG:197

								/EAG:197

INSS.2	ISZ IN.SSB		/ BUMP TO FOUND EXIT		/EAG:197

	JMP* IN.SSB		/ AND TAKE IT			/EAG:197

								/EAG:197

								/EAG:197

								/EAG:197

INSS.A	-1			/ POINTERS TO TWO WORDS		/EAG:197

INSS.B	-1			/ CONTAINING NAME WE'RE		/EAG:197

				/ LOOKING FOR			/EAG:197

	.TITLE     IN.MOV -- SUBROUTINE TO ADD CODE TO MONITOR

								/EAG:193

								/EAG:193

								/EAG:193

								/EAG:193

/								/EAG:193

/ THIS SUBROUTINE IS USED TO APPEND A PIECE OF CODE (SUCH	/EAG:193

/ AS THE CTRL-X PROCESSOR, BATCH PROCESSOR, ETC.) TO THE	/EAG:193

/ RESIDENT MONITOR, RELOCATING THE CODE AS APPROPRIATE.		/EAG:193

/								/EAG:193

/ THE BLOCK OF CODE TO BE ADDED MUST BE DIVIDED INTO TWO	/EAG:193

/ SECTIONS -- A RELOCATABLE SECTION AND AN ABSOLUTE SECTION.	/EAG:193

/ THE RELOCATABLE SECTION MUST PRECEDE THE ABSOLUTE SECTION	/EAG:193

/ WITH NO GAP SEPERATING THEM.  EITHER SECTION MAY BE EMPTY.	/EAG:193

/ THE RELOCATABLE SECTION MUST CONTAIN INSTRUCTIONS		/EAG:193

/ EXCLUSIVELY.  THE OPCODE FIELD OF EACH WORD IN THE		/EAG:193

/ RELOCATABLE SECTION IS EXAMINED TO DETERMINE IF THE WORD'S	/EAG:193

/ ADDRESS FIELD SHOULD BE RELOCATED.  THE ABSOLUTE		/EAG:193

/ SECTION IS COPIED WITHOUT ANY RELOCATION.  NOTE THAT		/EAG:193

/ NO PROVISION IS MADE IN EITHER SECTION FOR RELOCATING		/EAG:193

/ TRANSFER VECTORS.						/EAG:193

/								/EAG:193

/ IN ADDITION TO CHECKING OPCODES OF INSTRUCTIONS WITHIN	/EAG:193

/ THE RELOCATABLE SECTION THIS ROUTINE ALSO CHECKS THE		/EAG:193

/ OPERAND ADDRESS OF MEMORY REFERENCE INSTRUCTIONS WHEN		/EAG:193

/ DETERMINING WHETHER OR NOT TO RELOCATE A WORD.  THE		/EAG:193

/ WORD WILL ONLY BE RELOCATED IF ITS OPERAND ADDRESS FALLS	/EAG:193

/ WITHIN THE BLOCK OF CODE BEING ADDED TO THE MONITOR.  IF	/EAG:193

/ THE ADDRESS IS OUTSIDE THIS RANGE IT WILL NOT BE		/EAG:193

/ ALTERATION.  THIS IS USEFUL WHEN MAKING DIRECT REFERENCES	/EAG:193

/ TO .SCOM OR OTHER PARTS OF THE MONITOR.  IN ORDER TO		/EAG:193

/ USE THIS FEATURE THE BLOCK OF CODE MUST BE ASSEMBLED		/EAG:193

/ WITHIN PAGE ZERO.						/EAG:193

/								/EAG:193

/ THE BLOCK OF CODE WILL BE ADDED IMMEDIATELY ABOVE THE		/EAG:193

/ MONITOR AS DETERMINED BY SC.RMS.  SC.RMS WILL BE		/EAG:193

/ UPDATED BY THE SIZE OF THE BLOCK OF CODE, UNLESS THE		/EAG:193

/ ATTEMPT TO ADD THE BLOCK OF CODE FAILS.			/EAG:193

/								/EAG:193

/ THIS ROUTINE PERFORMS SEVERAL CHECKS AS IT ADDS THE CODE	/EAG:193

/ TO THE MONITOR.  THE PURPOSE OF THESE CHECKS IS TO ENSURE	/EAG:193

/ THAT NO PAGE BOUNDARY VIOLATIONS WILL OCCUR WHEN THE		/EAG:193

/ CODE IS EXECUTED.  THE CHECKS ARE AS FOLLOWS.  THE		/EAG:193

/ RELOCATABLE SECTION (WHEN IN POSITION) MUST NOT CROSS		/EAG:193

/ A PAGE BOUNDARY AND MUST BE ENTIRELY WITHIN PAGE ZERO.	/EAG:193

/ THE OPERAND ADDRESSES OF ALL MEMORY				/EAG:193

/ REFERENCE INSTRUCTIONS IN THE RELOCATABLE SECTION MUST	/EAG:193

/ NOT CROSS A PAGE BOUNDARY.  NOTE THAT THE ABSOLUTE SECTION	/EAG:193

/ MAY CROSS A PAGE BOUNDARY SO LONG AS NO INSTRUCTION IN THE	/EAG:193

/ RELOCATABLE SECTION ADDRESSES A LOCATION ABOVE THE		/EAG:193

/ BOUNDARY.  IF EITHER OF THESE CHECKS FAIL THE CODE WILL	/EAG:193

/ NOT BE ADDED TO THE MONITOR, SC.RMS WILL NOT BE ALTERED,	/EAG:193

/ AND THE LINK WILL BE SET ON RETURN.				/EAG:193

/								/EAG:193

/ CALLING SEQUENCE:						/EAG:193

/								/EAG:193

/	JMS IN.MOVE						/EAG:193

/	  XXREL			/ FIRST ADDRESS OF CODE BLOCK	/EAG:193

/				/ ALSO START OF RELOC. SECTION	/EAG:193

/	  XXABS			/ START OF ABSOLUTE SECTION	/EAG:193

/				/ (WHICH FOLLOWS RELOC. SEC.)	/EAG:193

/	  XXEND			/ ADDRESS FOLLOWING END OF	/EAG:193

/				/ CODE BLOCK			/EAG:193

/								/EAG:193

/ UPON RETURN THE LINK WILL INDICATE WHETHER OR NOT THE ATTEMPT	/EAG:193

/ WAS SUCCESSFUL -- I.E. WHETHER OR NOT A PAGE BOUNDARY		/EAG:193

/ VIOLATION WAS ENCOUNTERED.  THE LINK IS CLEAR IS IT WAS	/EAG:193

/ SUCCESSFUL, SET IF IT FAILED.  IF THE LINK IS CLEAR SC.RMS	/EAG:193

/ WILL HAVE BEEN UPDATED BY THE LENGTH OF THE CODE BLOCK	/EAG:193

/ (XXEND-XXREL).  IF THE LINK IS SET SC.RMS WILL BE		/EAG:193

/ UNCHANGED.							/EAG:193

/								/EAG:193

								/EAG:193

								/EAG:193

IN.MOV	0							/EAG:193

	LAC* (SC.RMS)		/ PICK UP DEST. ADDRESS AND	/EAG:193

	DAC INMV.A		/ PUT IT WHERE WE CAN USE IT	/EAG:193

	LAC* IN.MOV		/ CALCULATE ADDRESS WHERE CODE	/EAG:193

	XOR IN.BNK		/ IS NOW AND PUT IT WHERE WE	/EAG:193

	DAC INMV.B		/ CAN USE IT.			/EAG:193

	LAC* IN.MOV		/ SET UP A CONSTANT FOR		/EAG:193

	TCA			/ ADDRESS BOUNDS CHECKING	/EAG:193

	DAC INMV.C						/EAG:193

	ISZ IN.MOV		/ BUMP TO ABS. SECTION ADDR.	/EAG:193

	TAD* IN.MOV		/ GET LENGTH OF RELOC. SECT.	/EAG:193

	ISZ IN.MOV		/ BUMP TO END ADDRESS		/EAG:193

	SNA			/ DOES RELOCATABLE SECT.	/EAG:193

	JMP INMV.5		/ HAVE NON-ZERO LENGTH?		/EAG:193

				/ IF NOT, IGNORE IT		/EAG:193

	PAL			/ LENGTH OF RELOC. SECT. TO LR	/EAG:193

	TAD INMV.A		/ VERIFY THAT RELOC. SECT.	/EAG:193

	AND (770000)		/ WILL FIT WITHIN PAGE ZERO.	/EAG:193

	SZA							/EAG:193

	JMP INMV.7		/ IT WON'T -- FAIL		/EAG:193

	LAC INMV.B		/ GET LOW 12 BITS OF WHERE	/EAG:193

	AND (7777)		/ CODE IS NOW,			/EAG:193

	TCA			/ AND CALCULATE RELOCATION	/EAG:193

	TAD INMV.A		/ FACTOR.			/EAG:193

	DAC INMV.D		/ SAVE IT IN INMV.D.		/EAG:193

	CLX			/ START AT THE BEGINNING.	/EAG:193

INMV.0	LAC* INMV.B,X		/ FETCH NEXT WORD OF REL. SECT.	/EAG:193

	AND (740000)		/ MASK OUT OPCODE.		/EAG:193

	SAD (CAL)		/ CHECK TO SEE IF ITS NOT A	/EAG:193

	JMP INMV.3		/ MEMORY REFERENCE INSTRUCTION.	/EAG:193

	SAD (EAE)		/ IF SO, GO TO INMV.3 TO HANDLE	/EAG:193

	JMP INMV.3		/ NON-RELOCATED WORD.		/EAG:193

	SAD (IOT)						/EAG:193

	JMP INMV.3						/EAG:193

	SAD (OPR)						/EAG:193

	JMP INMV.3						/EAG:193

	PXA			/ DETERMINE ADDRESS WHERE THE	/EAG:193

	TAD INMV.B		/ INSTRUCTION IS NOW,		/EAG:193

	XOR IN.BNK		/ WITHOUT BANK BITS.		/EAG:193

	XOR* INMV.B,X		/ CALCULATE OPERAND ADDRESS.	/EAG:193

	AND (770000)						/EAG:193

	XOR* INMV.B,X						/EAG:193

	TAD INMV.C		/ AND CHECK IF IT IS WITHIN	/EAG:193

	SPA!TCA			/ THE CODE BLOCK.		/EAG:193

	JMP INMV.1		/ JMP IF IT ISN'T.		/EAG:193

	TAD INMV.C						/EAG:193

	TAD* IN.MOV						/EAG:193

	SMA!SZA!TCA		/ SKIP IF IT ISN'T.		/EAG:193

	JMP INMV.4		/ JMP IF IT IS.			/EAG:193

	TAD* IN.MOV		/ RESTORE OPERAND ADDRESS.	/EAG:193

	JMP INMV.2						/EAG:193

								/EAG:193

INMV.1	TAD INMV.C		/ RESTORE OPERAND ADDRESS.	/EAG:193

	TCA							/EAG:193

/ COME HERE WITH OPERAND ADDRESS IN AC IF OPERAND ADDRESS	/EAG:193

/ IS NOT WITHIN CODE BLOCK.					/EAG:193

INMV.2	XOR INMV.A		/ VERIFY THAT OPERAND ADDRESS	/EAG:193

	AND (770000)		/ (WHICH WILL NOT BE RELOCATED)	/EAG:193

	SZA			/ WILL BE IN SAME PAGE AS CODE.	/EAG:193

	JMP INMV.7		/ NO -- FAIL.			/EAG:193

INMV.3	CLA!SKP			/ COME HERE FOR NON-RELOCATED	/EAG:193

				/ INSTRUCTIONS.			/EAG:193

INMV.4	LAC INMV.D		/ COME HERE FOR RELOCATED	/EAG:193

				/ INSTRUCTIONS.			/EAG:193

	TAD* INMV.B,X		/ CALCULATE RELOCATED INSTR.	/EAG:193

	DAC* INMV.A,X		/ AND PUT IT WHERE ITS GOING.	/EAG:193

	XOR* INMV.B,X		/ VERIFY PAGE VIOLATION DIDN'T	/EAG:193

	AND (770000)		/ OCCUR.			/EAG:193

	SZA			/ SKIP IF OK.			/EAG:193

	JMP INMV.7		/ IT DID -- FAIL.		/EAG:193

	AXS 1			/ BUMP TO NEXT WORD		/EAG:193

	JMP INMV.0						/EAG:193

INMV.5	LAC* IN.MOV		/ CALCULATE TOTAL LENGTH OF	/EAG:193

	TAD INMV.C		/ CODE BLOCK.			/EAG:193

	PAL			/ AND PUT IN LR.		/EAG:193

INMV.6	LAC* INMV.B,X		/ COPY ABSOLUTE SECTION INTO	/EAG:193

	DAC* INMV.A,X		/ PLACE.			/EAG:193

	AXS 1							/EAG:193

	JMP INMV.6						/EAG:193

	PLA			/ GET LENGTH OF CODE BLOCK,	/EAG:193

	TAD INMV.A		/ GET END ADDR. OF CODE BLOCK,	/EAG:193

	DAC* (SC.RMS)		/ AND UPDATE SC.RMS.		/EAG:193

	CLL			/ ZERO LINK INDICATES SUCCESS	/EAG:193

	ISZ IN.MOV		/ BUMP TO RETURN ADDRESS	/EAG:193

	JMP* IN.MOV		/ AND RETURN.			/EAG:193

								/EAG:193

								/EAG:193

/ COME HERE IF PAGE BOUNDARY VIOLATION CAUSES FAILURE.		/EAG:193

								/EAG:193

INMV.7	STL			/ SET LINK INDICATES FAILURE.	/EAG:193

	ISZ IN.MOV		/ BUMP TO RETURN ADDRESS	/EAG:193

	JMP* IN.MOV		/ AND RETURN			/EAG:193

								/EAG:193

								/EAG:193

								/EAG:193

INMV.A	0			/ POINTER TO WHERE CODE BLOCK	/EAG:193

				/ IS GOING.			/EAG:193

								/EAG:193

INMV.B	0			/ POINTER TO WHERE CODE BLOCK	/EAG:193

				/ IS COMING FROM.		/EAG:193

								/EAG:193

INMV.C	0			/ TWO'S COMPLEMENT OF START	/EAG:193

				/ ADDRESS OF CODE BLOCK (AND	/EAG:193

				/ RELOCATABLE SECTION)		/EAG:193

								/EAG:193

INMV.D	0			/ RELOCATION FACTOR.		/EAG:193

	.TITLE     GLOBAL VARIABLES USED BY INIT. CODE

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191

/ DEFINE THE VARIOUS GLOBAL VARIABLES USED WITHIN THE		/EAG:191

/ MONITOR INITIALIZATION CODE.  ANY LOCATION WHICH IS NOT	/EAG:191

/ STRICTLY A LOCAL TEMPORARY IS A GLOBAL VARIABLE.  FOR		/EAG:191

/ EACH VARIABLE WE INCLUDE WHICH ROUTINE SETS IT UP.		/EAG:191

/								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191

/ THE FOLLOWING LOCATIONS ARE SET UP AT THE VERY BEGINNING	/EAG:191

/ OF THE INITIALIZATION PROCESS -- I.E. BY INIT ITSELF.		/EAG:191

/ THESE LOCATIONS ARE USED TO SAVE VARIOUS BITS OF INFORMATION	/EAG:191

/ FROM THE OLD BANK ZERO FOR USE LATER IN THE INITIALIZATION	/EAG:191

/ PROCESS.  THESE MUST BE REMEMBERED HERE BECAUSE BANK ZERO	/EAG:191

/ IS ZEROED AT THE BEGINNING OF INITIALIZATION.			/EAG:191

/ IT SHOULD BE NOTED THAT AT THE SAME TIME THESE LOCATIONS ARE	/EAG:191

/ SET UP AN IMAGE OF .SCOM IS ALSO SAVED FROM BANK ZERO TO	/EAG:191

/ THIS BANK.  THIS IMAGE OF .SCOM IS CONCEPTUALLY INCLUDED	/EAG:191

/ WITH THE FOLLOWING LOCATIONS.  WE DO NOT ALLOCATE SPACE FOR	/EAG:191

/ IT BECAUSE THE IMAGE IS STORED AT THE "SAME" POSITION IN	/EAG:191

/ THIS BANK AS .SCOM NORMALLY OCCUPIES IN BANK ZERO.		/EAG:191

/								/EAG:191

								/EAG:191

								/EAG:191

IN.BNK	0			/ ADDRESS OF HIGHEST BANK OF	/EAG:191

				/ MEMORY -- I.E. THE BANK IN	/EAG:191

				/ WHICH THE BOOTSTRAP IS	/EAG:191

				/ LOCATED.  ALSO KNOWN AS "BANK	/EAG:191

				/ BITS".  THIS ADDRESS		/EAG:191

				/ CALCULATED BY MASKING THE OLD	/EAG:191

				/ SC.COD WITH 60000.		/EAG:191

								/EAG:191

								/EAG:191

IN.RMS	0			/ LOCATION IN WHICH TO SAVE	/EAG:191

				/ SIZE OF RESIDENT MONITOR	/EAG:191

				/ PROPER.  COPIED FROM LOCATION	/EAG:191

				/ SC.RMS IN DISK IMAGE OF	/EAG:191

				/ RESIDENT MONITOR		/EAG:191

								/EAG:191

								/EAG:191

IN.SVD	.BLOCK 400		/ AREA IN WHICH TO SAVE OLD	/EAG:191

				/ .DAT AND .UFDT TABLES.  256	/EAG:191

				/ DECIMAL WORDS ARE ENOUGH	/EAG:191

				/ BECAUSE IMAGE OF .DAT AND	/EAG:191

				/ .UFDT IS INCLUDED IN SGNBLK,	/EAG:191

				/ WHICH IS 256 WORDS LONG.	/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

								/EAG:191

/								/EAG:191

/ THE FOLLOWING LOCATIONS ARE SET UP BY IN.HWA TO REFLECT THE	/EAG:191

/ HARDWARE CONFIGURATION UPON WHICH WE ARE RUNNING.  WITH THE	/EAG:191

/ EXCEPTION OF IN.AMS THEY ARE ALL "SKIP SWITCHES".  EACH	/EAG:191

/ SWITCH CORRESPONDS TO A PARTICULAR PIECE OF HARDWARE.  THE	/EAG:191

/ SWITCH LOCATION CONTAINS A SKP IF THE HARDWARE IS PRESENT	/EAG:191

/ IN THE CONFIGURATION, A NOP IF THE HARDWARE IS NOT PRESENT.	/EAG:191

/ THUS AN EXECUTE OF THE SWITCH (XCT IN.S**) BECOMES A "SKIP	/EAG:191

/ IF HARDWARE PRESENT" INSTRUCTION.				/EAG:191

/								/EAG:191

								/EAG:191

								/EAG:191

IN.AMS	0			/ ACTUAL (PHYSICAL) MEMORY SIZE	/EAG:191

				/ OF THE CONFIGURATION ON WHICH	/EAG:191

				/ WE ARE RUNNING.  THE VALUE	/EAG:191

				/ STORED IS THE ADDRESS OF THE	/EAG:191

				/ LAST LOCATION OF MEMORY (I.E.	/EAG:191

				/ 177777 FOR A 64K SYSTEM).	/EAG:191

				/ THIS IS THE SAME FORMAT AS	/EAG:191

				/ .SCOM LOCATION SC.AMS, WHICH	/EAG:191

				/ IS SET UP BY COPYING THIS	/EAG:191

				/ LOCATION INTO IT.		/EAG:191

								/EAG:191

								/EAG:191

IN.SAPI	HLT			/ SKIP IF API PRESENT		/EAG:191

				/ INSTRUCTION.  CONTAINS SKP IF	/EAG:191

				/ API PRESENT, NOP OTHERWISE.	/EAG:191

								/EAG:191

								/EAG:191

IN.SUC	HLT			/ SKIP IF UNICHANNEL PRESENT	/EAG:191

				/ INSTRUCTION.  CONTAINS SKP	/EAG:191

				/ IF UC15 PRESENT, NOP		/EAG:191

				/ OTHERWISE.			/EAG:191

								/EAG:191

								/EAG:191

IN.SXM	HLT			/ SKIP IF XVM MACHINE		/EAG:191

				/ INSTRUCTION.  CONTAINS SKP IF	/EAG:191

				/ RUNNING ON XVM, NOP IF ON	/EAG:191

				/ ORDINARY PDP-15.  NOTE THAT A	/EAG:191

				/ PDP-15 WITH THE XM15 OPTION	/EAG:191

				/ COUNTS AS AN XVM.		/EAG:191

								/EAG:191

								/EAG:191

IN.SVT	HLT			/ SKIP IF VT15 PRESENT		/EAG:191

				/ INSTRUCTION.  CONTAINS SKP	/EAG:191

				/ IF VT15 PRESENT, NOP		/EAG:191

				/ OTHERWISE.			/EAG:191

								/EAG:191

								/EAG:191

IN.SCLK	HLT			/ SKIP IF KW15 PRESENT		/EAG:191

				/ INSTRUCTION.  CONTAINS SKP	/EAG:191

				/ IF KW15 REAL TIME CLOCK IS	/EAG:191

				/ PRESENT, NOP OTHERWISE.	/EAG:191

								/EAG:193

								/EAG:193

								/EAG:193

								/EAG:193

/								/EAG:193

/ FOLLOWING LOCATION IS A FLAG USED TO RECORD THE OCCURANCE	/EAG:193

/ OF A NON-FATAL MEMORY OVERFLOW.  THIS IS THE CASE WHEN THERE	/EAG:193

/ IS INSUFFICIENT ROOM TO LOAD THE VT15 (CTRL-X) HANDLER,	/EAG:193

/ THE MONITOR PATCH AREA, BATCH, OR THE LIKE.  NORMALLY WE	/EAG:193

/ RECOVER FROM SUCH PROBLEMS BY MERELY NOT LOADING THE		/EAG:193

/ OFFENDING MODULE.  HOWEVER, IF BOSS IS ACTIVE WE MUST		/EAG:193

/ ISSUE THE APPROPRIATE .SYSLD ERROR AND ABORT THE JOB.		/EAG:193

/ THIS CAN'T BE DONE UNTIL WE HAVE COMPLETELY SET UP THE	/EAG:193

/ MONITOR, HOWEVER.  THUS THIS SWITCH.				/EAG:193

/								/EAG:193

/ THE NORMAL STATE OF THIS SWITCH IS -1.  IF A MEMORY OVERFLOW	/EAG:193

/ OCCURS, THE SWITCH WILL BE CLEARED.  THE ROUTINE IN.LDR	/EAG:193

/ CHECKS THIS SWITCH AND DOES THE APPROPRIATE THING.  IN.LDR	/EAG:193

/ MAY OR MAY NOT CLOBBER THE SWITCH AS IT CHECKS IT -- THUS	/EAG:193

/ NO ONE ELSE SHOULD EVER CHECK IT.				/EAG:193

/								/EAG:193

								/EAG:193

								/EAG:193

IN.OVF	-1			/ MEMORY OVERFLOW FLAG		/EAG:193

								/EAG:196

								/EAG:196

								/EAG:196

								/EAG:196

/								/EAG:196

/ THE FOLLOWING LOCATION IS USED TO REMEMBER THE ADDRESS	/EAG:196

/ OF THE COMMAND INPUT DEVICE.  THE DEFAULT IS TTA.  IF		/EAG:196

/ NON-BOSS BATCH IS IN EFFECT IN.BAT POINTS THIS LOCATION	/EAG:196

/ TO THE BATCH HANDLER.  BOSS MAY PLAY WITH THIS TOO (ACTUALLY	/EAG:196

/ IN.BOS) BUT I DON'T KNOW ABOUT IT WHEN MAKING THESE COMMENTS.	/EAG:196

/								/EAG:196

								/EAG:196

IN.CMD	TTA.			/ COMMAND INPUT DEVICE HANDLER	/EAG:196

/								/RKB-198

/								/RKB-198

/								/RKB-198

/ THE FOLLOWING LOCATION IS USED TO REMEMBER THE ADDRESS	/RKB-198

/ OF THE CONSOLE PRINTER DEVICE HANDLER.  THE DEFAULT IS	/RKB-198

/ TTA.  IF BOSS IS BEING USED, IN.BOS SETS IN.CNSL TO POINT	/RKB-198

/ THE THE RESIDENT BOSS MESSAGE ROUTER (BS.DT3) WHICH		/RKB-198

/ SENDS ALL .DAT -3 OUTPUT TO .DAT 6 (LP) UNLESS SC.BTT OF	/RKB-198

/ SC.BOSS IS SET.						/RKB-198

/ THIS SCHEME COULD ALSO BE VERY USEFUL IN FUTURE SYSTEMS (FS)	/RKB-198

/								/RKB-198

/								/RKB-198

								/RKB-198

IN.CNSL	.DSA	TTA.		/ CONSOLE PRINTER HANDLER	/RKB-198

								/EAG:199

								/EAG:199

								/EAG:192

								/EAG:192

	.LTORG							/EAG:193

								/EAG:193

	.IFPNZ .-SB.BAS						/EAG:193

ERROR	RESIDENT MONITOR OVERLAPS SYSBLK			/EAG:193

ERROR	.LOC .-1						/EAG:193

	.ENDC							/EAG:193

								/EAG:193

	.END IN							/EAG:193
