
/ 

/

/ COPYRIGHT (C) 1976

/ DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

/

/ THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY

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

/ THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS

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

/ VIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON

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

/ THESE LICENSE TERMS.  TITLE TO AND OWNERSHIP OF THE

/ SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC.

/

/ THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE

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

/ MITMENT BY DIGITAL EQUIPMENT CORPORATION.

/

/ DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY

/ OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY

/ DEC.

/

	.TITLE EDIT LEGEND

/

/ EDIT #16	OCT 25 74	M. HEBENSTREIT

/		JUL 16 75	M. HEBENSRTEIT

/		NOV 6  75	M. HEBENSTREIT

/		DEC 31 75	M. HEBENSTREIT

/ 017	07-APR-76 (RCHM)	INSTALL CHANGES FOR FININS TO	/(017)

/				HANDLE EXECUTE WITH NO REQUEST	/(017)

/				BIT. THE NEW FLAG BIT WILL BE	/(017)

/				BIT 1 OF WORD 5 OF THE FININS	/(017)

/				NODE. IF BIT 1 OF THIS WORD IS	/(017)

/				SET THEN THE PARTITION NAME WILL/(017)

/				CONTAIN AN EVENT VARIABLE	/(017)

/				ADDRESS.			/(017)

/ EDIT #27	MAY-13-76 (SCR) INSTALL SAVE-REMOVE-INSTALL FIX
/ EDIT #28	MAY-14-76 (SCR) COMPRESS SPACE; FIX CTA REFERENCES
/ EDIT #29	MAY-17-76 (SCR) POINTER OFF BY INSSZ
/ 

/ 

/ THIS PROGRAM IS REQUESTED EACH TIME AN 'EXECUTE' DIRECTIVE IS

/ PROCESSED BY THE EXECUTIVE. FININS GRABS A NODE OFF THE EXECUTE

/ DEQUE AND ESSENTIALLY FINISHES THE JOB OF TASK INSTALLATION.

/ THEN FININS REQUESTS THE TASK NAMED IN THE NODE.

/ 

/ NOTE WELL: THE EXECUTE DIRECTIVE CAN'T WORK UNLESS FININS IS IN

/	THE SYSTEM AND CAN RUN!

/ 

	.TITLE MACRO DEFINITIONS				/(017)

								/(017)

	.DEFIN .RTL6	/ RAISE TO LEVEL 6.			/(017)

	LAC (400002)						/(017)

	ISA							/(017)

	.ENDM							/(017)

	.TITLE *** FININS ***

	.IFUND DEPRIO

	.DEC

DEPRIO=400

	.OCT

	.ENDC

X10=10

X11=11

R1=101

R2=102

STL=242

POOL=240

PBDL=250

EXELH=276

NADD=107

SNAM=123

PICK=120

DUFD1=306

LUFD1=304

SYSDSK=301

ECLA=641000

SHAL=660000							/(017)

IDX=ISZ

.INH=705522

.ENB=705521

								/(017)

/ EQUATES FOR STL NODE PROCESSING AND STL NODE FLAGS.		/(017)

								/(017)

S.DP=4			/ DEFAULT PRIORITY AND FLAGS WORD.	/(017)

S.EP=11			/ ENTRY POINT AND PAGE/BANK,USER/EXEC	/(017)

			/ FLAGS.				/(017)

								/(017)

/ BIT MASKS FOR EXTRACTING FLAGS FROM S.DP.			/(017)

								/(017)

S.EDP=1777		/ EXTRACT DEFAULT PRIORITY.		/(017)

S.EFIX=40000		/ EXTRACT FIXED IN CORE FLAG.		/(017)

S.EPLC=20000		/ EXTRACT LOST DUE TO RECONFIGURATION	/(017)

S.EROX=200000		/ EXTRACT REMOVE ON EXIT.		/(017)

/ 

	LAC	(START		/CALC. THE XR ADJUSTMENT

	AND	(070000

	TCA

	DAC	XRADJ

START	JMS	SETCTA		/(028)RE-ESTABLISH CTA POINTERS

	LAC	(EXELH		/PICK A NODE OFF THE EXECUTE 	/(017)

				/LIST.				/(017)

	DAC*	(R1

	JMS*	(PICK

	JMP	EXIT		/RETURN HERE IF LIST IS EMPTY -- AND EXIT

	DAC	NODADR		/SAVE THE ADDR OF THE NODE

	JMS	SETXR		/SET THE XR TO ACCESS THE NODE

	LAC 2,X		/ FETCH TASK NAME FROM EXECUTE NODE.	/(017)

	DAC TSKNM1	/ THIS NAME IS THE 6 BIT EQUIVALENT OF	/(017)

	DAC EXENM1	/ THE CREATED FILE NAME.		/(017)

	LAC 3,X		/ FETCH 2ND HALF OF NAME.		/(017)

	DAC TSKNM2	/ AND IT WILL BE THE DEFAULT NAME OF THE/(017)

	DAC EXENM2	/ TASK EXECUTED.			/(017)

								/(017)

	LAC 5,X		/ FETCH THE FLAG WORD FROM THE XQT NODE	/(017)

	SMA		/ IS THIS AN ALIAS EXECUTE?		/(017)

	JMP ST.10	/ NO					/(017)

	LAC 10,X	/ FETCH ALIAS NAME FROM XQT NODE AND	/(017)

	DAC EXENM1	/ UPDATE EXECUTION NAME OF THE TASK	/(017)

	LAC 11,X	/ TO BE MOVED.				/(017)

	DAC EXENM2						/(017)

	LAC 5,X		/ FETCH FLAG WORD FOR FURTHER PROCESSING/(017)

								/(017)

ST.10	AND (200000)	/ FETCH THE NO REQUEST BIT FROM FLAG.	/(017)

	SZA		/ ARE WE TO SUPPRESS THE REQUEST OF THIS/(017)

	LAC (1000)	/ TASK. AC >< 0 IF YES.			/(017)

	XOR (NOP)	/ CREATE NOP OR SKP APPROPRIATELY.	/(017)

	DAC NORQSW	/ SET UP NO REQUEST SWITCH.		/(017)

								/(017)

	LAC 5,X		/ FETCH FLAG WORD TO EXTRACT LUN NUMBER	/(017)

	AND (777)	/ EXTRACT LUN FIELD FROM WORD.		/(017)

	DAC LUN							/(017)

								/(017)

	DZM EVADR	/ ZERO EVENT VARIABLE ADDRESS.		/(017)

	LAC (S.EROX)	/ SET REMOVE ON EXIT BIT IN FLAGS WORD.	/(017)

	DAC FLAGS						/(017)

	XCT NORQSW	/ GENERATE A REQUEST?			/(017)

	JMP ST.20	/ NO.					/(017)

.X=S.EROX!S.EPLC						/(017)

	LAC (.X)	/ FETCH NEW CONTENTS OF FLAGS.		/(017)

	DAC FLAGS						/(017)

	LAC 6,X		/ FETCH THE EVENT VARIABLE ADDRESS.	/(017)

	DAC EVADR						/(017)

	DZM 6,X		/ AND CLEAR PARTITION NAME FOR REST OF	/(017)

	DZM 7,X		/ THE PROCESS.				/(017)

								/(017)

ST.20	LAC 6,X		/ FETCH THE PARTITION NAME.		/(017)

	DAC PARNM1	/ AND STORE IT IN FININS		/(017)

	LAC 7,X							/(017)

	DAC PARNM2						/(017)

								/(017)

	LAC (EXENM1)	/ SCAN THE STL FOR TASK ALREADY EXISTENT/(017)

	DAC* (R2)						/(017)

	LAC (STL)						/(017)

	DAC* (R1)						/(017)

	.RTL6		/ LOCK OUT SIGNIFICANT EVENTS DURING	/(017)

	JMS* (SNAM)	/ STL SCAN.				/(017)

	SKP		// TASK NOT FOUND.			/(017)

	JMP REQIT	// GO REQUEST TASK.			/(017)

	.TITLE SCAN MFD AND UFD FOR CREATED FILE.		/(017)

								/(017)

ST.30	DBK		//LOWER TO LEVEL 7.			/(017)

	LAC	LUN		/CHECK THAT THE LUN IS OK

	SAD	(1		/IF LUN=1 THAT'S ILLEGAL

	JMP	ERR1		/ON THIS ERROR GO LOOK FOR ANOTHER NODE

				/BUT 1ST RETURN THE NODE TO THE POOL

	CAL	HINF		/DO A HINF TO MAKE SURE THE DEVICE IS A

	CAL	WAIT		/DISK FILES HANDLER

	LAC	EV

	SPA			/WERE THERE ANY ERRORS?

	JMP	ERR2		/YES -- RETURN THE NODE

	AND	(77		/GET THE DEVICE CODE

	SAD	(2		/RF?

	SKP			/YES

	SAD	(3		/NO -- RP?

	SKP			/YES

	SAD	(24		/NO -- RK?

	SKP			/YES

	JMP	ERR3		/NO -- RETURN THE NODE

	DAC	DEVICE		/SAVE THE DEVICE CODE

	LAC	EV		/GET THE UNIT NO.

	AND	(700

	ALS!SHAL 11	/ CREATE DEVICE NUMBER.			/(017)

	DAC	UNIT		/AND SAVE IT

	.TITLE TRANSFER CREATED FILE TO SYSTEM DISK		/(017)

								/(017)

/ HERE WE MUST GET THE STARTING BLOCK OF THE UFD NAMED

/ IN THE LUN-UFD TABLE FOR THE LUN SPECIFIED.  THIS

/ ALGORITHM WAS TAKEN FROM RFOPEN 075.

/

	LAC*	(LUFD1		/(MJH-16) CALC ADDR OF LUN-UFD ENTRY

	AAC	-1		/(MJH-16) FOR THIS REQUEST

	TAD	LUN		/(MJH-16)

	DAC	TEMP		/(MJH-16) AC=ADDRESS OF UFD NAME

	LAC*	TEMP		/(MJH-16) GET UFD NAME

	SNA			/(MJH-16) IS DISK MOUNTED?

	JMP	ERR4		/(MJH-16) NO ERROR

	DAC	TEMP		/(MJH-16) YES -- SAVE THE UFD NAME

	LAC	DEVICE		/(MJH-16) GET THE BLOCK NUMBER OF THE MFD

	SAD	(3		/(MJH-16) IS DISK THE RP?

	JMP	.+3		/(MJH-16)

	LAC	(1777		/(MJH-16) NO THEN MFD STARTS AT 1777

	SKP			/(MJH-16)

	LAC	(47040		/(MJH-16) YES

RFMFD1	DAC	BLOCK		/(MJH-16) SAVE THE BLOCK NUMBER

	JMS	CONVRT		/(MJH-16) CONVERT BLK NO. TO DISK ADDR

	TAD	UNIT		/(MJH-16) ADD IN UNIT NUMBER

	DAC	GETCTA		/(MJH-16)

	LACQ			/(MJH-16)

	DAC	GETCTA+1	/(MJH-16)

	JMS	GETBLK		/(028)GET, ERROR TO ERR5

	LAC	(BUFF-1		/(MJH-16) NO -- SETUP X10 TO SCAN THE MFD BLOCK

	DAC*	(X10		/(MJH-16)

	AAC	370		/(MJH-16) CALC ADDR OF LAST ENTRY IN BLOCK

	DAC	TEMPX		/(MJH-16) SAVE THIS ADDR

RFMFD2	LAC*	X10		/(MJH-16) GET MFD ENTRY

	SAD	TEMP		/(MJH-16) DOES IT MATCH?

	JMP	RFMFD3		/(MJH-16) YES

	LAC*	(X10		/(MJH-16) NO -- END OF BLOCK?

	SAD	TEMPX		/(MJH-16)

	JMP	RFMFD4		/(MJH-16) YES -- PREPARE TO SWITCH MFD BLOCKS

	AAC	3		/(MJH-16) NO -- INCREMENT X10

	DAC*	(X10		/(MJH-16)

	JMP	RFMFD2		/(MJH-16) GO LOOK AT NEXT ENTRY

RFMFD4	LAC	BUFF+377	/(MJH-16) IS THIS LAST MFD BLOCK?

	SAD	(-1		/(MJH-16)

	JMP	ERR4		/(MJH-16) YES -- ERROR

	JMP	RFMFD1		/(MJH-16) NO -- PREPARE TO READIN NEXT BLOCK

RFMFD3	LAC*	X10		/(MJH-16) GET STARTING BLOCK OF UFD

	SAD	(-1		/(MJH-16) IS IT INITIALIZED?

	JMP	ERR4		/(MJH-16) NO -- ERROR

				/(MJH-16) YES -- OK

/ 

/ HERE WE NEED TO LOOK FOR A FILE CALLED 'TSKNAM IMG'. WHEN WE FINALLY

/ ARRIVE HERE, THE AC HAS THE STARTING BLOCK OF THE UFD WHERE THE FILE

/ SHOULD BE. DEVICE AND UNIT ARE SET UP CORRECTLY BY THIS TIME.

/ 

GOTUFD	JMS	CONVRT		/CONVERT THE BLOCK NO. TO DISK ADDR.

	TAD	UNIT		/ADD IN THE UNIT NO. (TO PLATTER)

	DAC	GETCTA

	LACQ

	DAC	GETCTA+1

	JMS	GETBLK		/(028)GET, ERROR TO ERR5

	LAC	(BUFF		/PREPARE TO SCAN THE BLOCK FOR FILNAM

	DAC	TEMP

	AAC	-1

	DAC*	(X10

NEXTEN	LAC*	X10		/GET 1ST HALF OF FILE NAME FROM UFD

	SAD	TSKNM1		/DOES 1ST HALF OF NAME MATCH?

	SKP

	JMP	NOTFIL		/NO -- PREPARE TO EXAMINE NEXT ENTRY

	LAC*	X10		/YES -- HOW ABOUNT THE 2ND HALF?

	SAD	TSKNM2

	SKP

	JMP	NOTFIL		/NO -- EXAMINE NEXT ENTRY

	LAC*	X10		/YES -- HOW ABOUT THE EXTENSION?

	SAD	TSKEXT

	SKP

	JMP	NOTFIL		/NO

	LAC*	X10		/YES -- THIS IS THE RIGHT FILE!

	DAC	BLOCK		/SAVE THE STARTING BLOCK OF THE FILE

	LAC*	X10		/GET THE FILE SIZE

	SMA			/THIS BETTER BE A 'CREATED' FILE

	JMP	ERR6		/IT'S NOT SO GO RETURN THE NODE

	AND	(377777		/IT IS SO SAVE THE REAL NO. OF BLOCKS

	DAC	SIZE

	JMP	GOTFIL

/ 

NOTFIL	LAC	TEMP		/THIS ISN'T THE RIGHT FILE SO UPDATE

	AAC	10		/THE POINTERS.

	SAD	(BUFF+370	/IS THIS THE END OF THIS UFD BLOCK?

	JMP	NEXTB		/YES -- PREPARE TO READIN ANOTHER

	DAC	TEMP		/NO -- CONTINUE THE SCAN

	AAC	-1

	DAC*	(X10

	JMP	NEXTEN

/ 

NEXTB	LAC	BUFF+377	/GET THE POINTER TO THE NEXT UFD BLOCK

	SAD	(-1		/IS THIS THE LAST BLOCK IN THE UFD?

	JMP	ERR7		/YES -- FILE WAS NOT FOUND

	JMP	GOTUFD		/NO -- PREPARE TO GET THE NEXT ONE.

/ 

/ WE NOW KNOW WHERE THE CREATED FILE IS AND HOW MUCH SPACE IT

/ OCCUPIES. THEREFORE LET'S ALLOCATE ENOUGH SPACE ON THE SYSTEM

/ DISK AND TRANSFER THE TASK IMAGE FROM THE CREATED FILE TO THE

/ ALLOCATED SPACE ON THE SYSTEM DISK.

/ 

GOTFIL	LAC	BLOCK		/PREPARE TO GET THE 1ST 2 BLOCKS OF

	JMS	CONVRT		/THE FILE -- 2 ARE GUARANTEED

	TAD	UNIT

	DAC	GETCTA

	LACQ

	DAC	GETCTA+1

	LAC	(1000

	DAC	GETCTA+3

	JMS	GETBLK		/(028) GET, 2 BLOCKS, ERROR TO #5

	LAC	(BUFF-1		/NO -- PREPARE TO READ INFO

	DAC*	(X10

	LAC	(INFO-1

	DAC*	(X11

	LAW	-16

	DAC	TEMP

	LAC*	X10		/TRANSFER THE 1ST FEW WORDS OF THE

	DAC*	X11		/HEADER BLOCK INTO THE 'INFO' TABLE

	ISZ	TEMP

	JMP	.-3

	LAC TI.DA	/ FETCH DISK ADDRESS FROM TASK HEADER	/(017)

			/ AC AND MQ = RSX DISK BLOCK ENCODING	/(017)

	LMQ!LLS 12	/ AC = DISK BLOCK NUMBER.		/(017)

	TCA		/ NEGATE BLOCK NUMBER FOR LINK TABLE	/(017)

			/ UPDATING.				/(017)

	DAC	OFFSET

								/(017)

	LAC TI.DP	/ FETCH THE DEFAULT PRIORITY FROM THE	/(017)

	AND (S.EDP)	/ TASK IMAGE AND CLEAR THE FLAG BITS.	/(017)

	SNA		/ WAS A PRIORITY SPECIFIED?		/(017)

	LAC (DEPRIO)	/ NO, USE ASSEMBLED DEFAULT PRIORITY.	/(017)

	XOR FLAGS	/ SET FLAG BITS IN FLAGS WORD.		/(017)

	DAC TI.DP	/ SET NEW DEFAULT PRIORITY AND FLAGS	/(017)

			/ BITS INTO TASK HEADER.		/(017)

								/(017)

	LAC	SIZE		/PREPARE TO ALLOCATE ENOUGH SPACE ON THE

	CLL

	ALS	10

	DAC	ALCTA

	CAL	ALLO		/ALLOCATE

	CAL	WAIT

	LAC	EV		/WHERE THERE ANY ERRORS?

	SPA

	JMP	ERR8		/YES -- RETURN THE NODE

	LAC	ALCTA+1		/NO -- PREPARE TO TRANSFER THE FILE

	DAC	PUTCTA

	LAC	ALCTA+2

	DAC	PUTCTA+1

	CLL			/PUT THE CORRECT DISK ADDRESS INTO

	LAC	ALCTA+2		/THE INFO TABLE. THIS MUST BE ONE BLK

	TAD	(400		/ADDRESS MORE THAN THE ALLO. AREA.

	SZL

	IDX	ALCTA+1

	TAD	ALCTA+1

	DAC	TI.DA		/SAVE THE CORRECT ADDR. FOR STL NODE

	LAC SIZE		/NOTE THAT SIZE>=2 BLOCKS.

	TCA

	DAC	TEMP		/USE TEMP AS A COUNTER FOR BLOCKS TRANS.

/ 

/ HERE WE NEED TO TRANSFER THE BLOCKS. BLOCKS WILL BE TRANSFERRED

/ TWO AT A TIME UNTIL WE'RE ALL DONE OR UNTIL ONLY ONE BLOCK REMAINS.

/ IF ONLY ONE BLOCK REMAINS USE 400 IN GET AND PUT CONTROL TABLES

/ SO WE WON'T GO OVER THE ALLOCATED AREA OR OFF THE END OF THE DISK.

/ 

CONTTR	JMS	R09PUT		/(028)SUBROUTINE TO SAVE SPACE

	JMS	UPDATE		/UPDATE THE DISK ADDR AND PLATTER

	JMS	UPDATE		/DO IT 2 TIMES BECAUSE 2 BLOCKS TRANSFERRED

	ISZ	TEMP		/ARE WE DONE TRANSFERRING BLOCKS?

	SKP			/NOT YET

	JMP	TRANDN		/YES

	ISZ	TEMP		/DONE NOW?

	SKP

	JMP	TRANDN		/YES

	LAC	TEMP		/NO -- IS THERE ONLY 1 BLK LEFT?

	SAD	(-1

	SKP

	JMP	CONTIN		/NO -- CONTINUE TRANSFERRING 2 AT A TIME

	LAC	(400		/YES -- THEN TRANSFER ONLY 1 BLOCK

	DAC	GETCTA+3

	DAC	PUTCTA+3

	JMP	CONTIN

/ 

UPDATE	0

	CLL

	LAC	(400

	TAD	PUTCTA+1	/UPDATE THE PUT CONTROL TABLE

	DAC	PUTCTA+1

	SZL			/SHOULD THE PLATTER BE UPDATED?

	IDX	PUTCTA		/YES -- UPDATE IT

	CLL			/NO

	LAC	(400

	TAD	GETCTA+1	/UPDATE THE GET CONTROL TABLE

	DAC	GETCTA+1

	SZL			/SHOULD THE PLATTER BE UPDATED?

	IDX	GETCTA		/YES -- THEN DO SO

	JMP*	UPDATE		/NO -- RETURN

/ 

CONTIN	JMS	R10GET		/(028)GET, EXIT TO ERR10

	JMP	CONTTR		/NO -- CONTINUE

	.TITLE RELOCATE LINK DISK BLOCK ADDRESSES		/(017)

								/(017)

/ THE TRANSFER IS ALL DONE SO WE CAN BEGIN TO CONSTRUCT THE STL NODE.

/ WE MUST BE SURE THAT THE TASK CAN RUN IN THE PARTITION THAT WAS

/ SPECIFIED IN THE CPB OR THE PARTITION GIVEN TO THE TASK BUILDER.

/ 

/ BEFORE SETTING UP THE STL NODE HOWEVER, TRY TO UPDATE THE LINK

/ TABLE IF ONE EXISTS. AT THIS TIME THE ADDRESSES FOR THE START OF

/ THE LINKS ARE WRONG. THEY ARE PROPERLY SET UP FOR THE 'USER' DISK

/ BUT NOT FOR THE SYSTEM DISK.

/

TRANDN	LAW	-1		/SUBTRACT 1 TO GET THE NUMBER OF EXTERNAL LINKS

	TAD	INFO+14

	SNA			/ARE THERE ANY LINKS?

	JMP	TRANX		/NO -- GO SET UP THE STL NODE

	DZM	TEMPX		/YES -- CLEAR FLAG SAYING LINKS WERE COUNTED

	LAC	INFO+15		/GET THE BASE OF THE LINK TABLE

	AND	(77		/USE ONLY THE LOW BITS FOR THE POINTER

	TAD	(BUFF		/ADD START OF BLOCK BUFFER

	AAC	10		/ADD OFFSET SO POINTER POINTS TO 1ST LINK DISK 

	DAC	POINT		/ADDRESS

	LAC	TI.DA		/PICK UP DSIK ADDR. TO BE USED IN STL NODE

	AND	(377		/MASK OFF ALL BUT THE PLATTER NO.

	DAC	GETCTA+0	/STORE IN GET CTA

	LAC	TI.DA		/GET THE DISK ADDR.

	AND	(777400

	DAC	GETCTA+1

	LAC	(GETCTA		/MAKE THE PUT CPB USE SAME CTA AS FOR GET

	DAC	PUT+3

	DZM	DEVICE		/CLEAR THE DEVICE -- INDICATE SYSDSK

	LAC	(400		/SET UP SO GETS AND PUTS USE ONLY 400 WDS.

	DAC	GETCTA+3

TRAND1	JMS	R10GET		/(028)GET THE BLOCK WITH THE LINK TABLE

	LAC	TEMPX		/HAVE LINK TAB ENTRIES BEEN COUNTED?

	SZA

	JMP	TRAND3		/YES -- CONTINUE

	CLA!IAC			/NO -- SET FLAG SAYING LINK TABLE ENTRIES

	DAC	TEMPX		/HAVE BEEN COUNTED

	LAC	INFO+13		/GET TASK ENTRY POINT SO THE PAGE/BANK MASK

	RAL			/CAN BE CALCULATED

	SPA!CLA			/THIS MASK IS 17777 FOR BANK, 7777 FOR PAGE

	LAC	(10000

	TAD	(7777

	DAC	BPMASK		/SAVE THE MASK

	LAC	INFO+15		/GET THE BASE ADDR OF LINK TABLE

	AND	BPMASK		/MASK OFF ANY UNNEEDED BITS

	TCA			/NEGATE FOR FUTURE SUBTRACTION

	DAC	TEMPX2		/SAVE BASE OF LINK TABLE NEGATED

	LAC	POINT		/PREPARE TO GET THE JMS* (EXU INSTRUCTION

	AAC	-6		/IN THE 1ST LINK

	DAC	TEMPX1		/(THIS IS WORD 2 OF THE ENTRY)

	LAC*	TEMPX1		/GET THE INSTRUCTION

	AND	BPMASK		/GET THE ADDRESS IN THAT INSTRUCTION

	TAD	TEMPX2		/SUBTRACT THE BASE OF LINK TABLE

	LMQ			/PREPARE TO DIVIDE BY 13(8)

	CLA!CLL			/TO GET NUMBER OF TABLE ENTRIES

	DIV

	13

	LACQ			/AC NOW HAS NUMBER OF LINK TABLE ENTRIES

	TCA			/NEGATE FOR USE AS AN ISZ COUNTER

	DAC	TEMP

TRAND3	LAC*	POINT		/GET THE OLD DISK ADDR. FOR THIS LINK

			/ AND CONVERT IT TO A BLOCK NUMBER.	/(017)

	LMQ!LLS 12	/ AC = BLOCK NUMBER.			/(017)

	TAD	OFFSET		/SUBTRACT THE OLD BASE DISK BLOCK NO.

	CLL

	ALS	10		/MULTIPLY BY 400 TO GET THE NO. OF WDS.

	TAD	TI.DA		/ADD THE NEW DISK BASE ADDR.

	SZL

	IAC

	DAC*	POINT		/STORE THE ADDR. OF THE LINK IN LINK TABLE

	ISZ	TEMP		/LAST LINK?

	SKP

	JMP	TRAND2		/YES -- WRITE OUT THE LAST UPDATED BLOCK

	LAC	POINT		/NO -- INCREMENT THE POINTER

	AAC	13

	DAC	POINT

	TCA		/ CONVERT BUFFER POINTER TO NEGATIVE	/(017)

			/ NUMBER FOR END OF BUFFER CHECK.	/(017)

	TAD (BUFF+377)	/ ADD IN THE END OF THE BUFFER.		/(017)

	SMA!CMA		/ AC < 0 IF POINTER PAST END OF BUFFER.	/(017)

			/ CONVERT TO NUMBER > 0 AND SUBTRACT 1	/(017)

			/ FOR THE REST OF THE ALGORITHM.	/(017)

	JMP	TRAND3		/NO -- CONTINUE TO UPDATE LINK ADDRESSES

	TAD	(BUFF

	DAC	POINT

	JMS	R09PUT		/(028) SUBROUTINE LEAVES LINK=0

	LAC GETCTA+1	/ NO ERRORS, ACCESS NEXT BLOCK.		/(017)

	TAD	(400

	DAC	GETCTA+1

	SZL

	IDX	GETCTA

	JMP	TRAND1		/GO UPDATE THE LINKS IN THIS BLOCK

TRAND2	JMS	R09PUT	/(028)LAST BLOCK OUT;LINK TABLE ENTRY

	.TITLE CONSTRUCT STL NODE				/(017)

								/(017)

/ NOW SET UP THE STL NODE -- THE LINK TABLE HAS BEEN UPDATED FOR SYSDSK

/

TRANX	LAC EXENM1	/ TRANSFER EXECUTION NAME INTO NODE INFO/(017)

	DAC TI.T1						/(017)

	LAC EXENM2						/(017)

	DAC TI.T2						/(017)

								/(017)

	XCT NORQSW	/ ZERO THE PARTITION BLOCK ADDRESS?	/(017)

	JMP TR.10	/ NO, EXECUTE NORMALLY.			/(017)

	DZM TI.PN	/ CLEAR PBDL NODE ADDRESS.		/(017)

	JMP TR.40	/ BYPASS ALL PARTITION CHECKING		/(017)

								/(017)

TR.10	LAC PARNM1	/ WAS A PARTITION SPECIFIED?		/(017)

	SNA		/ AC >< 0 IF YES			/(017)

	JMP TR.20	/ NO.					/(017)

	LAC (PARNM1)	/ USE PARTITION NAME FROM XQT NODE.	/(017)

	SKP							/(017)

								/(017)

TR.20	LAC (TI.P1)	/ USE PARTITION NAME FROM TASK HEADER.	/(017)

	DAC* (R2)	/ SET UP FOR SNAM.			/(017)

	LAC (PBDL)						/(017)

	DAC* (R1)						/(017)

	JMS* (SNAM)						/(017)

	JMP ERR11	/ ERROR, PARTITION NOT FOUND.		/(017)

								/(017)

	DAC TI.PN	/ SAVE PBDL NODE ADDRESS IN TASK HEADER	/(017)

	AAC 4		/ POINT TO PARTITION BASE ADDRESS.	/(017)

	DAC TEMP	/ SAVE POINTER FOR LATER.		/(017)

								/(017)

	LAC TI.TE	/ FETCH EXEC/NORMAL FLAG.		/(017)

	RTL		/ MOVE FLAG INTO SIGN BIT.		/(017)

	SPA		/ EXEC MODE?				/(017)

	JMP TR.30	/ NO.					/(017)

	LAC* TEMP	/ FETCH CURRENT PARTITION BASE ADDRESS.	/(017)

	SAD TI.PB	/ COMPARE AGAINST OLD BASE ADDRESS.	/(017)

	SKP		/ THEY ARE EQUAL.			/(017)

	JMP ERR11	/ ERROR, THEY ARE DIFFERENT.		/(017)

TR.30	IDX	TEMP	/YES -- MAKE TEMP POINT TO PART. SIZE	/(017)

	LAC	INFO+13		/(MJH-16) DETERMIN IF TASK WILL FIT IN PART.

	RTL			/(MJH-16)

	SPA!CLA!CMA		/(MJH-16)

	LAW	-400		/(MJH-16)

	AND	INFO+12		/(MJH-16)

	TCA

	TAD*	TEMP

	SPA

	JMP	ERR11		/NO -- DEAL AND RETURN NODE

TR.40	LAC	NODADR	/YES -- PREPARE TO SET UP STL NODE	/(017)

	AAC	1

	DAC*	(X11

	LAC (TI.PB)	/ FETCH START -1 OF NODE.		/(017)

	DAC*	(X10

	LAW	-10

	DAC	TEMP

	LAC*	X10		/TRANFER INFO INTO NODE FROM EXECUTE LIST

	DAC*	X11

	ISZ	TEMP

	JMP	.-3

								/(017)

	LAC NODADR	/ FETCH THE NODE ADDRESS IN ORDER TO 	/(017)

	DAC* (R2)	/ SET UP FOR NADD LATER.		/(017)

	DAC STLND	/ SET UP EVENT VARIABLE RETURN CODE.	/(017)

	LAC	(STL

	DAC*	(R1

	JMS*	(NADD

	XCT NORQSW	/ BY PASS REQUEST?			/(017)

	CAL	REQ		/REQUEST THE TASK

	JMS	SETCTA		/(028) RE-ESTABLISH DEFAULT CTA SETTINGS

	LAC	(400		/(028)EXCEPT WE WANT 400 WORD PUTS!

	DAC	PUTCTA+3

	.TITLE	SAVE-REMOVE-INSTALL BLOCK CHAIN UPDATE

/

/ (THE CODE FOUND BETWEEN THE "*****" WAS ENTERED BY MJH 4/6/76 EDIT #13

/  AND SCR EDIT #23)

/ *********************

/

/

/ THE FOLLOWING CODE IS USED TO UPDATE THE INSTALL/REMOVE

/ CHAIN OF BLOCKS IN ORDER TO FIX THE SAVE-REMOVE-INSTALL

/ GLITCH. THE IDEA IS THAT EACH TIME THE STL IN CORE IS CHANGED,

/ THIS CHAIN OF DISK BLOCKS MUST ALSO CHANGE. WHENEVER A TASK IS

/ REMOVED, THE TASKS NAME IS ENTERED INTO THE CHAIN. WHENEVER A

/ TASK IS INSTALLED,  A COPY OF ITS STL NODE (LESS POINTERS) IS

/ ENTERED INTO THE CHAIN ALONG WITH THE TASKS PBDL DATA.

/ WHEN THE SYSTEM IS BOOTSTAPPED THE COPY OF SAVE WHICH IS

/ IN CORE READS THE CHAIN OF BLOCKS AND RECONSTRUCTS THE

/ STL FROM THE DATA FOUND IN THE BLOCKS.

/ WHENEVER A SAVE IS DONE (STL IN CORE MATCHES STL ON DISK)

/ THIS CHAIN OF BLOCKS IS PURGED.

/

/ THE STRUCTURE OF EACH BLOCK IS:

/

/	WORDS 0-375 USED FOR DATA ENTRIES

/	WORD 376 IS A POINTER TO 1ST FREE WORD IN BLOCK

/	WORD 377 IS A POINTER TO NEXT BLOCK OR -1

/

/ THE STRUCTURE OF A REMOVE ENTRY IS:

/

/	NTRY+0 -1 (FLAG SAYING THIS ENTRY IS A REMOVE)

/	NTRY+1 TASK NAME IN SIXBT 1ST HALF

/	NTRY+2 TASK NAME IN SIXBT 2ND HALF

/

/ THE STRUCTURE OF AN INSTALL ENTRY IS:

/

/	NTRY+0 +1 (FLAG SAYING THIS ENTRY IS AN INSTALL)

/	NTRY+1 TASK NAME IN SIXBT 1ST HALF

/	NTRY+2 TASK NAME IN SIXBT 2ND HALF

/	NTRY+3 STL NODE WORD 4

/	NTRY+4 STL NODE WORD 5

/	NTRY+5 STL NODE WORD 6

/	NTRY+6 STL NODE WORD 7

/	NTRY+7 STL NODE WORD 10

/	NTRY+10 STL NODE WORD 11

/	NTRY+11 PARTITION NAME IN SIXBT 1ST HALF

/	NTRY+12 PARTITION NAME IN SIXBT 2ND HALF

/	NTRY+13 PARTITION BASE ADDRESS

/

/ NOTE THAT IT IS EXTREMELY IMPORTANT TO FILL UP DATA

/ ENTRIES IN THE REMOVE CHAIN IN THE ORDER THAT EACH

/ STL MODIFICATION WAS MADE.

/

/ NOTE ALSO THAT ALL TASKS WHICH ACCESS THIS CHAIN OF 

/ BLOCKS MUST RESIDE IN THE SAME PARTITION.

/ THOSE TASKS ARE: SAVE,TDV REM, MCR REM, TDV INS, MCR INS,

/ FININS, AND AUTORM.

/

	.EJECT

/

/ START TO PROCESS THE REMOVE CHAIN OF BLOCKS

/

INSSZ=14				/SIZE OF AN INSTALL ENTRY

REMSZ=2					/SIZE OF A REMOVE ENTRY

REMBLK=311

BEGIN	DZM	REMFLG		/NOT AT END, ZERO FLAG

	LAC*	(REMBLK		/GET THE 1ST BLOCK IN THE CHAIN

	SKP			/JOIN UP TO PLACE BLOCK

/

/ READ IN A BLOCK IN THE CHAIN

/

REM0	LAC	BUFF+377	/GET NEXT BLOCK

	DAC	CURBLK		/SAVE CURRENT BLOCK NUMBER

	JMS	RCNVRT		/CONVERT TO PLATTER AND ADDR

	JMS	GETBLK

/

REM1	LAC	REMFLG		/NOP UNLESS LAST BLOCK, 

	SMA			/LAST, FORCE -1

	LAC	BUFF+376	/DATA, LAST BLOCK MISSES THIS

	SMA			/SKIP IF LAST BLOCK

	JMP	REM0		/NO, FETCH ANOTHER

	AAC	377-INSSZ	/CAN INSTALL ENTRY FIT

	SPA			/SKIP IF YES

	JMP	GETSOM		/NO, ANOTHER BLOCK NEEDED

	AAC	-377		/UPDATE POINTER

	DAC	BUFF+376

	CMA			/SET UP X10 TO PLACE DATA
	TAD	(BUFF-1-INSSZ	/(029)SETUP X10 TO POINT AT NTRY-1

	DAC*	(X10		/SAVE BLOCK ENTRY POINTER

	CLA!IAC			/SET UP FLAG WORD ENTRY

	DAC*	X10		/IF FLAG IS +1 THIS IS AN INSTALL NTRY

	LAC	(TI.PB		/PRPARE TO ENTER STL DATA

	DAC*	(X11		/USER X11 AS A POINTER TO STL DATA

	LAW	-10		/TRANSFER WORDS 2-11 OF STL NODE

	DAC	TEMP

	LAC*	X11

	DAC*	X10

	ISZ	TEMP

	JMP	.-3

	LAC	(TI.AS		/PREPARE TO ENTER PBDL DATA

	DAC*	(X11

	LAC*	X11		/NAME

	DAC*	X10

	LAC*	X11		/NAME, 2ND

	DAC*	X10

	LAC*	X11		/BASE

	DAC*	X10

/

/ UPDATE THE BLOCK DATA ITEM POINTER, WRITE OUT BLOCK, AND QUIT

/

	JMS	PUTBLK		/WRITE OUT THE DISK BLOCK

	JMP	REMNOD		/ALL DONE WITH THIS PHASE

/

/ PREPARE TO GET NEXT BLOCK IN CHAIN OR ALLOCATE A NEW BLOCK

/

GETSOM	LAC	BUFF+376	/NO LONGER EOF, MAKE IT +

	CMA

	DAC	BUFF+376	/

	LAW	-1		/SET REMFLG TO SHOW END

	DAC	REMFLG

	SAD	BUFF+377	/ANOTHER BLOCK ALREADY IN CHAIN

	JMP	ALLBLK		/(027) GO TO ALLOCATE A NEW BLOCK

	JMS	PUTBLK		/(027) OLD BLOCK OUT WITH + POINTER

	JMP	REM0		/NO -- PREPARE TO READ IN ANOTHER

				/YES --

/

/ ALLOCATE A NEW BLOCK FOR THE REM CHAIN

/

ALLBLK	LAC	400

	DAC	ALCTA		/1 BLOCK WORTH

	CAL	ALLO

	CAL	WAIT

	LAC	EV

	SPA

	JMP	ERR8

	LAC	ALCTA+2	/NO -- GET THE BLK NUMBER

	LMQ			/CONVERT PLATTER AND ADDR

	LAC	ALCTA+1	/TO A DISK BLOCK NUMBER

	AND	(7777

	LRSS	10

	LACQ

	DAC	NEWBLK		/SAVE THE BLK NUMBER

/

/  CAN WE WRITE ON THE NEW BLOCK, TRY IT. IF FAILS,

/ THE PREVIOUS BLOCK DOESN'T POINT AT IT.

/

	JMS	RCNVRT		/CHANGE TO PLATTER AND ADDR

	JMS	PUTBLK		/WRITE OUT THE NEW BLOCK

/

/ OK, SO WRITE OUT THE CURRENT DISK BLOCK

/

	LAC	CURBLK		/GET CURRENT BLOCK NUMBER

	JMS	RCNVRT		/PREPARE TO WRITE IT OUT

	LAC	NEWBLK		/SET UP BLK FORWARD PTR

	DAC	BUFF+377

	JMS	PUTBLK		/WRITE OUT THE OLD BLOCK

/

/ INIT THE NEW DATA BLOCK BUFFER

/

	LAC	NEWBLK		/SET NEWLY ALLO'D BLK TO CURRENT BLK

	DAC	CURBLK

	JMS	RCNVRT		/PREP TO WRITE OUT THIS BLOCK

	LAW	-1		/NO BLOCK POINTER ON NEW BLOCK

	DAC	BUFF+377

	JMP	REM1		/GO PROCESS ZEROD BLK

/

REMFLG	0			/0 UNTIL LAST FOUND, THEN -1

NEWBLK	0

CURBLK	0

/

/ SUBROUTINE RCNVRT  - BLK # TO PLATT AND ADDR

/

RCNVRT	0					/(MJH-12)

	LMQ					/(MJH-12)

	LLSS!ECLA 10				/(MJH-12)

	DAC	GETCTA

	DAC	PUTCTA

	LACQ					/(MJH-12)

	DAC	GETCTA+1

	DAC	PUTCTA+1

	JMP*	RCNVRT				/(MJH-12)

/

/ SUBROUTINE PUTBLK -- WRITE OUT A DISK BLOCK

/

PUTBLK	0					/(MJH-12)

	CAL	PUT

	CAL	WAIT

	LAC	EV

	SPA!CLL

	JMP	ERR99	/PUT ERR, NO DEAL

	JMP*	PUTBLK

/

/ SUBROUTINE GETBLK

/

GETBLK	0

	CAL	GET

	CAL	WAIT

	LAC	EV

	SPA!CLL

	JMP	ERR5	/GET ERR, NO DEAL

	JMP*	GETBLK

/

/  SUBROUTINE SETCTA

/

/  ESTABLISH CTA VALUES AND POINTERS TO BE THOSE AT ASSEMBLY

/  TIME TO LIMIT PROBLEMS WITH SECOND PASS THRU AFTER ERROR

/  IN FIRST PASS THRU

/

SETCTA	0

	LAC	(400

	DAC	GETCTA+3 /DEFAULT GET TRNASFER SIZE

	LAC	(1000

	DAC	PUTCTA+3 /DEFAULT PUT TRANSFER SIZE

	LAC	(PUTCTA

	DAC	PUT+3	/DFAULT, PUT POINTS TO ITS OWN CTA

	LAC	(GETCTA

	DAC	GET+3	/SAME FOR GET

	JMP*	SETCTA

/

/  SUBROUTINE R09PUT

/

/  JUST LIKE PUTBLK, EXCEPT ERRORS OUT TO ERR9, NOT ERR99

/

R09PUT	0

	CAL	PUT

	CAL	WAIT

	LAC	EV

	SPA!CLL

	JMP	ERR9

	JMP*	R09PUT

/

/

/  SUBROUTINE R10GET

/

/  LIKE GETBLK EXCEPT GOES TO ERR10 NOT ERR5

/

R10GET	0

	CAL	GET

	CAL	WAIT

	LAC	EV

	SPA!CLL

	JMP	ERR10

	JMP*	R10GET

/

REMNOD=.

/ ********************

	.EJECT

/

	JMP RETEVA	/ GO RETURN EVENT VARIABLE.		/(017)

	.TITLE REQUESTED TASK ALREADY IN STL.			/(017)

								/(017)

/ THIS SECTION OF CODE WILL BE EXECUTED AT LEVEL 6 IN ORDER TO	/(017)

/ LOCK OUT SIGNIFICANT EVENTS DURING THE SET UP AND SCAN OF THE	/(017)

/ EXISTING STL NODE. THIS WILL ALLOW MOST OF THE CODE TO EXECUTE/(017)

/ WITHOUT INHIBITS.						/(017)

								/(017)	

/ THE TASK SPECIFIED IN THE EXECUTE NODE IS ALREADY IN THE SYSTEM.

/ THEREFORE IF NO PARTITION IS SPECIFIED JUST REQUEST IT AT THE

/ PRIORITY GIVEN IN THE EXECUTE NODE. IF A PARTITION IS

/ SPECIFIED AND ITS AN EXEC MODE TASK JUST REQUEST IT.

/ IF A PARTITION IS GIVEN AND ITS A NORMAL MODE TASK TRY TO FIT

/ THE TASK INTO THE PARTITION GIVEN , CHANGING THE STL NODE, AND

/ THEN REQUEST IT. IN EFFECT THIS PROCEDURE IS SIMILAR TO THE

/ MCR FUNCTION ASP.

/

/ NOTE: IF THE TASK BEING XQT'D IS ACTIVE FININS WILL PRINT AN ERROR

/ 

REQIT	DAC	STLND		/SAVE THE ADDRESS OF THE STL NODE

	JMS	SETXR		/(MJH-16)SET UP TO ACCESS THE TASK'S STL NODE

	LAC	S.DP,X		/(MJH-16) IS THE TASK ACTIVE ALREADY?

	SPA			/(MJH-16) SKIP IF NOT

	JMP	ERR13		/(MJH-16) YES -- DECLARE ERROR

								/(017)

	LAC EXENM1	/ CHECK FOR ALIAS NAME IN STL.		/(017)

	SAD TSKNM1	/ IS THE TASK AND EXECUTION NAME THE	/(017)

	SKP		/ SAME?					/(017)

	JMP ERR14	/ NO, GENERATE ERROR.			/(017)

								/(017)

	XCT NORQSW	/ GENERATE A REQUEST FOR THIS TASK?	/(017)

	JMP RETD	/ DEBREAK AND RETURN.			/(017)

	LAC	PARNM1		/WAS A PARTITION GIVEN?

	SNA

	JMP	REQIT1		/NO -- REQUEST THE TASK

	LAC S.EP,X	/ FETCH EXEC/NORMAL FLAG.		/(017)

	AND	(100000

	SNA

	JMP	REQIT1		/YES -- IGNORE PART. AND REQUEST IT

	LAC	(PBDL		/YES -- FIND OUT IF PART. IN SYSTEM

	DAC*	(R1

	LAC	(PARNM1

	DAC*	(R2

	JMS*	(SNAM

	JMP	ERR12		/PART. NO IN SYSTEM -- RETURN NODE

	PAL		/ SAVE PBDL NODE ADDRESS IN LR.		/(017)

	LAC	STLND		/GET SET TO ACCESS STL NODE

	JMS	SETXR

	LAC S.DP,X	/ FETCH FLAG WORD FROM STL NODE.	/(017)

	AND (S.EFIX)	/ TASK FIXED IN CORE?			/(017)

	SZA		/ AC = 0 IF NO.				/(017)

	JMP REQIT	/ YES, REQUEST THE TASK.		/(017)

								/(017)

	LAC	11,X		/(MJH-16) GET THE TASK SIZE

	RTL			/(MJH-16)

	SPA!CLA!CMA		/(MJH-16)

	LAW	-400		/(MJH-16)

	AND	10,X		/(MJH-16)

	DAC	SIZE

								/(017)

	PLA		/ FETCH PBDL NODE ADDRESS FOR PARTITION	/(017)

			/ CHECKING.				/(017)

	JMS	SETXR

	LAC	SIZE

	TCA

	TAD	5,X

	SPA

	JMP ERR12	/ GO PRINT ERROR AND RETURN NODE.	/(017)

								/(017)

	LAC	STLND		/YES -- FIX STL NODE

	JMS	SETXR

	PLA		/ FETCH PBDL NODE ADDRESS.		/(017)

	DAC	5,X		/FIX PTR TO PBDL

	LAC	4,X		/CLEAR RCF DISABLED BIT

	AND	(757777

	DAC	4,X

REQIT1	DBK		/ LOWER TO LEVEL 7 FOR REQUEST CAL	/(017)

	CAL	REQ		/REQUEST THE TASK

	JMP	RETURN		/RETURN THE EXECUTE NODE

/

CONVRT	0

	LMQ

	LLSS!ECLA 10

	JMP*	CONVRT

/ 

SETXR	0

	TAD	XRADJ

	PAX

	JMP*	SETXR

								/(017)

RETD	DBK		/ DEBREAK AND RETURN.			/(017)

	JMP RETURN	/ RETURN NODE TO POOL.			/(017)

/

EXIT	.ENB			/ENABLE INTERRUPTS

	CAL	(10		/EXIT

/

ERREX	CAL	DEAL		/DEALLOCATE THE BLKS ON THE SYS-DISK

RETURN	LAC	NODADR		/RETURN THE NODE TO THE POOL

	DAC*	(R2

	LAC	(POOL

	DAC*	(R1

	JMS*	(NADD

RETEVA	LAC EVADR	/ SET UP XR TO ACCESS EVENT VARIABLE.	/(017)

	JMS SETXR						/(017)

	LAC STLND	/ STL NODE ADDRESS OR ERROR CODE.	/(017)

	DAC 0,X		/ RETURN CODE IN EVENT VARIABLE.	/(017)

	JMP	START		/GO SEE IF THERE ARE MORE NODES IN LIST

	.TITLE VARIABLES, CPB'S, MESSAGES, ET. AL.		/(017)

TSKEXT	.SIXBT "IMG"		/TASK EXTENSION

XRADJ	0

NODADR	0

PARNM1	0

PARNM2	0

UNIT	0

TEMP	0

BLOCK	0

SIZE	0

EV	0

POINT	0

OFFSET	0

STATUS	0

STLND	0

	.EJECT							/(017)

								/(017)

/ INFO CONTAINS THE TASK HEADER FROM THE CONSTRUCTED TASK IMAGE	/(017)

/ THE VARIOUS WORDS IN THE TASK HEADER AND THEIR CONTENTS ARE	/(017)

/ DESCRIBED HERE.						/(017)

/								/(017)

/		************************************************/(017)

/ TI.AS=INFO+0	* ALLOCATION SIZE IN WORDS.		       */(017)

/		************************************************/(017)

/ TI.P1=INFO+1	* PARTITION NAME, FIRST HALF.		       */(017)

/		************************************************/(017)

/ TI.P2=INFO+2	* PARTITION NAME, SECOND HALF		       */(017)

/		************************************************/(017)

/ TI.PB=INFO+3	* PARTITION BASE ADDRESS.		       */(017)

/		************************************************/(017)

/ TI.T1=INFO+4	* TASK NAME, FIRST HALF.		       */(017)

/		************************************************/(017)

/ TI.T2=INFO+5	* TASK NAME, SECOND HALF.		       */(017)

/		************************************************/(017)

/ TI.DP=INFO+6	* DEFAULT TASK PRIORTY, IF ANY.		       */(017)

/		************************************************/(017)

/ TI.PN=INFO+7	* PARTITIONS PBDL NODE ADDRESS		       */(017)

/		************************************************/(017)

/ TI.DA=INFO+10	* CONSTRUCTED FILE DISK ADDRESS.	       */(017)

/		************************************************/(017)

/ TI.RC=INFO+11	* RESIDENT CODE LENGTH			       */(017)

/		************************************************/(017)

/ TI.TS=INFO+12	* TASK SIZE				       */(017)

/		************************************************/(017)

/ TI.TE=INFO+13	* TASK ENTRY POINT AND FLAGS.		       */(017)

/		************************************************/(017)

/ TI.NL=INFO+14	* NUMBER OF EXTERNAL LINKS.		       */(017)

/		************************************************/(017)

/ TI.LB=INFO+15	* BASE ADDRESS OF THE LINK TABLE	       */(017)

/		************************************************/(017)

								/(017)

INFO	.BLOCK	16						/(017)

								/(017)

TI.AS=INFO+0							/(017)

TI.P1=INFO+1							/(017)

TI.P2=INFO+2							/(017)

TI.PB=INFO+3							/(017)

TI.T1=INFO+4							/(017)

TI.T2=INFO+5							/(017)

TI.DP=INFO+6							/(017)

TI.PN=INFO+7							/(017)

TI.DA=INFO+10							/(017)

TI.RC=INFO+11							/(017)

TI.TS=INFO+12							/(017)

TI.TE=INFO+13							/(017)

TI.NL=INFO+14							/(017)

TI.LB=INFO+15							/(017)

								/(017)

	.EJECT							/(017)

BUFF	.BLOCK 1000

SECN1	0

SECN2	0

TEMPX	0

TEMPX1	0

TEMPX2	0

BPMASK	0

TSKNM1	0		/ CREATED FILE NAME IN 6 BIT FORM	/(017)

TSKNM2	0							/(017)

FLAGS	0		/ FLAG BIT FOR STL NODE EITHER CREATED	/(017)

			/ OR FOUND.				/(017)

EVADR	0		/ EVENT VARIABLE ADDRESS TO RETURN STL	/(017)

			/ NODE ADDRESS OR COMPLETION CODE IN	/(017)

			/ CASE OF ERROR.			/(017)

NORQSW	0		/ (NO) (R)E(Q)UEST (SW)ITCH.		/(017)

			/ SKP => NO REQUEST IS TO BE GENERATED	/(017)

			/ NOP => REQUEST IS TO BE GENERATED.	/(017)

/

REQ	1

	0

EXENM1	0		/ EXECUTION NAME IN 6 BIT FORM		/(017)

EXENM2	0							/(017)

PRIO	0

/

HINF	3600

	EV

LUN	0

/

WAIT	20

	EV

/

ALLO	1500

	EV

	1

	ALCTA

ALCTA	00

	00

	00

DEAL	1600

	0

	1

	ALCTA

/

GET	13000

	EV

	1

	GETCTA

DEVICE	0

GETCTA	0

	0

	BUFF

	400

/

PUT	3100

	EV

	1

	PUTCTA

PUTCTA	0

	0

	BUFF

	1000

PRINT	2700

	EV

	4

	3

	PRNTBF

PRNTBF	TYPE-PRNTBF/2*1000

	0

	.BLOCK 6

	15

	12

TYPE	2700

	EV

	4

	2

	XX

MSG1	MSG2-MSG1/2*1000

	-401							/(028)

	.ASCII "FININS -- ILLEGAL LUN -- "<175>

MSG2	MSG3-MSG2/2*1000

	-402							/(028)

	.ASCII "FININS -- HINF ERROR -- "<175>

MSG3	MSG4-MSG3/2*1000

	-403							/(028)

	.ASCII "FININS -- ILLEGAL DEVICE -- "<175>

MSG4	MSG5-MSG4/2*1000

	-404							/(028)

	.ASCII "FININS -- DISK DISMOUNTED -- "<175>

MSG5	MSG6-MSG5/2*1000

	-405							/(028)

	.ASCII "FININS -- GET ERROR -- "<175>

MSG6	MSG7-MSG6/2*1000

	-406							/(028)

	.ASCII "FININS -- FILE NOT 'CREATED' -- "<175>

MSG7	MSG8-MSG7/2*1000

	-407							/(028)

	.ASCII "FININS -- FILE NOT FOUND -- "<175>

MSG8	MSG9-MSG8/2*1000

	-410							/(028)

	.ASCII "FININS -- ALLOCATE ERROR -- "<175>

MSG9	MSG10-MSG9/2*1000

	-411							/(028)

	.ASCII "FININS -- PUT ERROR -- "<175>

MSG10	MSG12-MSG10/2*1000

	0

	.ASCII "FININS -- PARTITION CONFLICT -- "<175>

MSG12	MSG14-MSG12/2*1000+2					/(017)

	-412							/(028)

	.ASCII "FININS -- TASK ALREADY ACTIVE -- "<175>

MSG14	MSG11-MSG14/2*1000+2					/(017)

	-413							/(028)

	.ASCII "FININS -- NON-UNIQUE ALIAS NAME -- "<175>	/(017)

MSG11=.

	.TITLE ERROR EXITS AND ERROR PRINTING ROUTINE.		/(017)

								/(017)

ERR1	LAC	(MSG1

	SKP

ERR2	LAC	(MSG2

	SKP

ERR3	LAC	(MSG3

	SKP

ERR4	LAC	(MSG4

	SKP

ERR5	LAC	(MSG5

	SKP

ERR6	LAC	(MSG6

	SKP

ERR7	LAC	(MSG7

	SKP

ERR8	LAC	(MSG8

	SKP

ERR99	LAC	(MSG9	/(027)

	SKP

ERR12	LAC	(MSG10

	SKP							/(017)

ERR13	LAC (MSG12)						/(017)

	SKP							/(017)

ERR14	LAC (MSG14)						/(017)

	JMS	NAME

	JMP	RETURN

ERR9	LAC	(MSG9

	SKP

ERR10	LAC	(MSG5

	SKP

ERR11	LAC	(MSG10

	JMS	NAME

	JMP	ERREX

	.EJECT							/(017)

								/(017)

/ SUBROUTINE NAME -- TYPE ERROR MESSAGE AND TASK NAME

/

NAME	0

	DAC	TYPE+4		/PREPARE TO PRINT ERROR MESSAGE

								/(017)

	.RTL6		/ RAISE TO LEVEL 6 TO AVOID FIGURING OUT/(017)

	DBK		/ IF I WAS ALREADY THERE.		/(017)

								/(017)

	XCT NORQSW	/ SHOULD I TYPE A MESSAGE?		/(017)

	JMP NA.10	/ YES.					/(017)

	ISZ TYPE+4	/ SET UP TO ACCESS RETURN CODE.		/(017)

	LAC* TYPE+4	/ FETCH RETURN CODE.			/(017)

	DAC STLND	/ SET UP RETURN CODE IN STLND.		/(017)

	JMP* NAME	/ AVOID TYPING ANYTHING			/(017)

								/(017)

NA.10	CAL TYPE	/ PRINT MESSAGE.			/(017)

	CAL	WAIT

	LAC	(PRNTBF+1		/INIT. X10 SO NAME OF TASK

	DAC*	(X10		/CAN BE PRINTED IN IMAGE ASCII

	LAC EXENM1	/ FETCH EXECUTION NAME.			/(017)

	LMQ

	CLA

	JMS	SIXASC

	JMS	SIXASC

	JMS	SIXASC

	LAC EXENM2	/ FETCH EXECUTION NAME.			/(017)

	LMQ

	CLA

	JMS	SIXASC

	JMS	SIXASC

	JMS	SIXASC

	CAL	PRINT		/PRINT THE TASK NAME

	CAL	WAIT

	JMP*	NAME

/

/ SUBROUTINE SIXASC -- STORE AN ASCII CHAR IN IMAGE ASCII

/			PRINT BUFFER.

/

SIXASC	0

								/(017)

	ECLA!LLS 6	/ FETCH 6 BIT CHARACTER FROM MQ.	/(017)

	XOR (40)	/ AND CONVERT IT TO 7 BIT.		/(017)

	AAC 40							/(017)

	DAC* X10	/ STORE 7 BIT CHARACTER IN BUFFER.	/(017)

								/(017)

	JMP*	SIXASC

/

	.END
