
	.TITLE *** REMOVE MCR FUNCTION ***

/

/ 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 #000	6/23/76	SCR	CREATE IT

/ TASK NAME  "...SHU"   TO SHUT DOWN MULTI-ACCESS ...TDV.

/

/ THE FIRST LINE OF THE COMMAND INPUT FOR ANY MCR

/ FUNCTION IS READ BY THE RESIDENT MCR TASK ("...MCR").

/ FOR THE "SHUT" FUNCTION, THERE IS ONLY ONE LINE OF
/ COMMAND INPUT, AND IT'S SYNTAX IS AS FOLLOWS:

/
/	SYNTAX = 'SHU'<ANY STRING><EOL>

/	<EOL> IS CARRIAGE RETURN OR ALT MODE

/
/	THE RESIDENT MCR READS A LINE, FETCHES THE
/	FIRST THREE CHARACTERS TO FORM THE MCR FUNCTION TASK

/	NAME ("...SHU"), FLUSHES CHARACTERS THRU THE FIRST

/	BREAK CHARACTER, REQUESTS "...SHU", AND EXITS

/	TEH TASK "...SHU" REQUIRES NO FURTHER INPUT

/

/	IF THE COMMAND INPUT LINE IS TERMINATED BY A CAR RTN,
/	THE RESIDENT MCR TASK IS REQUESTED, AND THE FUNCTION TASK

/	EXITS.

/
/	IF THE COMMAND INPUT LINE IS TERMINATED BY AN ALTMODE, THE
/	FUNCTION TASK EXITS WITHOUT REQUESTING "...MCR". A ^C TYPEIN
/	IS THEN NECESSARY TO RE-ESTABLISH MCR DIALOGUE.
/
MCRRI=171
BCV=147
FAC=174
MA.UCA=221
MA.CST=230
SHUT	LAC*	(BCV	/IS BATCH RUNNING
	SZA		/SKIP IF NOT
	JMP	BATERR	/DON'T HONOR SHUT, BATCH IS ACTIVE
	LAC*	(MA.CST	/CONTAINS ADDR OF SHUT-DOWN FLAG
	DAC	T	/FOR INDIRECTION
	LAC*	(MA.UCA	/IS MULTIACCESS RUNNING
	SZA!CLA!IAC	/SKIP IF NOT
	DAC*	T	/YES, SET ITS SHUT DOWN FLAG
SHUTL	JMS*	(FAC	/LOOK FOR TERMINATOR
	SAD	(15	/CARRIAGE RETURN
	JMP	END1	/YUP, REQ MCR
	SAD	(175	/ALT MODE
	JMP	END2	/ZERO MCRR1
	JMP	SHUTL	/KEEP LOOKING FOR STOP CHAR
END1	CAL	REQMCR	/REQUEST MCR TASK
	CAL	(10)	/RETURN
END2	DZM*	(MCRRI	/TURN OFF CONTROL C FLAG
	CAL	(10	/OUT
/
BATERR	CAL	MSG	/TYPE OUT ERROR MSG
	CAL	WAIT	/WAIT FOR COMPLETION
	JMP	SHUTL	/JOIN EXIT CODE
REQMCR	1		/CALL MCR DIRECTIVE
	0
	.SIXBT	"..."
	.SIXBT	"MCR"
	0
T	0		/TEMPORARY
EV	0
WAIT	20
	EV
/
MSG	2700		/WRITE
	EV		/EVENT VARIABLE
	3		/LUN
	2		/ASCII
	BUFF		/BUFFER FOR MSG
/
BUFF	ENDMSG-.*400+2	/HEADER
	0
	.ASCII	'SHU - BATCH ACTIVE'<15>
ENDMSG=.
	.END	SHUT
