/ 
/ 
/                   FIRST PRINTING, FEBRUARY 1974
/ 
/ THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO 
/ CHANGE WITHOUT NOTICE AND SHOULD NOT BE CONSTRUED
/ AS A COMMITMENT BY DIGITAL EQUIPMENT CORPORATION.
/ DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPON-
/ SIBILITY FOR ANY ERRORS THAT MAY APPEAR IN THIS
/ DOCUMENT.
/ 
/ THE SOFTWARE DESCRIBED IN THIS DOCUMENT IS FUR-
/ NISHED TO THE PURCHASER UNDER A LICENSE FOR USE ON
/ A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH
/ INCLUSION OF DIGITAL'S COPYRIGHT NOTICE) ONLY FOR 
/ USE IN SUCH SYSTEM, EXCEPT AS MAY OTHERWISE BE PRO-
/ VIDED IN WRITING BY DIGITAL.
/ 
/ DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPONSIBILITY
/ FOR THE USE OR RELIABILITY OF ITS SOFTWARE ON EQUIP-
/ MENT THAT IS NOT SUPPLIED BY DIGITAL.
/ 
/ COPYRIGHT (C) 1974, BY DIGITAL EQUIPMENT CORPORATION
/ 
/ 
        .EJECT
/ EDIT #5
/
/ COPYRIGHT 1970, 1971, 1972, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
/
/ MCR FUNCTION -- DISABLE	1 MAY 72	R. MCLEAN
/
/ TASK NAME  "...DIS"   TO DISABLE A TASK .
/
/ THE FIRST LINE OF THE COMMAND INPUT FOR ANY MCR
/ FUNCTION IS READ BY THE RESIDENT MCR TASK ("...MCR").
/ FOR THE "DISABLE" FUNCTION, THERE IS ONLY ONE LINE OF
/ COMMAND INPUT, AND IT'S SYNTAX IS AS FOLLOWS:
/
/	SYNTAX = 'DIS'$<NBC><BREAK CHARACTER><TASK NAME>
/		(<CR>/<AM>)
/	<BREAK CHAR> = " "/","
/	<TASK NAME> = 1-6 ALPHANUMERIC CHARACTERS
/	<CR> = CAR RTN
/	<AM> = ALTMODE
/	<NBC> = NON BREAK CHARACTER
/	$ -- " ANY NUMBER OF "INCLUDING ZERO "
/
/	THE RESIDENT MCR READS A LINE, FETCHES THE
/	FIRST THREE CHARACTERS TO FORM THE MCR FUNCTION TASK
/	NAME ("...DIS"), FLUSHES CHARACTERS THRU THE FIRST
/	BREAK CHARACTER, REQUESTS "...DIS", AND EXITS
/	THE TASK "...DIS " PROCESSES THE REMAINDER OF THE LINE
/	AND IF THE REQUEST IS VALID, ISSUES AN APPROPRIATE "DISABLE"
/	DIRECTIVE.
/
/	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.
 .TITLE *** MCR FUNCTION 'DISABLE'
/
MCRRI=171
FAC=174
X10=10
/
DIS	LAW	-7	/SET UP TO FETCH TASK NAME AND STORE
	DAC	CNT	/SIX CHARACTERS (ZERO RIGHT FILL) IN
	LAC	(DISCPB+1)	/DISABLE CAL PARAMETER BLOCK
	DAC*	(X10)
/
DISN1	JMS*	(FAC)	/FETCH A CHARACTER
	SAD	(054)	/ IS IT A COMMA?
	JMP	ERR1	/YES -- ERROR IN SYNTAX
	SAD	(040)	/NO -- BLANK?
	JMP	ERR1	/YES -- ERROR IN SYNTAX
	SAD	(015)	/NO -- CAR RTN?
	JMP	ENDCRA	/YES-- END OF REQUEST
	SAD	(175)	/NO -- ALTMODE?
	JMP	ENDCRA	/YES-- END OF REQUEST
	DAC*	X10	/NO -- STORE CHARACTER
	ISZ	CNT	/LAST CHARACTER OF TASK NAME?
	JMP	DISN1	/NO -- GET NEXT CHARACTER
/
ERR1	LAC	(MES2)	/GET SYNTAX ERROR MESSAGE ADDRESS
	DAC	TYPCPB+4	/PUT IT IN TYPE REQUEST
	JMP	ERRTY	/REQUEST MCR AND RETURN
/
ENDCRA	DAC	SVBKCH	/SAVE CAR RTN OR ALTMODE
DISN2	DZM*	X10	/FILL REMAINING CHARACTERS WITH ZERO
	ISZ	CNT
	JMP	DISN2
/
	LAC	DISCPB+4	/FORM FIRST HALF OF TASK NAME
	LRS	6
	LAC	DISCPB+3
	LRS	6
	LAC	DISCPB+2
	SNA		/IS THIS A NULL NAME?
	JMP	ERR1	/YES EXIT WITH ERROR
	LLS	14
	DAC	DISCPB+2	/STORE FIRST HALF OF WORD IN DISCPB
	LAC	DISCPB+7	/FORM SECOND HALF OF TASK NAME
	LRS	6
	LAC	DISCPB+6
	LRS	6
	LAC	DISCPB+5
	LLS	14
	DAC	DISCPB+3
	CAL	DISCPB	/ISSUE DISABLE DIRECTIVE
	CAL	WAITF	/WAIT FOR DISABLE TO COMPLETE
	LAC	EV	/GET EVENT VARIABLE
	SMA		/JUMP IF REJECTED
	JMP	EXT1A	/OK NO ERRORS
ERRTY	CAL	TYPCPB	/MAKE TYPE CPB REQUEST
WAITEV	CAL	WAITF
	JMP	EXT2	/FINISHED EXIT
EXT1A	LAC	SVBKCH	/GET TERMINATION CHARACTER
	SAD	(15)	/SKIP IF ALTMODE
EXT2	CAL	REQMCR	/REQUEST MCR TASK
	SAD	(175)	/IF ALTMODE  CLEAR MCRRI
	DZM*	(MCRRI)	/CLEAR ^C SWITCH
	CAL	(10)	/RETURN
/
WAITF	20	/WAIT FOR REQUEST
	EV	/EVENT VARIABLE ADDRESS
/
REQMCR	1		/CALL MCR DIRECTIVE
	0
	.SIXBT	"..."
	.SIXBT	"MCR"
	0
/
DISCPB	21	/FUNCTION CODE
	EV	/EVENT VARIABLE ADR
	0	/TASK NAME (FIRST HALF)
	0	/TASK NAME (SECOND HALF)
	0
	0	/('DISCPB'+2 THRU 'DISCPB'+8 IS USED TO
	0	/ASSEMBLE TASK NAME INTO .SIXBT)
	0
	0
/
TYPCPB	2700	/WRITE
	EV	/EVENT VARIABLE
	3	/LUN NUMBER
	2	/IOPS ASCII
	MES3
EV	0
/
MES2	2 ; 0; .ASCII	"DIS-SYNTAX ERR"<15>
MES3	2; 0; .ASCII	"DIS-TASK NOT IN SYSTEM"<15>
/
SVBKCH	0
CNT	0
	.END	DIS
