/ 
/ 
/                   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 #7
/
/ COPYRIGHT 1971,1972,1973,1974 DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
/
/ COPST                 8 JAN 74               H. KREJCI
/						S. DELLER
/						M. HEBENSTREIT
/
/ MCR FUNCTION TASK "...COP" TO START CHECK-OUT-PACKAGE
/
/ TASK TO SCAN LUN'S 30-37 TO BE SURE THAT THEY ARE UN-
/ ASSIGNED, MAKE THE FOLLOWING ASSIGNMENTS (IF THE
/ DEVICES EXIST), OUTPUT ID TEXT, AND SCHEDULE OTHER TASKS.
/
/	LUN 30 -- DT1
/	LUN 31 -- DT2
/	LUN 32 -- TT0
/	LUN 33 -- TT1
/	LUN 34 -- TT2
/	LUN 35 -- TT3
/	LUN 36 -- TT4
/	LUN 37 -- TT5
/
D.FP=0		/PDVL NODE FORWARD PNTR
D.N1=2		/PDVL NODE NAME WORD ONE
D.UN=5		/PDVL NODE UNIT NUMBER
X13=13		/ADR OF AUTO-INCREMENT REG 13
LUTP1=142	/ADR OF POINTER TO BEGINNING OF LOGICAL UNIT TABLE
LUTP2=143	/ADR OF POINTER TO ENT OF LOGICAL UNIT TABLE
MCRRI=171	/ADR OF MCR REQUEST INHIBIT FLAG
PDVL=252	/ADR OF PDVL LISTHEAD
	.IFUND TTYS
TTYS=6		/NUMBER OF TTYS
	.ENDC
/
START	LAC	(START)	/DETERMINE 'XADJ'
	AND	(070000)
	TCA
	DAC	XADJ
	LAC*	(LUTP1)	/SETUP TO SCAN LUN'S FROM LUN THIRTY
	AAC	34	/THRU LUN THIRTY-SEVEN.  SINCE THIS IS
	DAC*	(X13)	/AN MCR FUNCTION, THE MCR (AND ...REA IN
	LAW	-4-TTYS	/PARTICULAR) IS INHIBITED VIA 'MCRRI'.
	DAC	TEMP1
/
LS	LAC*	(X13)	/END OF LUN TABLE?
	SAD*	(LUTP2)
	JMP	ERR	/YES -- DO NOT RUN CKECKOUT PKG
	LAC*	X13	/FETCH LUN SLOT CONTENTS
	SZA		/IS LUN ASSIGNED TO A DEVICE-UNIT?
	JMP	ERR	/YES -- DO NOT RUN CHECKOUT PKG
	ISZ	TEMP1	/LUN THIRTY-TWO?
	JMP	LS	/NO -- CONTINUE SCAN
			/YES -- MAKE ASSIGNMENTS
/
	LAC	(PDVL)	/SETUP TO SCAN THE PHYSICAL DEVICE LIST
	TAD	XADJ
	DAC	XRB
/
PLS	LAC	XRB	/FETCH NEXT NODE ADDRESS
	PAX
	LAC	D.FP,X
	SAD	(PDVL)	/END OF LIST?
	JMP	SCH	/YES -- SCHEDULE CHECKOUT TASKS
	DAC	NODA	/NO -- SAVE NODE ADDRESS
	TAD	XADJ	/SETUP XR TO ACCESS NODE
	DAC	XRB
	PAX
	LAC	D.N1,X	/DISPATCH ON SELECTED DEVICE NAMES
	SAD	(242400)/"TT" ?
	JMP	TT
	SAD	(042400)/"DT" ?
	JMP	DT
	JMP	PLS
/
TT	LAC	D.UN,X	/TT -- ASSIGN LUN PER UNIT NUMBER
	TAD*	(LUTP1)
	AAC	37
	JMP	ASN
/
DT	LAC	D.UN,X	/DT -- ASSIGN LUN IF SELECTED UNIT NUMBER
	SAD	(1)
	JMP	DTA
	SAD	(2)
	JMP	DTA
	JMP	PLS
DTA	TAD*	(LUTP1)
	AAC	34
	DAC	TEMP1
	PXA
	DAC	DTINIT
	CAL	REQDT
	LAC	TEMP1
/
ASN	DAC	TEMP1
	LAC	NODA
	DAC*	TEMP1
	JMP	PLS
/
SCH	DZM*	(MCRRI)	/CLEAR MCR INHIBIT FLAG
	CAL	ATACH3	/ATTACH LUN 3
	JMS	TYPE	/TYPE OUT ID MESSAGE
	MES1
	JMS	TYPE
	MES2
	JMS	TYPE
	MES3
	JMS	TYPE
	MES4
	JMS	TYPE
	MES5
	JMS	TYPE
	MES6
	JMS	TYPE
	MES7
	JMS	TYPE
	MES2
	JMS	TYPE
	MES1
	CAL	DETCH3	/DETACH FROM LUN 3
/
	CAL	SCH1	/SYNC RX M 0S 5M
	CAL	SCH2	/SYNC SATCHK M 1M 5M
	LAC	DTINIT	/IS THE DECTAPE PRESENT?
	PAX
	LAC	10,X
	SZA		/IF AC=0 NO DT PRESENT!
	CAL	SCH3	/SYNC DTRUN M 2M 5M
	CAL	SCH4	/SYNC TTYIO M 130T
	CAL	SCH5	/SYNC COPHM M 1H 1H
/
	CAL	(10)	/EXIT
/
/
ERR	DZM*	(MCRRI)	/ERROR -- LUN'S 30-37 ARE NOT ALL UNASSIGNED
	JMS	TYPE
	MES10
	JMS	TYPE
	MES11
/
	CAL	(10)	/EXIT
/
TEMP1	0
XADJ	0
XRB	0
NODA	0
DTINIT	0
/
REQDT	0001	/CPB TO REQUEST "DT...."
	0
	.SIXBT "DT...."
	0
/
TYPE	0		/SUBROUTINE TO OUTPUT THE LINE WHOSE
	LAC*	TYPE	/ADDRESS FOLLOWS THE JMS, ONTO LUN 3.
	ISZ	TYPE
	DAC	TYPCPB+4
	CAL	TYPCPB
	CAL	WAIF
	JMP*	TYPE
/
TYPCPB	2700	/CPB TO WRITE TO LUN 3
	EV
	3
	2
	XX
/
WAIF	20	/CPB TO WAIT FOR EV
	EV
/
EV	0
/
ATACH3	2400	/CPB TO ATTACH LUN 3
	0
	3
/
DETCH3	2500	/CPB TO DETACH LUN 3
	0
	3
/
SCH1	0014
	0
	.SIXBT "RX@@@@"
	3; 0; 3
	5; 3
	0
/
SCH2	0014
	0
	.SIXBT "SATCHK"
	3; 1; 3
	5; 3
	0
/
SCH3	0014
	0
	.SIXBT "DTRUN@"
	3; 2; 3
	5; 3
	0
/
SCH4	0014
	0
	.SIXBT "TTYIO@"
	.DEC; 3; 130; 2; .OCT
	0; 0
	0
/
SCH5	0014
	0
	.SIXBT "COPHM@"
	.DEC; 3; 3601; 2; .OCT
	1; 4
	0
/
MES1	2; 0; .ASCII	"***************************************"<15>
MES2	2; 0; .ASCII	"*                                     *"<15>
MES3	2; 0; .ASCII	"* RSX CHECKOUT PACKAGE -- LUN NUMBERS *"<15>
MES4	2; 0; .ASCII	"* HAVE BEEN ALTERED PER PHYSICAL UNIT *"<15>
MES5	2; 0; .ASCII	"* EXISTENCE.  A WRITE-ENABLED DECTAPE *"<15>
MES6	2; 0; .ASCII	"* WITH A NEW DIRECTORY IS NEEDED ON   *"<15>
MES7	2; 0; .ASCII	"* UNIT TWO (IF DECTAPES IN SYSTEM).   *"<15>
MES10	2; 0; .ASCII	"***** LUN'S 30 AND ABOVE ARE NOT ALL UNASSIGNED,"<15>
MES11	2; 0; .ASCII	"***** CHECKOUT PACKAGE CANNOT BE RUN."<15>
/
	.END	START
