	.TITLE *** ASSIGN TDV OVERLAY ***

/
/ 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.

/

	.EJECT

/ EDIT #35

/

/

/ MCR FUNCTION -- REASSIGN	13 JAN 72	R. MCLEAN
/				8 MAY 1972	W. DESIMONE, S. DELLER

/				30 AUG 1974	M.HEBENSTREIT

/				27 JAN 1975	M.HEBENSTREIT

/				27 JUNE 75	M. HEBENSTREIT

/

/ EDIT 000-6	29-MAR-76 (SCR)	MODIFICATIONS FROM REASSIGN TO ASSIGN

/ EDIT 007	6-APR-76 (SCR)	ALLOW EARLY <CR>;ADD MESSAGES.

/ EDIT 008	9-APR-76 (SCR)  MINOR FIXES FOR 007, CLEANUP

/ EDIT 009	13-APR-76 (SCR)	ELIMINATE FILES OPEN MESSAGE

/ EDIT 010	13-APR-76 (SCR) FIX NO SECOND DEVICE DEFAULT

/ EDIT 011	13-APR-76 (SCR) ADDITIONAL WORK ON #010

/ EDIT 012	14-APR-76 (SCR) REMOVE I/O QUEUE BUSY MESSAGE
/ EDIT 013	23-APR-76 (SCR) FIX DEFAULT UFD BUG, CLEAN UP

/ EDIT 014	26-APR-76 (SCR) SQUEEZE IT

/ EDIT 015	26-APR-76 (SCR)	SQUEEZE AGAIN

/ EDIT 016	27-APR-76 (SCR) CLEAN UP

/ EDIT 017	19-MAY-76 (SCR) TTNULL TO BD FOR BATCH
/ EDIT 018	21-MAY-76 (SCR) FIX INCOMING HANDLER IN CORE
/ EDIT 019	21-MAY-76 (SCR) LEFT OUT CPB'S
/ EDIT 020	13-JULY-76 (SCR) CHECK TRIGGER SETTING ON HANDLER REQ.
/ EDIT 021	27-JULY-76 (SCR) FIX TIMOUT LOOP
/ EDIT 022	2-AUG-76 (EAG-SCR) MULTI-DEFAULT
/ EDIT 023	4-AUG-76 (EAG) INSERT MISSING "PAL" FROM EDIT
/				# 017.
/ EDIT 024	4-AUG-76 (SCR) BATCH NAME PROBLEM FOR FIX
/ EDIT 025	19-AUG-76 (SCR) EDIT 024 IN WRONG PLACE
/

/ OVERLAY NAME "ASG..." TO REASSIGN A LOGICAL UNIT NUMBER

/

/ THE FIRST LINE OF THE COMMAND INPUT

/ IS READ BY TDV 

/ FOR THE "ASSIGN" FUNCTION, THERE IS ONLY ONE LINE OF

/ COMMAND INPUT, AND IT'S SYNTAX IS AS FOLLOWS:

/
/	SYNTAX = 'ASG'$<NBC><BREAK CHARACTER>

/		$<NDEV><LUN><BREAK CHAR><ODEV><LUN><NULL>

/		(<CR>,<AM>)

/
/	<BREAK CHAR> = " ","

/	<TASK NAME> = 1-6 ALPHANUMERIC CHARACTERS

/	<NDEV> = NEW DEVICE TO BE ASSIGNED

/	<ODEV> = OLD DEVICE TO BE REMOVED

/	<LUN> = LUN NUMBER TO BE USED

/	<CR> = CAR RTN

/	<AM> = ALTMODE

/	<NBC> = NON BREAK CHARACTER

/	<NULL> =" THE EMPTY SET"

/	$ -- " ANY NUMBER OF "INCLUDING ZERO "

/

/

/	IF THE NEW DEVICE IS A DISK, THEN OPTIONALLY THE USER

/	MAY SPECIFY A UFD TO BE ASSOCIATED WITH THE DISK/LUN PAIR.

/	E.G. MCR>REA 5 RP0 <ABC> DT2. IF NO UFD IS SPECIFIED THEN

/	REA WILL TRY TO OBTAIN A DEFAULT UFD NAME FROM THE 

/	DISK-UFD TABLE.

	.TITLE *** ASSIGN TDV OVERLAY ***

/

MCRRI=171

CURTSK=135

TTMCTT=200

TTDVTT=201

ECLA=641000

.INH=705522

.ENB=705521

LUN1=142

LUN2=143

LUFD1=304

DUFD1=306

AFTP1=144

FAC=174

IDX=ISZ

PENP=115

R1=101

R2=102

SPRI=126
X10=10
X15=15
ATL=244
PDVL=252
EXCTTY=205		/(017)ADDR OF ASSEMBLED # OF TTY'S
	.IFUND	MA.NLU		/# OF MAPPED LUNS PER USER

MA.NLU=31

	.ENDC

/

/

/ MACRO TO DEFINE OFFSETS INTO THE USER CONTEXT AREA.

/

	.DEFIN UCAOFF

U.JSW=0				/OFFSET TO JOB STATUS WORD.

U.MAEV=1			/OFFSET TO EVENT VARIABLE

U.MAMTE=2			/OFFSET TO MARK TIME EVENT VARIABLE.

U.OEV=3				/OFFSET TO OVERLAY EVENT VARIABLE.

U.DSK=4				/OFFSET TO DISK NAME

U.DUN=5				/OFFSET TO DISK UNIT NUMBER

U.UFD=6				/OFFSET TO UFD NAME.

U.CTSK=7			/OFFSET TO CURRENT TASK NAME

U.PSC=11			/OFFSET TO PARTITION SELECTION CRITERIA.

U.ULOF=14			/OFFSET TO USER NUMBER AND LUN OFFSET.

U.TTYN=15			/OFFSET TO USER TERMINAL NUMBER.

U.TB=16				/OFFSET TO USER TERMINAL BUFFER.

U.CPB=62			/OFFSET TO MULTI-ACCESS CPB.

U.SSM=74			/SECONDS SINCE MIDNIGHT INTO STATE 11

				/ OR 12 (HUNG ON PARTITION)

U.TW=75				/TOTAL TIME IN SECONDS SPENT IN STATE 11

				/ OR 12.

U.OVID=76			/OVERLAY IDENTIFIER (LAST OVERLAY CALLED)

U.CKS=77			/CHECKSUM OF INPUT BUFFER FOR TIMED READ.

U.LEN=100			/LENGTH OF UCA.

	.DEFIN UCAOFF

	.ENDM

	.ENDM

/

	UCAOFF

/

	.GLOBL	ASSIGN,TDVTYP

/

/  LUNTAB IS WORK AREA TO COLLECT PDVL POINTERS FROM LUN'S

/

LUNTAB	.BLOCK	20	/(016) PLACE BEFORE BUFF TO HANDLE

/

/			/OVERFLOWS

/

BUFF	.BLOCK	400	/(016) DISK BUFFER

/

/  BOTH OF THESE AT BEGINNING BECAUSE OF ASSEMBLER FORWARD

/  REFERNCE ON LITERALS

/

/

/

ASSIGN	0		/CALL WITH UCA ADDRESS IN AC

	DAC	BREAK	/(015) BREAK AS TEMPORARY THRU .+15

	AAC	U.TB+2	/ADDR OF CHAR BUFFER

	DAC	FETCHP	/TO INIT FETCH ROUTINE

	LAC	(FETCH1	/REST OF FETCH INIT

	DAC	FETCHX

	LAC	(LUNTAB-1 /INTERNAL LUN STORAGE TABLE

	DAC*	(X10	/X10 TO PUSH ONTO TABLE

	DAC*	(X15	/(015)ANOTHER COPY FOR ASGWRK

	AND	(70000	/CONSTRUCT PAGE OFFSET

	DAC	MXADJ	/PAGE ADJUST XR BACK TO AC

	CMA!IAC

	DAC	XADJ	/PAGE ADJUST AC TO XR

	TAD	BREAK	/(015) ADJUSTED UCA ADDR

	PAX		/STAYS IN XR

	DAC	UCAXR	/WELL, AT LEAST MOST OF TIME, SAVE IT

	777000		/DESIRED BITS IN LEFT HALF

	AND	U.ULOF,X /LUN OFFSET FOR THIS USER

	SWHA

	AAC	-1	/OFF BY ONE MAGIC FOR LUT TABLE

	DAC	LUNOFF

	LAC	U.TTYN,X /TELETYPE NUMBER

	DAC	TTYNUM

FLUSHL	JMS	FETCHR	/(014) MOVE TO NEXT BLANK TO CONTINUE

	SAD	(40	/(014) BLANK

	JMP	ONWARD	/(014) YUP, DO REST OF TYPED LINE

	JMS	TERM	/(014) CHECK TERMINATE TO AVOID ENDLESS LOOP

	JMP	FLUSHL	/(014) NO TERMINATE, OK

/			/(016) TERMINATE GOES OUT AT NEXT ERR1

/

ONWARD	LAC	U.UFD,X /(013)DEFAULT UFD NAME IF DISK, NO <XYZ>

	DAC	UFDNAM	/(013)NON-DISK LATER ZEROS THIS

	DZM	OLDNAM	/(007)'NONE' IF NO SECOND DEVICE GIVEN

	LAC	LITSKP	/(014)DEFAULT SETTING IN CASE NO 2ND DEVICE

	DAC	DEFALT	/(011)IS GIVEN IN TYPEIN

REAN1	JMS	BLANKS	/TAKE OUT BLANKS UNTIL A NON-BLANK

	JMS	DECIML	/CONSTRUCT DECIMAL NUMBER FROM INPUT

	JMP	ERR1	/FIRST CHAR NOT DECIMAL

	DAC	BREAK	/SAVE BREAK CHAR FROM DECIMAL

	LACQ		/FETCH DECIMAL #

	AAC	-MA.NLU-1 /CHECK LEGAL RANGE, LINK=0

	TAD	(MA.NLU-1 /CARRY TO LINK IF LEGAL

	SNL!CLL		/SKIP IF OK, RESTORE LINK

	JMP	ERR4	/LUN OUT OF RANGE

	TAD	LUNOFF	/MAKE ACTUAL LUN -1

	TAD*	(LUN1	/TABLE ENTRY -1 FOR LUN

	DAC*	X10	/SAVE IN OUR STORAGE

	LAC	BREAK	/HOW DID DECIAML GET ENDED?

	SAD	(54	/COMMA?

	JMP	REAN1	/GO GET ANOTHER LUN

	SAD	(40	/BLANK?

	SKP!CLA!CMA	/(016) OK, SET UP -1

	JMP	ERR1	/(013) NOT A BLANK, ERROR

	DAC*	X10	/(016) TERMINATE WORKING LIST

	DAC	LUNTAB+17 /(016) TRUNCATE IF TOO LONG

	DAC	MESSET	/(016) DEFAULT MESSAGE, NONE

	JMS	BLANKS	/(013)

	JMS	GETDEV	/GET DEV, AND UNIT #

	DAC	UNIT	/(007)RETURN IF SYNTAX OK;# IN AC

	PLA		/DEVICE CODE FROM LIMIT REG.

	DAC	NEWPVD	/(015) NAME WITHOUT . APPENDED

	AAC	56	/MAKE XX. FROM XX

	DAC	REQNAM	/REQUESTED DEVICE NAME
	DAC	FIXNAM	/(018) AND CAL FOR FIX
	DAC	UFXNAM	/(018) AND CAL FOR UNFIX
	SAD	(222056	/CHECK FOR DISKS; RP?

	TAD	(3-222056 /REPLACE BY CODE, AND SET LINK FOR DISK

	SAD	(220656	/RF?

	TAD	(2-220656 /CODE OF 2 FOR RF

	SAD	(221356	/RK?

	TAD	(24-221356 /AND ITS CODE IS 24

	DAC	DEVICE	/(016) IF IT'S GOING TO BE A DISK

	DAC	ALLO+4	/(016) PLACE DEVICE IN DISK CAL'S

	LAC	BREAK	/(016) AND SET UP BREAK FOR CHECKING

	SZL!CLL		/(013)SKIP IF NON-DISK

	JMP	ITSDSK	/(013)IT'S A DISK GO CHECK FOR UFD

	DZM	UFDNAM	/(013)NON-DISK, THERE IS NO UFD

	JMP	JOIN	/(013)GO JOIN WITH DISK CASE

ITSDSK	SAD	(74	/IS IT A '<' TO START UFD NAME?	

	JMP	UFD	/(013) DO UFD, RETURN BREAK IN AC

JOIN	JMS	TERM	/(013)SKP IF A TERMINATOR

LITSKP	SKP		/(013)OK, GET OLD DEVICE

	JMP	NOSCND	/(010)TERM, SO DON'T PICK UP SECOND DEV

/

/ GET OLD DEVICE

/

OLDLUN	JMS	GETDEV	/PICK UP OLD LUN NAME

	DAC	OLDUNT	/(007)# IN AC;RETURN IF SYNTAX OK.

	PLA		/OLD UNIT TYPE

	DAC	OLDNAM

	LAC	LITNOP	/(016)2ND DEVICE GIVEN, CHANGE SWITCH

	DAC	DEFALT	/(011)

NOSCND	JMS	ASGWRK	/ROUTINE TO DO ASSIGN WORK

/

DONE	LAC	MESSET	/MESSAGE TO GO BACK

TYPMSG	DAC	MESSET	/(016) SET UP MESSAGE POINTER

	SMA		/(016) SKIP TYPING IF NO REAL MESSAGE

	JMS*	TDVTYP	/(016)

	LAC	TTYNUM	/(016) XCT'ED FROM TDVTYP; TTY #

	LAC	MESSET	/(016) XCT'ED FROM TDVTYP; BUFFER ADDR

	LAC	(2	/(016) XCT'ED FROM TDVTYP; I/O MODE ASCII

	LAC	UCAXR	/RESTORE XR TO POINT TO AREA

	PAX

	LAC	(6	/TASK STATE

	DAC	U.JSW,X	/

	CLA!IAC		/(016) DEFAULT STATE IF ALL OK

	ISZ	MESSET	/(016) SKIP IF NO MESSAGE

	LAC*	MESSET	/(016) MESSAGE, FETCH RETURN CODE

	DAC	U.OEV,X	/OVERLAY STATUS

	JMP*	ASSIGN	/OUT

/

	.TITLE *** CHARACTER AND SYNTAX SUBROUTINES ***

/

/

/	GETDEV - PICKS UP THE DEVICE AND UNIT NUMBER

/		THE DEVICE NAME IS RETURNED IN LIMIT AND THE

/		UNIT NUMBER IS IN THE AC

/		CALL WITH FIRST CHAR ALREADY IN AC, LINK=0

/		BREAKING CHAR RETURNED IN 'BREAK'

/

/		LEGAL BREAK CHAR'S ARE BLANK, <CR>,<ALT>,

/		AND '<', WHICH DELIMITS UFD NAME.

/		IF ILLEGAL BREAK GIVEN, CONTROL GOES TO

/		SYNTAX ERROR ROUTINE 'ERR1'

/

/		IN THE CASE OF A BLANK, CHAR'S ARE SCANNED UNTIL

/		THE NEXT NON-BLANK IS FOUND, !THAT! CHAR IS

/		RETURNED IN 'BREAK'.

/

GETDEV	0

	JMS	SIXLET	/VERIFY LETTER, AND RETURN SIXBIT

	LRS!CLQ!6	/INTO LEFT OF MQ

	JMS	FETCHR	/NEXT CHAR

	JMS	SIXLET	/VERIFY LETTER

	ALS	6	/THIS CHAR MIDDLE AC, LAST LEFT OF MQ

	OMQ		/COLLECT NAME  XX IN SIXBIT LEFT JUSTIFIED

LITNOP	PAL		/SAVE IN LIMIT

	XOR	(535376	/(016)MAKE LUNOFF -2 IF TELETYPE!

	DAC	LUNOFF	/(016) LUNOFF TEMPO USE  THIS ROUTINE

	JMS	FETCHR	/NEXT CHAR

	SAD	(116	/N  FROM NONE

	JMP	NONCHK	/GO CHECK FOR E

	JMS	DECIML	/MAKE UP A DECIMAL UNIT #

	IDX	LUNOFF	/(016) MAKE LUNOFF -1 IF TTY AND NO UNIT!

GETCHK	JMS	TERM	/(013)SKIP IF TERM, OK

	SAD	(74	/(013) IS IT A '<' ALSO OK

	JMP	GETOUT	/(013)EITHER, GO FINISH UP

	SAD	(40	/(007) BLANK IS OK

	SKP		/(007)GOT BLANK, SCAN FOR NON-BLANK

	JMP	ERR1	/(007) ILLEGAL TERMINATOR

	JMS	BLANKS	/(007) RETURNING NONBLANK IN AC
GETOUT	DAC	BREAK	/(007)SAVE BREAKING CHAR

	LAC	TTYNUM	/(016) IN CASE TTY AND NO UNIT

	ISZ	LUNOFF	/(016) SKIP IN THAT CASE, LEAVING UNIT IN AC

	JMP	GETREG	/(017)NOT TTNULL, DO REGULAR

	SAD*	(EXCTTY	/(017) BATCH USES FIRST ILLEGAL TTY NUM!

	SKP		/(017) IT IS BATCH, SET UP BD0

	JMP*	GETDEV	/(017) TTNULL, NOT BATCH, AC ALL SET!
	LAC	(20400	/(017) BD
	PAL		/(023) PUT HANDLER NAME IN LR.
GETREG	LACQ		/(017)BATCH; GET 0: OTHER; GET NUMBER

	JMP*	GETDEV

/

NONCHK	PLA		/HAVE TO ALREADY HAVE 'NO'

	SAD	(161700

	JMP	NONCH1	/YUP, KEEP GOING

	LAC	(116	/SET UP SYNTAX ERROR

	JMP	ERR1

NONCH1	JMS	FETCHR	/AND THE 'E

	SAD	(105

	SKP

	JMP	ERR1

	JMS	FETCHR	/AND THE BREAK

	CLQ		/NONE HAS 0 UNIT #

	CLLR		/AND 0 UNIT NAME

	JMP	GETCHK	/(007)CHECK BREAK CHAR

/

/

/  'FETCHR'

/

/  THIS ROUTINE IS CALLED TO FETCH EACH CHARACTER

/  CHARACTER IS RETURNED IN THE AC RIGHT JUSTIFIED, LINK=0.

/

/  MODIFIED REGISTERS, AC, LINK.

/

/  ANY CALLS MADE BEYOND THE TERMINATORS <CR> AND <ALT>

/  WILL AGAIN RETURN THE TERMINATOR.

/

IDX=ISZ			/NO ISZ GENERATED SKIPS HERE

/

/

FETCHR	0

	LAC*	FETCHP	/FIRST STEP OF ALL FETCHES

	JMP*	FETCHX	/GO TO APPROPRIATE ACTION

FETCHX	XX

	AND	(177	/STRIP TO 7 BITS

	JMS	TERM	/(013)SKIP IF TERMINATOR

FETCHY	SKP!CLL		/(013)CLEAR FOR SHIFTS, GO EXIT

	JMP	FETCHE	/SET UP TO RETURN TERMINATOR FOREVER

	JMP*	FETCHR	/RETURN CHAR IN AC

/

FETCHL	JMS	FETCHX	/END OF FIFTH, LEAVE POINTER FOR FIRST

/

FETCH1	SWHA		/CHAR 1, SHIFT DOWN 11 PLACES

	RTR		/CHAR POSITIONED

	JMS	FETCHX	/LEAVE POINTER TO SECOND ACTION

/

FETCH2	RTR		/MOVE SECOND CHAR DOWN 4

	RTR

	JMS	FETCHX	/LEAVING POINTER TO THIRD ACTION

/

FETCH3	RAR		/MOVE TOP HALF DOWN TO TOUCH BOTTOM

	IDX	FETCHP	/MOVE DATA POINTER TO NEXT

	XOR*	FETCHP	/DOUBLE XOR MERGE

	AND	(7	/KEEP ONLY THESE 3 BITS ORIG. AC

	XOR*	FETCHP	/OTHER FIFTEEN BITS FROM FETCHP

	RTL		/CHAR UP TO FINAL PLACE

	RTL

	JMS	FETCHX	/LEAVING POINTER FOR FOURTH

/

FETCH4	RAL

	SWHA

	JMS	FETCHX	/LEAVING FIFTH POINTER

/

FETCH5	RAR

	IDX	FETCHP	/MOVE TO NEXT ASCII PAIR

	JMP	FETCHL	/BACK TO TOP TO KEEP GOING

/

/

FETCHE	DAC	FETCHP	/SAVE TERMINATOR

	LAC	(FETCHZ	/VECTOR TO FETCH TERMINATOR

	DAC	FETCHX

FETCHZ	LAC	FETCHP	/POINTER NO LONGER POINTER, BUT TERMI.

	JMP	FETCHY	/USER EXPECTS LINK CLEARED

/

FETCHP	0		/(016)

/

/

/

/

/  SUBROUTINE DECIML

/

/  CALL WITH A CHAR IN AC, LINK=0

/

/  IMMEDIATE RETURN IF CHAR IN AC NOT A DECIMAL CHAR

/

/  IF CHAR IN AC IS DECIMAL, ASSEMBLE DECIMAL CONSTANT

/  IN MQ UNTIL A NON-DECIAML CHAR IS FOUND. EXIT (SKIP)

/  WITH BREAK CHAR IN AC, CONSTANT IN MQ, AND LINK 0.

/

DECIML	0

	CLQ		/INIT DECIMAL CONSTANT TO 0

	AAC	-72	/SET UP TO CHK RANGE

	TAD	DECRDX	/CARRY TO LINK IF OK

	SNL!CLL		/SKIP IF OK

	JMP	DECOUT	/NOT OK, JUST LEAVE

	ISZ	DECIML	/MAKE SKIP RETURN FOR OK

DECMOR	640122		/MUL 12*MQ+AC

DECRDX	12		/DECIMAL 10

	SZA		/SKIP UNLESS OVERFLOW

	JMP	ERR0	/ERR1, BUT GET ACHAR

	JMS	FETCHR	/GET NEXT CHAR

	AAC	-72	/RANGE CHECK

	TAD	DECRDX	/CARRY TO LINK IF DECIMAL

	SZL!CLL		/SKIP IF NOT OK

	JMP	DECMOR	/KEEP LOOPING

DECOUT	AAC	60	/RECONSTITUTE ASCII CHAR

	JMP*	DECIML	/OUT

/

/

/  ROUTINE BLANKS

/

/  SCAN THRU CHAR'S UNTIL FIRST NON-BLANK IS FOUND

/  RETURN CHAR IN AC, LINK=0

/

BLANKS	0

BLANKL	JMS	FETCHR	/NEXT

	SAD	(40	/MORE BLANKS, KEEP ON LOOPING

	JMP	BLANKL	/YUP

	JMP*	BLANKS

/

/  SUBROUTINE TERM

/

/  SKIP EXIT IF CHAR IN AC IS A TERMINATOR <CR>, OR <ALT>

/

/  NO REGISTERS MODIFIED

/

TERM	0

	SAD	(15	/(013) <CR>

	SKP		/(013) YES, GO TO SKIP EXIT

	SAD	(175	/(013)<ALT>

	IDX	TERM	/(013)MAKE SKIP EXIT

	JMP*	TERM	/(013) OUT

/

/

/ SUBROUTINE SIXLET

/

/  CALL WITH CHAR IN AC, LINK=0

/

/  RETURN WITH SIXBIT CHAR IN AC, LINK=0 ONLY IF

/  CHAR IS A LETTER, OTHERWISE GO TO ERR1

/

SIXLET	0

	AAC	-133	/RANGE CHECK

	TAD	(32	/CARRY TO LINK IF LETTER

	SZL!CLL!IAC	/MAKE SIXBIT IF LETTER

	JMP*	SIXLET	/RETURN SIXBIT IN AC

	AAC	100	/MAKE ASCII FOR ERROR MESSAGE

	JMP	ERR1

/

/  ROUTINE SIXALPH

/

/  CALL TO FETCH CHAR, LINK=0

/

/  RETURN WITH SIXBIT CHAR IN AC, LINK=0, ONLY IF

/  CHAR IS A LETTER OR DECIMAL NUMBER. OTHERWISE TO ERR1.

/

SIXALP	0

	JMS	FETCHR	/GET THE CHAR, LINK=0

	AAC	-133	/RANGE CHECK

	TAD	(32	/CARRY TO LINK IF LETTER

	AAC	7	/TO CHECK #'S

	TAD	DECRDX	/CARRY IF NUMBER

	AAC	60	/MAKE UP ORIGINAL

	SNL!CLL		/SKIP IF OK

	JMP	ERR1	/NOPE, SYNTAX MESSAGE

	AND	(77	/SIXBIT

	JMP*	SIXALP

/

/  SUBROUTINE UFD

/

/  CALL AFTER THE '<' HAS BEEN FOUND

/

/  MAKE UP THE SIXBIT UFD  (LETTERS AND NUMBERS ONLY)

/  FROM THREE SUCCESSIVE INPUT CHARS. PLACE UFD INTO UFDNAM.

/  THEN CHECK FOR '>'

/

/  RETURN FIRST NON BLANK AFTER '>' IN AC

/

/  ENTER WITH JMP, RETURN TO LOCATION JOIN

/

UFD	JMS	SIXALP	/FIRST CHAR

	LRS!CLQ!6	/#1 INTO LEFT OF MQ

	JMS	SIXALP	/SECOND

	ALS	6	/1 IS LEFT OF MQ;2 IN MIDDLE OF AC

	642000		/OR AC TO MQ

	JMS	SIXALP	/THIRD

	OMQ		/PUT TOGETHER IN AC

	DAC	UFDNAM

	JMS	FETCHR	/NOW CHECK ON '>'

	SAD	(76

	SKP		/(013)SCAN FOR NEXT NON-BLANK

	JMP	ERR1	/WHOOOPS

	JMS	BLANKS	/(013)FIRST NON-BLANK INTO AC

	JMP	JOIN	/(016)

/

/ SUBROUTINE SETXR -- ADJUST THE XR

/

SETXR	0

	TAD	XADJ

	PAX

	JMP*	SETXR

/

/

	.TITLE *** ASSIGN WORKING ROUTINE ***

/

/  INPUT ARGUMENTS FOR ASGWRK

/

OLDNAM	0		/OLD DEVICE NAME

OLDUNT=FETCHP		/OLD UNIT #, ONLY TO VERIFY, NO USE

UNIT	0		/NEW UNIT NUMBER

UFDNAM	0		/NEW UFD NAME

DEFALT	0		/(011)NOP IF 2ND DEVICE GIVEN; SKP IF NOT

NEWPVD	0		/(015)NEW NAME (NO .) PROVIDED HERE

/

/  NEW DEVICE NAME IS ALSO IN A CAL UNDER NAME 'REQNAM'

/  THE DEVICE NAME HAS A '.' APPENDED TO IT

/

/  X15 IS SET UP TO FETCH FROM THE LIST LUNTAB

/  THE LUNTAB LIST IS TERMINATED WITH A -1 WORD

/

/  THE LUNTAB LIST IS IN FRONT OF THE BUFFER TO HANDLE

/  OVERFLOWS CLEANLY

/

/

/  WORK REGISTERS FOR ASGWRK

/

TMPA=DECIML		/(015)UNUSED LOCATIONS AT THIS TIME

TMPB=BLANKS

TMPC=FETCHX

/

/
/
ASGWRK	0

	LAC*	LUNTAB	/(014) PDVL POINTER FOR FIRST LUN

	SZA		/CHECK FOR NONE

	JMP	NOTNON	/NO MUST BE OK

	SAD	OLDNAM

	JMP	LUNCKK

	JMP	ERR2

NOTNON	JMS	SETXR	/(007) USE XR TO CHECK OLD DEV,#
	LAC	2,X	/(007)NAME CHECK
	XCT	DEFALT	/(011)IF NO 2ND GIVEN, DISABLE COMPARE

	SAD	OLDNAM	/(007)

	SKP		/(007)SAME, OK

	JMP	ERR2	/(007)NOPE, ERROR
	LAC	5,X	/(007) NUMBER

	XCT	DEFALT	/(011)MISS THE SAD IF NO 2ND DEVICE GIVEN.

	SAD	OLDUNT	/(016) MATCH CHECK ON OLD UNIT

	SKP		/(007)SAME, OK

	JMP	ERR3	/(007)

/			/(012) QUEUE EMPTY CHECK REMOVED.

	LAC	10,X	/(007)HANDLER INIT'ED

	SNA		/(014) SKIP IF HAS BEEN

	JMP	ERR710	/(014) ERRORS 7 & 10
LUNCKK	LAC*	X15	/ZXCV/(015) FETCH NEXT LUN TABLE POINTER

	DAC	TMPA	/(016) DEPOSIT BEFORE CHECK; CONVENIENCE

	SPA!CLA		/(016) SKIP IF NOT DONE

	JMP	LUNCKD	/(015) LOOP THRU
	LAC*	TMPA	/LOOK AT THE ADDRESSES OF THE PDVL NODES
	XCT	DEFALT	/(022) IF NO SECOND GIVEN, COMPARE WORKS
	SAD*	LUNTAB	/(016) TO SEE IF ALL THE SAME

	JMP	LUNCKK	/OK, GO CHECK OUT NEXT

	JMP	ERR4	/NO INCORRECT ASSIGNMENT

LUNCKD	SAD	NEWPVD	/(015) IS NEW NAME NONE

	JMP	SETUP	/(015)YES, SKIP SOME WORK

	LAC*	(PDVL)

PVDLSR	DAC	NEWPVD	/(015) IN CASE THIS IS IT, HERE'S ADDR

	JMS	SETXR
	LAC	2,X

	AAC	56	/(016) COMPARE ON REQNAM, NEWPDV IS CHAGED

	SAD	REQNAM	/(016) SAME DEVICE

	JMP	FNDNAM

NOTUNT	LAC	0,X	/PICK UP NEXT POINTER TO PVDL TABLE

	SAD	(PDVL)

	JMP	ERR2

	JMP	PVDLSR	/SEARCH NEXT NODE
FNDNAM	LAC	5,X	/PICK UP UNIT NUMBER
	SAD	UNIT	/IS IT THE CORRECT ONE?
	SKP
	JMP	NOTUNT	/NO TRY AGAIN
	LAC	11,X	/IS REASSIGN INHIBITED?
	SPA!CLA		/(014) ZERO AC IF GO TO ERR7
	JMP	ERR7	/YES ISSUE ERROR MESSAGE
	LAC	UFDNAM	/IS A DISK THE NEW DEVICE?
	SZA
	JMS	MFD	/YES -- GO CHECK THE MFD FOR UFD
	LAC	NEWPVD	/(025) TRIGGER ALREADY SET FOR HANDLER
	JMS	SETXR	/(025) INDEX TO GET TO TRIGGER IN NODE
	LAC	10,X	/(025) TRIGGER
	SZA		/(025) SKIP IF NOT YET SET
	JMP	SETUP	/(025) SET UP ALREADY; GO ASSIGN
	CAL	FIX	/(018) TASK TO CORE POSSIBLE?

	LAC	EV	/(018) NO WIAT NECESSARY

	SAD	(-202	/(018) ALREADY ACTIVE

	JMP	SETUP	/(018) YUP, ALL SET

	SAD	(-207	/(018) ALREADY FIXED?!?

	JMP	SCNATL	/(018) SCAN ATL TIL CLEARS

	SPA		/(018) POSITIVE IS OK

	JMP	ERR13	/(018) CAN'T INIT HANDLER

SCNATL	.INH		/(018) SCAN ATL FOR HANDLER NAME

FIX0	LAC*	(ATL	/(018) ADDR OF FIRST NODE

FIX1	DAC	TMPA	/(018) SAVE

	SAD	(ATL	/(018) DONE SCANNING

	JMP	REQTSK	/(018) YES, GO REQ HANDLER

	IAC		/(018) TO SET UP AUTO-INCR FOR NAME

	DAC*	(X10	/(018)

	LAC*	X10	/(018) FIRST HALF OF NAME IN ATL

	SAD	REQNAM	/(018) THE ONE WE'RE SEARCHING

	SKP

	JMP	FIX2	/(018) MISSED, TO NEXT NODE

	LAC*	X10	/(018) SECOND HALF

	SAD	REQNAM+1 /(018)

	JMP	FIXWAT	/(018) STILL THERE, WAIT AND TRY AGAIN

FIX2	LAC*	TMPA	/(018) FORWARD POINTER FROM NODE

	.ENB		/(018 SYSTEM BACK IN AFTER DAC

	DAC	TMPB	/(018)

/

/  SYSTEM BACK IN HERE IF ANYONE OF GREATER IMPORATANCE

/  HAS BEEN WAITING

/

	.INH		/(018) NOW SYSTEM OURS AGAIN

	LAC*	TMPA	/(018) DID NODES IN QUESTION MOVE

	SAD	TMPB	/(018)

	JMP	FIX1	/(018) NOPE, CONTINUE

	JMP	FIX0	/(018) YES, START AGAIN AT TOP!!!!

/

FIXWAT	.ENB		/(018) SYSTEM BACK IN
	CAL	(5	/(018) WAIT FOR ANY SIGN EVENT
	JMP	SCNATL	/(018) DO ATL AGAIN
REQTSK	.ENB		/(018) SYSTEM BACK IN
	CAL	REQCPB	/REQUEST DEVICE TASK
	CAL	UNFIX	/(018) UNFIX IT
	LAW	-13	/(021) TIMOUT LOOP CONTROL
	DAC	TMPA	/(021) 
IDLE	LAC	NEWPVD	/(020) IF HANDER CAME IN, THE TRIGGER IS SET
	JMS	SETXR	/(020) TO GET TO 10,X THE TRIGGER ADDR
	LAC	10,X	/(020) HERE'S TRIGGER
	SZA		/(021) SKIP IF STILL NOT SET
	JMP	SETUP	/(021) TRIGGER SET UP, READY TO ASSIGN
	ISZ	TMPA	/(021) CYLCED ENOUGH TIMES?
	SKP		/(021) NOT YET
	JMP	ERR14	/(022) UNFIX AND ERROR, HANDLER DIDN'T TRIGGR
	CAL	TIMIT	/(021) WAIT 1/10 SEC FOR PIREX TO RESPOND
	CAL	WAIT	/(021)
	JMP	IDLE	/(021) TRIGGER SET YET?
/
SETUP	LAC	(LUNTAB-1 /(016) USE X15 TO SCAN WORKING LIST

	DAC*	(X15
SETUPL	LAC*	X15	/PICK UP THE LUNT TABLE POINTER

	SPA		/(016) DONE?
	JMP*	ASGWRK	/(022) EXIT FROM HERE WHEN LIST EMPTY (-1 MARK)

	DAC	TMPA

	LAC*	(LUN1)

	TCA

	TAD	TMPA	/(014) STORE BOTH TOGETHER!

	DAC	TMPC	/(015)

	TAD*	(AFTP1)	/FIND THE  AFT TABLE POINTER

	DAC	TMPB

	LAC	TMPC	/(015)

	TAD*	(LUFD1	/(015)LUN-UFD POINTER

	DAC	TMPC

	.INH		/(016) NOT SURE IS NEEDED

	LAC*	TMPB	/PICK UP THE DEVICE ATTACHED FLAG

	SNA

	JMP	NOTATT	/NOT ATTACHED TO THE DEVICE OK

	LAC	(MES9	/SET UP TO RETURN A MESSAGE
	DAC	MESSET	/(007)BUT ONLY A WARNING
NOTATT	LAC*	TMPA	/(022) OLD ASSIGNMENT
	DAC	TMPB	/(022) SAVE FOR DEASSGIN-EXIT LOGIC
	LAC	NEWPVD	/(015) NEW ASSIGNMENT

	DAC*	TMPA	/PUT IT IN THE TABLE

	LAC	UFDNAM	/ENTER UFD NAME IN LUN-UFD TABLE

	.ENB		/(016) LET SYSTEM BACK IN AGAIN
	DAC*	TMPC
	LAC	TMPB	/(022) OLD ASSIGNMENT NONE?
	SNA		/(022) SKIP IF NOT
	JMP	SETUPL	/(022) NONE, DON'T CHECK  DEASSIGN-EXIT 
	JMS	SETXR	/(022) NAME FOR OLD ASSIGNMENT
	LAC	2,X	/(022)
	DAC	TMPB	/(022) SAVEIT
	LAW	-1	/(022) SET UP X10 TO SCAN LUN'S
	TAD*	(LUN1	/(014) SET UP X10 TO SCAN ALL LUN'S
	DAC*	(X10	/(014)
	LAC	(400002	/(022) RAISE TO LEVEL 6 TO PREVENT
	ISA		/(022) CONFLICT ON LUN SCAN
NXTNOD	LAC*	X10	/(014) PDVL ADDR NEXT

	AAC	2	/POINT TO PDVL NAME

	DAC	TMPC	/(015) USE THRU .+2
	LAC	TMPB	/(022)LOOK FOR A NAME MATCH

	SAD*	TMPC	/(015)
	JMP	OUT	/(022) ASSIGNMENT FOUND; TO SETUPL VIA A DBK
	LAC*	(X10	/(014) END OF LOOP CHECK
	SAD*	(LUN2)	/ARE WE AT THE END OF THE TABLE ?
	SKP		/(022) END, SKIP OUT OF LOOP
	JMP	NXTNOD	/NO TRY ANOTHER ENTRY
	LAC*	(PDVL)

NXTND	JMS	SETXR	/(014)SET UP XR

	LAC	2,X	/PICK UP THE DEVICE NAME
	SAD	TMPB	/(022)IS IT THE OLD NAME?
	SKP		/(022) YES, SET ASSIGN INHIBIT FLAG
	JMP	NOASGN	/NO DON'T FLAG IT
	PXL		/SAVE LAST NODE ADDRESS
	LAC	11,X	/SET REASSIGN INHIBIT FLAG
	RAL!STL		/(022) GUARANTEED BY EAG
	RAR		/(022) IOR'S 400000 TO AC
	DAC	11,X	/RESTORE WORD

	LAC	10,X	/SAVE TRIGGER EVENT VARIABLE ADDRESS

	DAC	TMPA	/(015)HAS TRIGGER ADDR THRU END

	DZM	10,X	/CLEAR THE TRIGGER EVENT VARIABLE ADDRESS

NOASGN	LAC	0,X	/IS THIS THE END OF THE TABLE?

	SAD	(PDVL)

	JMP	EXNOD	/YES EXIT

	JMP	NXTND	/SEARCH NEXT NODE

EXNOD	JMS*	(PENP)	/PICK UP A NODE FOR 777 REQUEST

	JMP	ERR56	/EMPTY POOL ERROR AC=240!

	DAC*	(R2)	/SAVE NODE ADDRESS FOR SPRI

	JMS	SETXR

	LAC*	(CURTSK)

	AAC	6	/FIND A GOOD STL NODE ADDRESS

	DAC	TMPC	/(015)TEMPORARY THRU .+1

	LAC*	TMPC	/(015)

	DAC	2,X

	DZM	3,X	/CLEAR UNUSED WORDS

	DZM	7,X

	DZM	10,X

	DZM	11,X

	LAC	(1002)	/SET PRIORITY TO 514

	DAC	4,X

	AAC	-3

	DAC	5,X	/SET REQUEST TYPE TO 777

	DZM	6,X	/CLEAR EVENT VARIABLE ADDRESS

	PLA		/PICK UP LAST NODE FOUND FOR 777 REQUEST

	TAD	MXADJ	/SUBTRACT PAGE BITS

	AAC	6	/POINT TO THE QUEUE

	DAC*	(R1)

	JMS*	(SPRI)	/PUT NODE IN REQUEST QUEUE
	DBK		/(022)DEBREAK FORM LEVEL 6

	LAC	(401000)	/SET SIGNIFICANT EVENT

	ISA

	.INH		/INHIBIT INTERRUPTS

	LAC*	TMPA	/(015) FETCH TRIGGER

	AND	(377776)	/MASK OFF BITS

	XOR	(400001)	/SET Q I/O

	.ENB		/ENABLE INTERRUPTS

	DAC*	TMPA	/(015)
	JMP	SETUPL	/(022) NEXT LUN TYPED IN
/
OUT	DBK		/(022) OUT OF LEVEL 6 TO GO BACK TO LOOP
	JMP	SETUPL	/(022)

	.TITLE	*** DISK ROUTINES ***

/

/  ALL DISK ROUTINES REWRITTEN FOR SPACE (014)

/

SAVXR=TERM		/SAVE XR THRU CAL

LSTBLK=SIXLET		/LAST BLOCK # OF MFD

NEWBLK=SIXALP		/NEWLY ALLOCATED BLOCK #

/

/

/ SUBROUTINE MFD -- MAKE SURE AN MFD ENTRY EXISTS FOR A UFD AND THAT

/                   THE UFD IS PROPERLY INITIALIZED.

/

/ ENTER WITH AC CONTAINING SIXBT NAME OF UFD AND 

/ UNIT CONTAINING THE UNIT NUMBER AND

/ DEVICE CONTAINING THE DEVICE CODE.

/

/ RETURN AT JMS+1 UNLESS AN ERROR IS DETECTED

/

/ ALL REGISTERS ARE MODIFIED

/

MFD	0

	JMS	MFDSCN		/SCAN THE MFD FOR THE UFD

	JMP	UFDFND		/RETURN HERE IF FOUND

	CLA			/RETURN HERE IF NOT, LOOK FOR FREE ENTRY

	JMS	MFDSCN		/WAS A FREE MFD ENTRY FOUND?

	JMP	ENTER		/MAKE UFD

	JMS	ALLBLK		/ALLOCATE A BLOCK FOR ADDTNL MFD BLOCK

	DAC	BUFF+377	/NEW # IN AC, FORWRD POINT

	LAC	LSTBLK		/WRITE OUT OLD BLOCK

	JMS	MFDPUT

	JMS	CLEAR		/CLEAR BUFFER TO MAKE NEW MFD BLOCK

	LAC	LSTBLK		/BAKWARD POINTER

	DAC	BUFF+376

	LAC	NEWBLK		/LATEST MFD BLOCK

	DAC	LSTBLK		/IT IS NOW THE END

	DZM	SAVXR		/POSITION IN BLOCK FOR UFD ENTRY

	JMP	ENTER1		/JOIN OTHER CODE

/

UFDFND	LAC	BUFF+1,X	/RELATIVE ENTRY POSITION IN XR

	SAD	LITM1		/-1 SYAS ENTRY NOT YET SETUP

	SKP

	JMP*	MFD		/ENTRY THERE, NO WORK TO DO

ENTER	PXA			/SAVE RELATIVE POTITION THRU CAL

	DAC	SAVXR

ENTER1	JMS	ALLBLK		/BLOCK FOR UFD ENTRY

	LAC	SAVXR		/SET UP XR TO POINT TO ENTRY IN MFD

	PAX

	LAC	NEWBLK		/UFD BLOCK #

	DAC	BUFF+1,X	/SET IN MFD

	LAC	UFDNAM		/UFD NAME

	DAC	BUFF,X		/INTO MFD

	LAC	(400010		/BOOKKEEPING BITS

	DAC	BUFF+2,X

	LAC	LSTBLK		/WRITE OUT NEW MFD ENTRY

	JMS	MFDPUT

	JMS	CLEAR		/CLEAR UFD BLOCK

	LAC	NEWBLK

	JMS	MFDPUT		/AND PUT IT OUT

	JMP*	MFD		/DONE

/

/ SUBROUTINE MFDSCN -- SCAN MFD FOR A UFD NAME

/

/ ENTER WITH AC CONTAINING UFD NAME AND

/ UNIT CONTAINING UNIT NUMBER AND

/ DEVICE CONTAINING DEVICE CODE

/

/ RETURN AT JMS+1 IF FOUND WITH LSTBLK=MFD BLK NO. AND XR POINTING

/ TO RELATIVE POSITION IN BUFF TO FOUND ENTRY SLOT

/ RETURN AT JMS+2 IF NOT FOUND WITH LSTBLK=LAST MFD BLK

/

/ ALL REGISTERS ARE MODIFIED

/

MFDSCN	0

	DAC	SAVXR		/(015) SAVE NAME THRU .+13

	LAW	-3		/WHICH DISK - WHICH MFD BLOCK

	TAD	DEVICE		/MAKE 0 FOR RP

	SNA!CLA			/SKIP ON RF, RK

	TAD	(47040-1777	/RP, MAKE ANSWER 47040

	TAD	(1777		/RF AND RK MAKE ANSWER 1777

MFDS4	DAC	LSTBLK		/LAST BLOCK THAT HAS BEEN REFERENCED

	JMS	MFDGET		/READ IN MFD BLK

	LAC	(374		/(016) USE LAST SLOT !!!

	PAL

	CLX

	LAC	SAVXR		/(015) NAME MATCH WITH THIS

MFDSL	SAD	BUFF,X		/THIS ONE?

	JMP*	MFDSCN		/XR SET, LSTBLK SET UP, RETURN

	AXS	4		/NEXT ENTRY

	JMP	MFDSL

MFDS3	LAC	BUFF+377	/GET NO. OF NEXT MFD BLK

	SAD	LITM1		/END OF MFD?

	SKP

	JMP	MFDS4		/NO -- PREPARE TO READIN NEXT BLK

	IDX	MFDSCN		/YES -- PREPARE TO RET. AT JMS+2

	JMP*	MFDSCN		/RETURN

/

/

/ SUBROUTINE ALLBLK -- ALLOCATE A DISK BLOCK

/

/ ENTER WITH DEVICE AND UNIT SET UP

/

/ RETURN AT JMS+1 WITH AC CONTAING BLK NO.

/

/ ALL REGISTERS ARE MODIFIED

/

/  BLOCK # PLACED INTO AC AND NEWBLK

/

/

ALLBLK	0

	LAC	UNIT

	ALSS	17

	DAC	ACTA+1

	CAL	ALLO		/ALLOCATE A DISK BLOCK

	CAL	WAIT

	LAC	EV		/WHERE THERE ANY ERROR?

	SPA!CLL!CLA

	JMP	ERR121		/YES

	LAC	ACTA+2		/NO -- DETERMINE BLK NO.

	LMQ

	LAC	ACTA+1

	LLS	12		/BLOCK # TO AC

	DAC	NEWBLK

	JMP*	ALLBLK

/

/

/  SUBROUTINE CLEAR

/

/ CLEAR OUT BUFF TO ZEROS EXCEPT FORWARD AND

/  BACKWARD POINTERS TO -1

/

/  AC AND XR AND LR MODIFIED

/

CLEAR	0

LITM1	-1		/ALSO A LITERAL

	DAC	BUFF+376	/POINTERS

	DAC	BUFF+377

	AAC	377		/376 FOR LR CONTROL

	PAL

	CLX

CLEARL	DZM	BUFF,X

	AXS	1

	JMP	CLEARL

	JMP*	CLEAR

/

/

/  ROUTINE  MFDPUT

/

/  CALL WITH BLOCK # IN AC

/

/  ROUTINE FINISHES IN COMMON WITH MFDGET

/

MFDPUT	0

	LMQ		/SAVE BLOCK #

	LAC	MFDPUT	/SET UP RETURN

	DAC	MFDGET

	LAC	(502532	/SET UP VARIABLE ERROR TEXTIN CASE ERROR

	DAC	ERRDSK

	LAC	(13100	/CAL CODE

	JMP	MFDBTH	/JOIN UP

/

/ SUBROUTINE MFDGET -- GET A DISK BLOCK

/

/ ENTER WITH BLK NO IN AC

/

/

/ ALL REG. ARE MOD

/

MFDGET	0

	LMQ		/SAVE BLOCK #

	LAC	(436132	/VARIABLE PART OF ERROR MESSAGE

	DAC	ERRDSK

	LAC	(13000	/CAL CODE FOR COMMON CAL

MFDBTH	DAC	GETPUT	/PLACE IN CAL

	LAC	UNIT	/SET UP CONTROL TABLE

	ALSS	7	/UNIT RELATIVE POSITION TO #

	LLS	10	/AC HAS FIRST WORD

	DAC	GPCTA	/FOR CONTROL TABLE

	LACQ

	DAC	GPCTA+1 /AND MQ HAS THE SECOND WORD

	CAL	GETPUT	/COMON, EITHER GET OR PUT

	CAL	WAIT

	LAC	EV

	SMA		/SKIP ON ERROR

	JMP*	MFDGET

	JMP	ERR12	/SET UP TO DO DISK ERROR

/

	.TITLE	*** STORAGE, CAL'S, MESSAGES, BUFFER, ETC. ***

/
REQCPB	1
	0		/(021) NO EV CHECKED

REQNAM	0

	.SIXBT	"..."

	0

/

GETPUT	13000

	EV

	1

	GPCTA

DEVICE	XX

GPCTA	0

	0

	BUFF

	400

ALLO	11500

	EV

	1

	ACTA

	XX

ACTA	400

	XX

	XX

WAIT	20

	EV

/

FIX	15		/(019) FIX HANDLER

	EV

FIXNAM	XX		/(019) PLACE NAME AT RUN TIME

	.SIXBT	"..."

/

UNFIX	16		/(019) UNFIX AFTER TEST

	0
UFXNAM	XX
	.SIXBT	"..."
TIMIT	13		/(020) MARK FOR 1/10 SEC
	EV
	6		/(021) 6 TICKS
	1		/(021) TYPE IS TICKS
/
EV=GETDEV		/UNUSED AT DISK TIME

/

ERR0	JMS	FETCHR	/CHAR TO ERROR ON

ERR1	CLL!RAL		/PLACE OFFENDING CHAR IN MESSAGE

	TAD	(23400	/(007)REST OF WORD OF ASCII

	DAC	BAK

	LAC	(MES1)

	JMP	TYPMSG

ERR2	LAC	(422132	/(014) 'DEV' FOR VARIABLE PART OF MESSAGE

	SKP

ERR3	LAC	(202351	/(014) ' NN' FOR VARIABLE PART

	SKP

ERR4	LAC	(462531	/(014) 'LUN' FOR VARIABLE PART 

	DAC	WHAT	/(014) PLACE IN MESSAGE

	LAC	(MES2	/(014) MEWSAGE ADDR

	JMP	TYPMSG

/

ERR56	AAC	-201	/(014) ENTER WITH EV (+) OR 240 IN AC

	SNA!CLA		/(014) SKIP ON NO POOL!

	AAC	MES6-MES5

	TAD	(MES5

	JMP	TYPMSG

ERR710	LAC	11,X	/(014)SORT ERRORS

	SMA!CLA

	AAC	MES10-MES7 /(014) NO HANDLER

ERR7	TAD	(MES7	/(014) ASSIGN INHIBIT

	JMP	TYPMSG
ERR121	LAC	(462072	/(016) 'LCT' FOR ALLOCATE

	DAC	ERRDSK
ERR12	LAC	(MES12
	JMP	TYPMSG
ERR14	CAL	UNFIX	/(022) UNFIX THE FIXED HANDLER
ERR13	LAC	(MES13	/(018)
	JMP	TYPMSG	/(018)

/

XADJ	0

MXADJ	0

UCAXR	0

LUNOFF=CLEAR		/(016) UNUSED AT DATA COLLECT TIME

BREAK=ALLBLK		/(016) UNUSED AT DATA COLLECT TIME

/

MES1	MES2-MES1/2*1000+2

	-1		/OVERLAY STATUS CODE

	.ASCII	"ASG-SYNTAX ERR AT ' '"<15>

BAK=MES1+11		/(015) FILL IN CHAR IN ERROR

MESSET=MES1+13		/(015) EMPTY SLOT, USE FOR WORK LOCATION

MES2	MES5-MES2/2*1000+2

	-2

	.ASCII	"ASG-WRONG DEV"<15>

WHAT=MES2+6		/(015) 'DEV' , 'LUN' , ' NN'

MES5	MES6-MES5/2*1000+2

	-5

	.ASCII	"ASG-EMPTY POOL"<15>

MES6	MES7-MES6/2*1000+2

	-6

	.ASCII	"ASG-HANDLER TASK NOT IN SYSTEM"<15>

TTYNUM=MES6+17		/(015) EMPTY SLOT, USE IT

MES7	MES9-MES7/2*1000+2

	-7

	.ASCII	"ASG-REASSIGN INHIBITED"<15>

MES9	MES10-MES9/2*1000+2

	11

	.ASCII	"ASG-WARNING: DEVICE ATTACHED"<15>

MES10	MES12-MES10/2*1000+2

	-12

	.ASCII	"ASG-OLD DEV NOT YET IN CORE"<15>

MES12	MES13-MES12/2*1000+2

	-14

	.ASCII	"ASG-DISK  PUT ERROR"<15>

/			/(008) 'PUT' MAY BE REPLACED BY 'GET'

/			/(008) OR 'LCT'

/

ERRDSK=MES12+6
MES13	ENDMSG-MES13/2*1000+2
	-15
	.ASCII	"ASG-HANDLER CAN'T INIT"<15>

/

ENDMSG=.

/

/

	.END
