

; Bliss-32 7.352	Saturday 21-AUG-1978 23:38:28	DBB3:[MTAACP.SRC]MOUVOL.B32;29					Page 1

; Digital Equipment Corporation

;

;	0001	MODULE MOUVOL (

;	0002			LANGUAGE (BLISS32),

;	0003			IDENT = 'A0006A'

;	0004			) =

;	0005	BEGIN

;	0006	

;	0007	!

;	0008	! COPYRIGHT (C) 1977

;	0009	! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS 01754

;	0010	!

;	0011	! THIS SOFTWARE IS FURNISHED  UNDER A LICENSE FOR USE ONLY ON A SINGLE

;	0012	! COMPUTER  SYSTEM AND  MAY BE  COPIED ONLY WITH  THE INCLUSION OF THE

;	0013	! ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE, OR ANY OTHER COPIES THEREOF,

;	0014	! MAY NOT BE PROVIDED OR  OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON

;	0015	! EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE

;	0016	! TERMS.  TITLE TO AND  OWNERSHIP OF THE  SOFTWARE  SHALL AT ALL TIMES

;	0017	! REMAIN IN DEC.

;	0018	!

;	0019	! THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE

;	0020	! AND SHOULD  NOT BE CONSTRUED  AS A COMMITMENT  BY DIGITAL  EQUIPMENT

;	0021	! CORPORATION.

;	0022	!

;	0023	! DEC ASSUMES  NO  RESPONSIBILITY  FOR  THE USE OR  RELIABILITY OF ITS

;	0024	! SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.

;	0025	

;	0026	!++

;	0027	!

;	0028	! FACILITY:  MTAACP

;	0029	!

;	0030	! ABSTRACT:

;	0031	!	THIS MODULE MOUNTS A VOLUME

;	0032	!

;	0033	!

;	0034	! ENVIRONMENT:

;	0035	!

;	0036	!	STARLET OPERATING SYSTEM, INCLUDING PRIVILEGED SYSTEM SERVICES

;	0037	!	AND INTERNAL EXEC ROUTINES.

;	0038	!

;	0039	!--

;	0040	!

;	0041	!

;	0042	! AUTHOR:  D. H. GILLESPIE,	 CREATION DATE:  24-AUG-1977  

;	0043	!

;	0044	! REVISION HISTORY:

;	0045	!

;	0046	!   D. H. Gillespie, 12-May-78  14:26

;	0047	!   A0001 - change CURRENT_VCB to a register

;	0048	!

;	0049	!   D. H. Gillespie, 18-May-78  15:23

;	0050	!   A0002 - issue rewinds with IO$M_NOWAIT

;	0051	!

;	0052	!   D. H. Gillespie, 23-May-78  9:35

;	0053	!   A0003 - add NOTUSED

;	0054	!

;	0055	!   D. H. Gillespie, 25-May-78  10:56



; Bliss-32 7.352	Saturday 21-AUG-1978 23:38:28	DBB3:[MTAACP.SRC]MOUVOL.B32;29					Page 1-1

; Digital Equipment Corporation

;

;	0056	!   A0004 - record label upto slash

;	0057	!

;	0058	!   D. H. Gillespie, 25-May-78  11:55

;	0059	!   A0005 - change interface to MOUNT_VOL

;	0060	!

;	0061	!   D. H. Gillespie, 28-Jun-78  10:42

;	0062	!   A0006A - add send message to error logger

;	0063	!

;	0064	!**

;	0065	

;	0066	LIBRARY 'SYS$LIBRARY:LIB.L32';

;	0067	REQUIRE 'SRC$:MTADEF.B32';

;	0363	REQUIRE	'LIBD$:[VMSLIB.OBJ]MOUNTMSG.B32';

;	0463	

;	0464	LINKAGE

;	0465		L$CHOOSE_UNIT  = JSB : GLOBAL(CURRENT_VCB=11)  NOTUSED(2,3,4,5,6,7,8,9,10),

;	0466		MVL_UCB	= CALL : GLOBAL(MVL_ENTRY = 9,UCB_LIST = 10,CURRENT_VCB = 11);

;	0467	

;	0468	FORWARD ROUTINE

;	0469		ASSUME_MOUNTED	: NOVALUE MVL_UCB,		!ASSUME CORRECT VOLUME IS MOUNTED

;	0470		CLPREV_MAKECUR	: NOVALUE MVL_UCB,		!CLEAR PREV USE OF VOLUME AND MAKE IT CURRENT

;	0471		CHOOSE_UNIT	: L$CHOOSE_UNIT,		!CHOOSE UNIT FOR MOUNT

;	0472		MAKE_CUR_VOL	: NOVALUE MVL_UCB,		!MAKE VOLUME CURRENT

;	0473		MAKE_VOL_ENTRY	: COMMON_CALL,			!MAKE VOLUME ENTRY IN MVL

;	0474		OPERATOR_LBL	: NOVALUE MVL_UCB;		!RECORD OPERATOR SUPPLIED LABEL

;	0475	

;	0476	EXTERNAL

;	0477		CTL$GL_CCBBASE	: REF BBLOCK ADDRESSING_MODE(ABSOLUTE),	!ADDRESS OF CHANNEL CONTROL BLOCKS

;	0478		CURRENT_UCB	: REF BBLOCK,			!ADDRESS OF CURRENT UNIT CONTROL BLOCK

;	0479		CURRENT_WCB	: REF BBLOCK,			!ADDRESS OF CURRENT WCB

;	0480		HDR1		: REF BBLOCK,			!ADDRESS OF HDR1(EOF1) LABEL

;	0481		IO_CHANNEL,					!ACP IO CHANNEL

;	0482		IO_STATUS,					!STATUS OF IO

;	0483		MAIL_CHANNEL,

;	0484		WORK_AREA;

;	0485	

;	0486	EXTERNAL ROUTINE

;	0487		BLOCK,						!BLOCK ACTIVITY ON CURRENT VOLUME SET

;	0488		ENABLE_MAIL_AST,

;	0489		PRINT_OPR_MSG	: L$PRINT_OPR_MSG,

;	0490		PRINT_NOT_LABEL	: JSB,				!PRINT NOT CORRECT LABEL

;	0491		READ_BLOCK,					!READ MAG TAPE BLOCK

;	0492		REWIND_AND_WAIT,				!REWIND VOLUME AND WAIT FOR COMPLETION

;	0493		SEND_ERRLOG,

;	0494		SYS$QIOW	: ADDRESSING_MODE(ABSOLUTE),	!QUEUE IO AND WAIT

;	0495		SYS$SETIMR	: ADDRESSING_MODE(ABSOLUTE),	!SET TIME REQUEST

;	0496		SYS$WAITFR	: ADDRESSING_MODE(ABSOLUTE),	!WAIT FOR EVENT

;	0497		TERMINATE_VOL;					!TERMINATE MOUNT REQUEST

;	0498	

;	0499	BIND

;	0500		MAIL		= WORK_AREA	: BBLOCK[MSGSIZE],

;	0501		MAILSZ		= MAIL + MSGSIZE;



; Bliss-32 7.352	Saturday 21-AUG-1978 23:38:28	DBB3:[MTAACP.SRC]MOUVOL.B32;29					Page 2

; Digital Equipment Corporation

;

;	0502	GLOBAL ROUTINE MOUNT_VOL(VOL,FLAGS) : COMMON_CALL  =

;	0503	

;	0504	!++

;	0505	!

;	0506	! FUNCTIONAL DESCRIPTION:

;	0507	!	THIS ROUTINE MOUNTS THE SPECIFIED RELATIVE VOLUME.  IF IT IS

;	0508	!	ALREADY MOUNTED AND THE REWIND FLAG IS SET THEN THE VOLUME WILL BE

;	0509	!	REWOUND AND THE VOL1 LABEL RECHECKED.  IF THE VOLUME IS NOT MOUNTED,

;	0510	!	A REQUEST IS ISSUED TO THE OPERATOR,  THE PROCESS BLOCKS UNTIL THE OPERATOR

;	0511	!	REPLIES THAT THE VOLUME HAS BEEN MOUNTED.  THEN IF THE LABEL FLAG

;	0512	!	IS SET, THE VOL1 LABEL IS CHECKED AGAINST THE ONE ENTERED AT THE

;	0513	!	ORIGINAL MOUNT TIME OR ONE ENTERED BY THE OPERATOR WHEN INDICATING

;	0514	!	THAT THE VOLUME WAS MOUNTED.

;	0515	!

;	0516	! CALLING SEQUENCE:

;	0517	!	MOUNT_VOL(ARG1,ARG2)

;	0518	!

;	0519	! INPUT PARAMETERS:

;	0520	!	ARG1 - RELATIVE VOLUME NUMBER TO MOUNT

;	0521	!	ARG2 - FLAGS

;	0522	!		MOU$V_REWIND - REQUEST REWIND OF VOLUME

;	0523	!		MOU$V_LBLCHECK - REQUEST CHECK OF LABEL

;	0524	!		MOU$V_NOREADVOL1 - DONT READ VOL1 LABEL

;	0525	!		MOU$V_MOUNTERR - ERROR ON LAST MOUNT, SO FORCE MOUNT

;	0526	!

;	0527	! IMPLICIT INPUTS:

;	0528	!	NONE

;	0529	!

;	0530	! OUTPUT PARAMETERS:

;	0531	!	NONE

;	0532	!

;	0533	! IMPLICIT OUTPUTS:

;	0534	!	VOLUME IS MOUNTED AND SET CURRENT

;	0535	!

;	0536	! ROUTINE VALUE:

;	0537	!	NONE

;	0538	!

;	0539	! SIDE EFFECTS:

;	0540	!	NONE

;	0541	!

;	0542	!--

;	0543	

;	0544	BEGIN

;	0545	BIND

;	0546		SECONDS	= UPLIT(-10000000,-1);		!ONE SECOND IN 100 NSEC UNITS

;	0547	MAP

;	0548		FLAGS	: BBLOCK;

;	0549	

;	0550	GLOBAL REGISTER

;	0551		MVL_ENTRY	= 9 : REF BBLOCK,	!ADDRESS OF MVL ENTRY FOR CURRENT VOLUME

;	0552		UCB_LIST	= 10 : REF VECTOR,	!ADDRESS OF LIST OF UCB'S FOR VOLUME SET

;	0553		COMMON_REG;

;	0554	

;	0555	LOCAL

;	0556		MVL		: REF BBLOCK;		!ADDRESS OF MVL CONTROL BLOCK



; Bliss-32 7.352	Saturday 21-AUG-1978 23:38:28	DBB3:[MTAACP.SRC]MOUVOL.B32;29					Page 2-1

; Digital Equipment Corporation

;

;	0557	

;	0558	MVL = .CURRENT_VCB[VCB$L_MVL];

;	0559	IF .MVL[MVL$B_NVOLS] LSS .VOL THEN MVL = KERNEL_CALL(MAKE_VOL_ENTRY,.VOL,.MVL);

;	0560	MVL_ENTRY = .MVL + MVL$K_FIXLEN + ((.VOL-1) * MVL$K_LENGTH);

;	0561	UCB_LIST = BBLOCK[.CURRENT_VCB[VCB$L_RVT],RVT$L_UCBLST];

;	0562	

;	0563	! IF VOLUME MOUNTED THEN MAKE THE VOLUME AND THE UNIT IT IS MOUNTED ON CURRENT

;	0564	! ELSE CHOOSE A UNIT, CLEAR ITS PREVIOUS USE, AND MAKE THE VOLUME AND THE NEW UNIT

;	0565	! CURRENT

;	0566	IF .MVL_ENTRY[MVL$V_MOUNTED] AND NOT .FLAGS[MOU$V_MOUNTERR] THEN

;	0567	    KERNEL_CALL(MAKE_CUR_VOL,.MVL_ENTRY[MVL$B_RVN],.VOL)

;	0568	ELSE

;	0569	    KERNEL_CALL(CLPREV_MAKECUR,CHOOSE_UNIT(),.VOL);

;	0570	

;	0571	! NOW IF THE VOLUME IS MOUNTED AND NO REWIND IS REQUIRED JUST RETURN

;	0572	IF .MVL_ENTRY[MVL$V_MOUNTED]

;	0573	AND NOT .FLAGS[MOU$V_MOUNTERR]

;	0574	AND NOT .FLAGS[MOU$V_REWIND] THEN RETURN .MVL_ENTRY;

;	0575	WHILE 1 DO

;	0576	    BEGIN

;	0577	    LOCAL STATUS;

;	0578	    IF NOT .MVL_ENTRY[MVL$V_MOUNTED] OR .FLAGS[MOU$V_MOUNTERR] THEN

;	0579		BEGIN

;	0580		LOCAL LABEL_ADDR	: REF VECTOR[,BYTE],

;	0581			LABEL_SZ;

;	0582		LABEL_ADDR = MVL_ENTRY[MVL$T_VOLLBL];

;	0583		LABEL_SZ = 0;

;	0584		INCR I FROM 0 TO MVL$S_VOLLBL-1 DO

;	0585		    BEGIN

;	0586		    IF .LABEL_ADDR[.I] EQL ' ' THEN EXITLOOP;

;	0587		    LABEL_SZ = .LABEL_SZ + 1;

;	0588		    END;

;	0589		IF NOT PRINT_OPR_MSG(MOUN$_MOUVOL,.MAIL_CHANNEL,.CURRENT_VCB[VCB$B_CUR_RVN],

;	0590			.LABEL_SZ,.LABEL_ADDR,BBLOCK[.CURRENT_UCB[UCB$L_DDB],DDB$T_NAME],

;	0591			.CURRENT_UCB[UCB$W_UNIT]) THEN

;	0592		    BEGIN

;	0593		    KERNEL_CALL(TERMINATE_VOL,.CURRENT_WCB);

;	0594		    ERR_EXIT(SS$_NOTAPEOP);

;	0595		    END;

;	0596		ENABLE_MAIL_AST();

;	0597		BLOCK(VCB$M_WAIMOUVOL);

;	0598		IF .MAILSZ GTR 0 THEN KERNEL_CALL(OPERATOR_LBL);

;	0599		KERNEL_CALL(ASSUME_MOUNTED);		!ASSUME DEVICE IS MOUNTED

;	0600		KERNEL_CALL(SEND_ERRLOG,1,.CURRENT_UCB);

;	0601		END;

;	0602	    INCRU J FROM 0 TO 9 DO

;	0603		BEGIN

;	0604		STATUS = REWIND_AND_WAIT();

;	0605		IF .STATUS THEN EXITLOOP;		!IF ON_LINE, THEN EXIT LOOP

;	0606		IF SYS$SETIMR(TIMEFN,SECONDS,0,0) 

;	0607		THEN SYS$WAITFR(TIMEFN);		!WAIT ONE SECOND

;	0608		END;

;	0609	    IF .STATUS THEN

;	0610		BEGIN

;	0611		LOCAL SCRATCH : REF BBLOCK;



; Bliss-32 7.352	Saturday 21-AUG-1978 23:38:28	DBB3:[MTAACP.SRC]MOUVOL.B32;29					Page 2-2

; Digital Equipment Corporation

;

;	0612		KERNEL_CALL(ASSUME_MOUNTED);		!ASSUME DEVICE IS MOUNTED

;	0613		IF .FLAGS[MOU$V_NORDVOL1] THEN EXITLOOP;

;	0614		SCRATCH = .HDR1 + 160;			!SETUP ADDRESS OF SCRATCH AREA

;	0615		IF NOT READ_BLOCK(.SCRATCH,80) OR .(.SCRATCH) NEQ 'VOL1'  

;	0616		THEN PRINT_OPR_MSG(MOUN$_NOTANSI,0,BBLOCK[.CURRENT_UCB[UCB$L_DDB],DDB$T_NAME],.CURRENT_UCB[UCB$W_UNIT])

;	0617		ELSE

;	0618		    IF .FLAGS[MOU$V_LBLCHECK] AND NOT .CURRENT_VCB[VCB$V_OVRLBL] THEN

;	0619			BEGIN

;	0620			IF CH$NEQ(VL1$S_VOLLBL,SCRATCH[VL1$T_VOLLBL],MVL$S_VOLLBL,MVL_ENTRY[MVL$T_VOLLBL]) THEN

;	0621			PRINT_NOT_LABEL(.MVL_ENTRY)

;	0622	

;	0623			ELSE EXITLOOP;

;	0624			END

;	0625		   ELSE EXITLOOP;

;	0626		END;					!END OF REWIND + CHECK LABEL

;	0627	    FLAGS = .FLAGS OR $FIELDMASK(MOU$V_MOUNTERR);

;	0628	    KERNEL_CALL(CLPREV_MAKECUR,.MVL_ENTRY[MVL$B_RVN],.VOL);

;	0629	    END;					!END OF WHILE

;	0630	RETURN .MVL_ENTRY;

;	0631	END;						!END OF ROUTINE





							    .TITLE  MOUVOL

							    .IDENT  \A0006A\



							    .PSECT  $CODE$,NOWRT,2



					      00000 P.AAA:  .LONG   -10000000, -1					      ;



						    SECONDS=		P.AAA

							    .GLOBL  CTL$GL_CCBBASE, CURRENT_UCB, CURRENT_WCB, HDR1

							    .GLOBL  IO_CHANNEL, IO_STATUS, MAIL_CHANNEL, WORK_AREA

							    .GLOBL  BLOCK, ENABLE_MAIL_AST, PRINT_OPR_MSG, PRINT_NOT_LABEL

							    .GLOBL  READ_BLOCK, REWIND_AND_WAIT, SEND_ERRLOG, SYS$QIOW

							    .GLOBL  SYS$SETIMR, SYS$WAITFR, TERMINATE_VOL, SYS$CMKRNL



					 0FFC 00008 	    .ENTRY  MOUNT_VOL, Save R2,R3,R4,R5,R6,R7,R8,R9,R10,R11	      ; 0502

		         57	0000G  CF  9E 0000A 	    MOVAB   CURRENT_UCB, R7					      ;

		         58 00000000G  9F  9E 0000F 	    MOVAB   @#SYS$CMKRNL, R8					      ;

		         52	  34   AB  D0 00016 	    MOVL    52(CURRENT_VCB), MVL				      ; 0558

		         53	  04   AC  D0 0001A 	    MOVL    VOL, R3						      ; 0559

      0B   A2	         08	       00  ED 0001E 	    CMPZV   #0, #8, 11(MVL), R3					      ;

				       53     00023									      ;

				       12  18 00024 	    BGEQ    1$							      ;

				       52  DD 00026 	    PUSHL   MVL							      ;

				       53  DD 00028 	    PUSHL   R3							      ;

				       02  DD 0002A 	    PUSHL   #2							      ;

				       5E  DD 0002C 	    PUSHL   SP							      ;

				0000V  CF  9F 0002E 	    PUSHAB  MAKE_VOL_ENTRY					      ;

		         68	       05  FB 00032 	    CALLS   #5, SYS$CMKRNL					      ;

		         52	       50  D0 00035 	    MOVL    R0, MVL						      ;

		         59	  04 A243  7E 00038 1$:     MOVAQ   4(MVL)[R3], MVL_ENTRY				      ; 0560

	   5A	    20   AB	       0C  C1 0003D 	    ADDL3   #12, 32(CURRENT_VCB), UCB_LIST			      ; 0561

		         15	  07   A9  E9 00042 	    BLBC    7(MVL_ENTRY), 2$					      ; 0566

	   10	    08   AC	       03  E0 00046 	    BBS     #3, FLAGS, 2$					      ;



; Bliss-32 7.352	Saturday 21-AUG-1978 23:38:28	DBB3:[MTAACP.SRC]MOUVOL.B32;29					Page 2-3

; Digital Equipment Corporation

;

				       53  DD 0004B 	    PUSHL   R3							      ; 0567

		         7E	  06   A9  9A 0004D 	    MOVZBL  6(MVL_ENTRY), -(SP)					      ;

				       02  DD 00051 	    PUSHL   #2							      ;

				       5E  DD 00053 	    PUSHL   SP							      ;

				0000V  CF  9F 00055 	    PUSHAB  MAKE_CUR_VOL					      ;

				       0F  11 00059 	    BRB     3$							      ;

				       53  DD 0005B 2$:     PUSHL   R3							      ; 0569

				     0000  30 0005D 	    BSBW    CHOOSE_UNIT						      ;

				       50  DD 00060 	    PUSHL   R0							      ;

				       02  DD 00062 	    PUSHL   #2							      ;

				       5E  DD 00064 	    PUSHL   SP							      ;

				0000V  CF  9F 00066 	    PUSHAB  CLPREV_MAKECUR					      ;

		         68	       05  FB 0006A 3$:     CALLS   #5, SYS$CMKRNL					      ;

		         18	  07   A9  E9 0006D 	    BLBC    7(MVL_ENTRY), 5$					      ; 0572

	   07	    08   AC	       03  E0 00071 	    BBS     #3, FLAGS, 4$					      ; 0573

		         03	  08   AC  E8 00076 	    BLBS    FLAGS, 4$						      ; 0574

				     0141  31 0007A 	    BRW     17$							      ;

		         08	  07   A9  E9 0007D 4$:     BLBC    7(MVL_ENTRY), 5$					      ; 0578

	   03	    08   AC	       03  E0 00081 	    BBS     #3, FLAGS, 5$					      ;

				     0084  31 00086 	    BRW     10$							      ;

		         51	       59  D0 00089 5$:     MOVL    MVL_ENTRY, LABEL_ADDR				      ; 0582

				       52  D4 0008C 	    CLRL    LABEL_SZ						      ; 0583

				       50  D4 0008E 	    CLRL    I							      ; 0584

		         20	     6041  91 00090 6$:     CMPB    (I)[LABEL_ADDR], #32				      ; 0586

				       06  13 00094 	    BEQL    7$							      ;

				       52  D6 00096 	    INCL    LABEL_SZ						      ; 0587

	   F4	         50	       05  F3 00098 	    AOBLEQ  #5, I, 6$						      ; 0584

		         50	       67  D0 0009C 7$:     MOVL    CURRENT_UCB, R0					      ; 0591

		         7E	  48   A0  3C 0009F 	    MOVZWL  72(R0), -(SP)					      ; 0589

	   7E	    24   A0	       14  C1 000A3 	    ADDL3   #20, 36(R0), -(SP)					      ; 0590

				       51  DD 000A8 	    PUSHL   LABEL_ADDR						      ; 0589

				       52  DD 000AA 	    PUSHL   LABEL_SZ						      ;

		         7E	  2F   AB  9A 000AC 	    MOVZBL  47(CURRENT_VCB), -(SP)				      ;

				0000G  CF  DD 000B0 	    PUSHL   MAIL_CHANNEL					      ;

			    0072809C   8F  DD 000B4 	    PUSHL   #7504028						      ;

				     0000  30 000BA 	    BSBW    PRINT_OPR_MSG					      ;

		         5E	       1C  C0 000BD 	    ADDL2   #28, SP						      ;

		         13	       50  E8 000C0 	    BLBS    R0, 8$						      ;

				0000G  CF  DD 000C3 	    PUSHL   CURRENT_WCB						      ; 0593

				       01  DD 000C7 	    PUSHL   #1							      ;

				       5E  DD 000C9 	    PUSHL   SP							      ;

				0000G  CF  9F 000CB 	    PUSHAB  TERMINATE_VOL					      ;

		         68	       04  FB 000CF 	    CALLS   #4, SYS$CMKRNL					      ;

				0264   8F  BF 000D2 	    CHMU    #612						      ; 0594

		  0000G  CF	       00  FB 000D6 8$:     CALLS   #0, ENABLE_MAIL_AST					      ; 0596

				       04  DD 000DB 	    PUSHL   #4							      ; 0597

		  0000G  CF	       01  FB 000DD 	    CALLS   #1, BLOCK						      ;

				0000G  CF  D5 000E2 	    TSTL    MAILSZ						      ; 0598

				       0B  15 000E6 	    BLEQ    9$							      ;

				       7E  D4 000E8 	    CLRL    -(SP)						      ;

				       5E  DD 000EA 	    PUSHL   SP							      ;

				0000V  CF  9F 000EC 	    PUSHAB  OPERATOR_LBL					      ;

		         68	       03  FB 000F0 	    CALLS   #3, SYS$CMKRNL					      ;

				       7E  D4 000F3 9$:     CLRL    -(SP)						      ; 0599

				       5E  DD 000F5 	    PUSHL   SP							      ;



; Bliss-32 7.352	Saturday 21-AUG-1978 23:38:28	DBB3:[MTAACP.SRC]MOUVOL.B32;29					Page 2-4

; Digital Equipment Corporation

;

				0000V  CF  9F 000F7 	    PUSHAB  ASSUME_MOUNTED					      ;

		         68	       03  FB 000FB 	    CALLS   #3, SYS$CMKRNL					      ;

				       67  DD 000FE 	    PUSHL   CURRENT_UCB						      ; 0600

				       01  DD 00100 	    PUSHL   #1							      ;

				       02  DD 00102 	    PUSHL   #2							      ;

				       5E  DD 00104 	    PUSHL   SP							      ;

				0000G  CF  9F 00106 	    PUSHAB  SEND_ERRLOG						      ;

		         68	       05  FB 0010A 	    CALLS   #5, SYS$CMKRNL					      ;

				       53  D4 0010D 10$:    CLRL    J							      ; 0602

		  0000G  CF	       00  FB 0010F 11$:    CALLS   #0, REWIND_AND_WAIT					      ; 0604

		         52	       50  D0 00114 	    MOVL    R0, STATUS						      ;

		         25	       52  E8 00117 	    BLBS    STATUS, 13$						      ; 0605

				       7E  7C 0011A 	    CLRQ    -(SP)						      ; 0606

				FEE0   CF  9F 0011C 	    PUSHAB  SECONDS						      ; 0502

				       03  DD 00120 	    PUSHL   #3							      ; 0606

	      00000000G  9F	       04  FB 00122 	    CALLS   #4, @#SYS$SETIMR					      ;

		         09	       50  E9 00129 	    BLBC    R0, 12$						      ;

				       03  DD 0012C 	    PUSHL   #3							      ; 0607

	      00000000G  9F	       01  FB 0012E 	    CALLS   #1, @#SYS$WAITFR					      ;

				       53  D6 00135 12$:    INCL    J							      ; 0602

		         09	       53  D1 00137 	    CMPL    J, #9						      ;

				       D3  1B 0013A 	    BLEQU   11$							      ;

		         66	       52  E9 0013C 	    BLBC    STATUS, 16$						      ; 0609

				       7E  D4 0013F 13$:    CLRL    -(SP)						      ; 0612

				       5E  DD 00141 	    PUSHL   SP							      ;

				0000V  CF  9F 00143 	    PUSHAB  ASSUME_MOUNTED					      ;

		         68	       03  FB 00147 	    CALLS   #3, SYS$CMKRNL					      ;

	   6F	    08   AC	       02  E0 0014A 	    BBS     #2, FLAGS, 17$					      ; 0613

	   52	  0000G  CF 000000A0   8F  C1 0014F 	    ADDL3   #160, HDR1, SCRATCH					      ; 0614

		         7E	  50   8F  9A 00159 	    MOVZBL  #80, -(SP)						      ; 0615

				       52  DD 0015D 	    PUSHL   SCRATCH						      ;

		  0000G  CF	       02  FB 0015F 	    CALLS   #2, READ_BLOCK					      ;

		         09	       50  E9 00164 	    BLBC    R0, 14$						      ;

	      314C4F56   8F	       62  D1 00167 	    CMPL    (SCRATCH), #827084630				      ;

				       1C  13 0016E 	    BEQL    15$							      ;

		         50	       67  D0 00170 14$:    MOVL    CURRENT_UCB, R0					      ; 0616

		         7E	  48   A0  3C 00173 	    MOVZWL  72(R0), -(SP)					      ;

	   7E	    24   A0	       14  C1 00177 	    ADDL3   #20, 36(R0), -(SP)					      ;

				       7E  D4 0017C 	    CLRL    -(SP)						      ;

			    007280FC   8F  DD 0017E 	    PUSHL   #7504124						      ;

				     0000  30 00184 	    BSBW    PRINT_OPR_MSG					      ;

		         5E	       10  C0 00187 	    ADDL2   #16, SP						      ;

				       19  11 0018A 	    BRB     16$							      ; 0615

	   2D	    08   AC	       01  E1 0018C 15$:    BBC     #1, FLAGS, 17$					      ; 0618

	   28	    2C   AB	       02  E0 00191 	    BBS     #2, 44(CURRENT_VCB), 17$				      ;

	   69	    04   A2	       06  29 00196 	    CMPC3   #6, 4(SCRATCH), (MVL_ENTRY)				      ; 0620

				       21  13 0019B 	    BEQL    17$							      ;

				       59  DD 0019D 	    PUSHL   MVL_ENTRY						      ; 0621

				     0000  30 0019F 	    BSBW    PRINT_NOT_LABEL					      ;

		         5E	       04  C0 001A2 	    ADDL2   #4, SP						      ;

		    08   AC	       08  88 001A5 16$:    BISB2   #8, FLAGS						      ; 0627

				  04   AC  DD 001A9 	    PUSHL   VOL							      ; 0628

		         7E	  06   A9  9A 001AC 	    MOVZBL  6(MVL_ENTRY), -(SP)					      ;

				       02  DD 001B0 	    PUSHL   #2							      ;

				       5E  DD 001B2 	    PUSHL   SP							      ;



; Bliss-32 7.352	Saturday 21-AUG-1978 23:38:28	DBB3:[MTAACP.SRC]MOUVOL.B32;29					Page 2-5

; Digital Equipment Corporation

;

				0000V  CF  9F 001B4 	    PUSHAB  CLPREV_MAKECUR					      ;

		         68	       05  FB 001B8 	    CALLS   #5, SYS$CMKRNL					      ;

				     FEBF  31 001BB 	    BRW     4$							      ; 0575

		         50	       59  D0 001BE 17$:    MOVL    MVL_ENTRY, R0					      ; 0630

					   04 001C1 	    RET     							      ; 0502



; Routine Size:  442 bytes





;	0632	



; Bliss-32 7.352	Saturday 21-AUG-1978 23:38:28	DBB3:[MTAACP.SRC]MOUVOL.B32;29					Page 3

; Digital Equipment Corporation

;

;	0633	ROUTINE CHOOSE_UNIT : L$CHOOSE_UNIT  =

;	0634	

;	0635	!++

;	0636	!

;	0637	! FUNCTIONAL DESCRIPTION:

;	0638	!	THIS ROUTINE CHOOSES THE NEXT UNIT TO USE

;	0639	!

;	0640	! CALLING SEQUENCE:

;	0641	!	CHOOSE_UNIT()

;	0642	!

;	0643	! INPUT PARAMETERS:

;	0644	!	NONE

;	0645	!

;	0646	! IMPLICIT INPUTS:

;	0647	!	CURRENT_VCB - ADDRESS OF CURRENT VOLUME CONTROL BLOCK

;	0648	!

;	0649	! OUTPUT PARAMETERS:

;	0650	!	NONE

;	0651	!

;	0652	! IMPLICIT OUTPUTS:

;	0653	!	NONE

;	0654	!

;	0655	! ROUTINE VALUE:

;	0656	!	RELATIVE UNIT NUMBER

;	0657	!

;	0658	! SIDE EFFECTS:

;	0659	!	THE CURRENT ALGORYTHM IS INCREMENT CURRENT UNIT.

;	0660	!	IF IT IS ALLOCATED THEN USE IT ELSE WRAP AROUND TO FIRST UNIT.

;	0661	!

;	0662	!--

;	0663	

;	0664	BEGIN

;	0665	

;	0666	EXTERNAL REGISTER

;	0667		COMMON_REG;

;	0668	

;	0669	LOCAL

;	0670		NUNITS,				!NUMBER OF UNITS ALLOCATED

;	0671		RVT	: REF BBLOCK,		!ADDRESS OF UNIT TABLE

;	0672		UNIT;				!UNIT TO USE

;	0673	

;	0674	RVT = .CURRENT_VCB[VCB$L_RVT];		!GET ADDRESS OF UNIT TABLE

;	0675	NUNITS = .RVT[RVT$B_NVOLS];		!GET NUMBER OF UNITS ALLOCATED TO THESE VOLUME SET

;	0676	UNIT = .CURRENT_VCB[VCB$W_RVN] + 1;	!INC CURRENT REL UNIT NUMBER

;	0677	IF .UNIT GEQ .NUNITS THEN UNIT = 0;	!IF NOT ALLOCATED, USE FIRST ONE

;	0678	RETURN .UNIT;

;	0679	END;					!END OF ROUTINE











		         50	  20   AB  D0 001C2 CHOOSE_UNIT:

							    MOVL    32(CURRENT_VCB), RVT				      ; 0674

		         51	  0B   A0  9A 001C6 	    MOVZBL  11(RVT), NUNITS					      ; 0675



; Bliss-32 7.352	Saturday 21-AUG-1978 23:38:28	DBB3:[MTAACP.SRC]MOUVOL.B32;29					Page 3-1

; Digital Equipment Corporation

;

		         50	  0E   AB  3C 001CA 	    MOVZWL  14(CURRENT_VCB), UNIT				      ; 0676

				       50  D6 001CE 	    INCL    UNIT						      ;

		         51	       50  D1 001D0 	    CMPL    UNIT, NUNITS					      ; 0677

				       02  19 001D3 	    BLSS    1$							      ;

				       50  D4 001D5 	    CLRL    UNIT						      ;

					   05 001D7 1$:     RSB     							      ; 0633



; Routine Size:  22 bytes





;	0680	



; Bliss-32 7.352	Saturday 21-AUG-1978 23:38:28	DBB3:[MTAACP.SRC]MOUVOL.B32;29					Page 4

; Digital Equipment Corporation

;

;	0681	ROUTINE CLPREV_MAKECUR(UNIT,VOL) : MVL_UCB NOVALUE  =

;	0682	

;	0683	!++

;	0684	!

;	0685	! FUNCTIONAL DESCRIPTION:

;	0686	!	THIS ROUTINE CLEARS THE PREVIOUS USE OF THIS UNIT IN THE

;	0687	!	MAG TAPE VOLUME LIST AND MAKES THE UNIT AND REL VOLUME CURRENT

;	0688	!

;	0689	! CALLING SEQUENCE:

;	0690	!	CLPREV_MAKECUR(ARG1,ARG2), CALLED IN KERNEL MODE

;	0691	!

;	0692	! INPUT PARAMETERS:

;	0693	!	ARG1 - RELATIVE UNIT NUMBER

;	0694	!	ARG2 - RELATIVE VOLUME NUMBER

;	0695	!

;	0696	! IMPLICIT INPUTS:

;	0697	!	CURRENT_VCB - ADDRESS OF CURRENT VOLUME CONTROL BLOCK

;	0698	!	MVL_ENTRY - ADDRESS OF CURRENT ENTRY IN MVL FOR VOLUME

;	0699	!	UCB_LIST - ADDRESS OF UCB'S AVAILABLE FOR THIS UNIT

;	0700	!

;	0701	! OUTPUT PARAMETERS:

;	0702	!	NONE

;	0703	!

;	0704	! IMPLICIT OUTPUTS:

;	0705	!	NONE

;	0706	!

;	0707	! ROUTINE VALUE:

;	0708	!	NONE

;	0709	!

;	0710	! SIDE EFFECTS:

;	0711	!	IF VOLUME CURRENTLY MOUNTED ON UNIT, REWIND ISSUED

;	0712	!

;	0713	!--

;	0714	

;	0715	BEGIN

;	0716	

;	0717	EXTERNAL REGISTER

;	0718		MVL_ENTRY	= 9 : REF BBLOCK,	!ADDRESS OF CURRENT VOL ENTRY IN MVL

;	0719		UCB_LIST	= 10 : REF VECTOR,	!ADDRESS OF UCB'S

;	0720		COMMON_REG;

;	0721	

;	0722	LOCAL

;	0723		CCB		: REF BBLOCK,		!ADDRESS OF ACP IO CHANNEL CONTROL BLOCK

;	0724		MVL		: REF BBLOCK,		!ADDRESS MAG TAPE VOLUME LIST CONTROL BLOCK

;	0725		MVL_ADDR	: REF BBLOCKVECTOR[10,MVL$K_LENGTH],	!ADDRESS OF MVL ENTRIES

;	0726		NVOLS;

;	0727	

;	0728	CCB = .CTL$GL_CCBBASE - .IO_CHANNEL;			!CALC ACP IO CHANNEL CONTROL BLOCK ADDRESS

;	0729	MVL = .CURRENT_VCB[VCB$L_MVL];			!ADDRESS OF MVL CONTROL BLOCK

;	0730	NVOLS = .MVL[MVL$B_NVOLS];			!NUMBER OF RELATIVE VOLUME

;	0731	MVL_ADDR = .MVL + MVL$K_FIXLEN;			!ADDRESS OF ENTRIES FOR RELATIVE VOLUMES

;	0732	INCR I FROM 0 TO .NVOLS-1 DO			!CHECK EACH RELATIVE VOLUME

;	0733	    BEGIN

;	0734	    IF .MVL_ADDR[.I,MVL$V_MOUNTED] AND		!IF MOUNTED

;	0735	    .UNIT EQL .MVL_ADDR[.I,MVL$B_RVN]		!ON UNIT ABOUT TO BE USED



; Bliss-32 7.352	Saturday 21-AUG-1978 23:38:28	DBB3:[MTAACP.SRC]MOUVOL.B32;29					Page 4-1

; Digital Equipment Corporation

;

;	0736	    THEN

;	0737		BEGIN

;	0738		KERNEL_CALL(SEND_ERRLOG,0,.UCB_LIST[.UNIT]);	! BEFORE MOUNTED IS CLEARED!!

;	0739	

;	0740		MVL_ADDR[.I,MVL$V_MOUNTED] = 0;		!MARK IT DISMOUNTED,

;	0741		CCB[CCB$L_UCB] = .UCB_LIST[.UNIT];	!ASSIGN CHANNEL TO IT'S UNIT,

;	0742		SYS$QIOW(,.IO_CHANNEL,IO$_UNLOAD OR IO$M_NOWAIT,,,, ,,,,,);		!UNLOAD THE TAPE, PLEASE

;	0743		EXITLOOP;

;	0744		END;

;	0745	    END;

;	0746	MAKE_CUR_VOL(.UNIT,.VOL);

;	0747	END;						!END OF ROUTINE











					 007C 001D8 CLPREV_MAKECUR:

							    .WORD   Save R2,R3,R4,R5,R6					      ; 0681

	   55 00000000G  9F	0000G  CF  C3 001DA 	    SUBL3   IO_CHANNEL, @#CTL$GL_CCBBASE, CCB			      ; 0728

		         50	  34   AB  D0 001E4 	    MOVL    52(CURRENT_VCB), MVL				      ; 0729

		         56	  0B   A0  9A 001E8 	    MOVZBL  11(MVL), NVOLS					      ; 0730

	   54	         50	       0C  C1 001EC 	    ADDL3   #12, MVL, MVL_ADDR					      ; 0731

		         52	       01  CE 001F0 	    MNEGL   #1, I						      ; 0732

				       52  11 001F3 	    BRB     2$							      ;

				  07 A442  7F 001F5 1$:     PUSHAQ  7(MVL_ADDR)[I]					      ; 0734

		         4B	       9E  E9 001F9 	    BLBC    @(SP)+, 2$						      ;

				  06 A442  7F 001FC 	    PUSHAQ  6(MVL_ADDR)[I]					      ; 0735

	   9E	         08	       00  ED 00200 	    CMPZV   #0, #8, @(SP)+, UNIT				      ;

				  04   AC     00204									      ;

				       3F  12 00206 	    BNEQ    2$							      ;

		         53	  04   AC  D0 00208 	    MOVL    UNIT, R3						      ; 0738

				     6A43  DD 0020C 	    PUSHL   (UCB_LIST)[R3]					      ;

		         7E	       02  7D 0020F 	    MOVQ    #2, -(SP)						      ;

				       5E  DD 00212 	    PUSHL   SP							      ;

				0000G  CF  9F 00214 	    PUSHAB  SEND_ERRLOG						      ;

	      00000000G  9F	       05  FB 00218 	    CALLS   #5, @#SYS$CMKRNL					      ;

				  07 A442  7F 0021F 	    PUSHAQ  7(MVL_ADDR)[I]					      ; 0740

		         9E	       01  8A 00223 	    BICB2   #1, @(SP)+						      ;

		         65	     6A43  D0 00226 	    MOVL    (UCB_LIST)[R3], (CCB)				      ; 0741

				       7E  7C 0022A 	    CLRQ    -(SP)						      ; 0742

				       7E  7C 0022C 	    CLRQ    -(SP)						      ;

				       7E  7C 0022E 	    CLRQ    -(SP)						      ;

				       7E  7C 00230 	    CLRQ    -(SP)						      ;

				       7E  D4 00232 	    CLRL    -(SP)						      ;

		         7E	  81   8F  9A 00234 	    MOVZBL  #129, -(SP)						      ;

				0000G  CF  DD 00238 	    PUSHL   IO_CHANNEL						      ;

				       7E  D4 0023C 	    CLRL    -(SP)						      ;

	      00000000G  9F	       0C  FB 0023E 	    CALLS   #12, @#SYS$QIOW					      ;

				       04  11 00245 	    BRB     3$							      ; 0743

	   AA	         52	       56  F2 00247 2$:     AOBLSS  NVOLS, I, 1$					      ; 0732

		         7E	  04   AC  7D 0024B 3$:     MOVQ    UNIT, -(SP)						      ; 0746

		  0000V  CF	       02  FB 0024F 	    CALLS   #2, MAKE_CUR_VOL					      ;

					   04 00254 	    RET     							      ; 0681





; Bliss-32 7.352	Saturday 21-AUG-1978 23:38:28	DBB3:[MTAACP.SRC]MOUVOL.B32;29					Page 4-2

; Digital Equipment Corporation

;

; Routine Size:  125 bytes





;	0748	



; Bliss-32 7.352	Saturday 21-AUG-1978 23:38:28	DBB3:[MTAACP.SRC]MOUVOL.B32;29					Page 5

; Digital Equipment Corporation

;

;	0749	ROUTINE MAKE_CUR_VOL(UNIT,VOL) : NOVALUE MVL_UCB  =

;	0750	

;	0751	!++

;	0752	!

;	0753	! FUNCTIONAL DESCRIPTION:

;	0754	!	THIS ROUTINE MAKES THE RELATIVE VOLUME NUMBER ON THE REL UNIT THE CURRENT VOLUME

;	0755	!	IT NOTES THAT THE CURRENT VOLUME IS MOUNTED ON THIS RELATIVE UNIT

;	0756	!

;	0757	! CALLING SEQUENCE:

;	0758	!	MAKE_CUR_VOL(ARG1,ARG2)

;	0759	!

;	0760	! INPUT PARAMETERS:

;	0761	!	ARG1 - RELATIVE UNIT NUMBER ON WHICH THE RELATIVE VOLUME IS MOUNTED

;	0762	!	ARG2 - RELATIVE VOLUME NUMBER(STARTS AT 1)

;	0763	!

;	0764	! IMPLICIT INPUTS:

;	0765	!	NONE

;	0766	!

;	0767	! OUTPUT PARAMETERS:

;	0768	!	NONE

;	0769	!

;	0770	! IMPLICIT OUTPUTS:

;	0771	!	NONE

;	0772	!

;	0773	! ROUTINE VALUE:

;	0774	!	NONE

;	0775	!

;	0776	! SIDE EFFECTS:

;	0777	!	NONE

;	0778	!

;	0779	!--

;	0780	

;	0781	BEGIN

;	0782	

;	0783	EXTERNAL REGISTER

;	0784		MVL_ENTRY	=  9 : REF BBLOCK,	!ADDRESS OF CURRENT REL VOL IN MVL

;	0785		UCB_LIST	= 10 : REF VECTOR,	!ADDRESS OF UCB'S ALLOCATED

;	0786		COMMON_REG;

;	0787	

;	0788	LOCAL

;	0789		CCB		: REF BBLOCK;		!ADDRESS OF CHANNEL CONTROL BLOCK

;	0790	

;	0791	! CALCULATE ADDRESS OF CHANNEL CONTROL BLOCK

;	0792	CCB = .CTL$GL_CCBBASE - .IO_CHANNEL;

;	0793	

;	0794	! ASSIGN CHANNEL TO UNIT AND SET CURRENT UCB

;	0795	CCB[CCB$L_UCB] = .UCB_LIST[.UNIT];

;	0796	CURRENT_UCB = .UCB_LIST[.UNIT];

;	0797	

;	0798	! NOW SET VOLUME CONTROL BLOCK FIELDS

;	0799	CURRENT_VCB[VCB$W_RVN] = .UNIT;

;	0800	CURRENT_VCB[VCB$B_CUR_RVN] = .VOL;

;	0801	

;	0802	! NOTE WHICH UNIT THE VOLUME IS MOUNTED ON

;	0803	MVL_ENTRY[MVL$B_RVN] = .UNIT;



; Bliss-32 7.352	Saturday 21-AUG-1978 23:38:28	DBB3:[MTAACP.SRC]MOUVOL.B32;29					Page 5-1

; Digital Equipment Corporation

;

;	0804	END;						!END OF ROUTINE











					 0000 00255 MAKE_CUR_VOL:

							    .WORD   Save nothing					      ; 0749

	   51 00000000G  9F	0000G  CF  C3 00257 	    SUBL3   IO_CHANNEL, @#CTL$GL_CCBBASE, CCB			      ; 0792

		         50	  04   AC  D0 00261 	    MOVL    UNIT, R0						      ; 0795

		         61	     6A40  D0 00265 	    MOVL    (UCB_LIST)[R0], (CCB)				      ;

		  0000G  CF	     6A40  D0 00269 	    MOVL    (UCB_LIST)[R0], CURRENT_UCB				      ; 0796

		    0E   AB	       50  B0 0026F 	    MOVW    R0, 14(CURRENT_VCB)					      ; 0799

		    2F   AB	  08   AC  90 00273 	    MOVB    VOL, 47(CURRENT_VCB)				      ; 0800

		    06   A9	       50  90 00278 	    MOVB    R0, 6(MVL_ENTRY)					      ; 0803

					   04 0027C 	    RET     							      ; 0749



; Routine Size:  40 bytes







; Bliss-32 7.352	Saturday 21-AUG-1978 23:38:28	DBB3:[MTAACP.SRC]MOUVOL.B32;29					Page 6

; Digital Equipment Corporation

;

;	0805	ROUTINE MAKE_VOL_ENTRY(VOL,MVL) : COMMON_CALL  =

;	0806	

;	0807	!++

;	0808	!

;	0809	! FUNCTIONAL DESCRIPTION:

;	0810	!	THIS ROUTINE PUTS A RELATIVE VOLUME IN THE MAGNETIC TAPE VOLUME

;	0811	!	LIST BY MAKING A NEW BLOCK AND DEALLOCATING THE OLD ONE

;	0812	!

;	0813	! CALLING SEQUENCE:

;	0814	!	MAKE_VOL_ENTRY(ARG1), CALLED IN KERNEL MODE

;	0815	!	ARG2 - ADDRESS OF MAGNETIC TAPE VOLUME LIST

;	0816	!

;	0817	! INPUT PARAMETERS:

;	0818	!	ARG1 - VOLUME NUMBER

;	0819	!

;	0820	! IMPLICIT INPUTS:

;	0821	!	CURRENT_VCB - ADDRESS OF CURRENT VOLUME CONTROL BLOCK

;	0822	!

;	0823	! OUTPUT PARAMETERS:

;	0824	!	NONE

;	0825	!

;	0826	! IMPLICIT OUTPUTS:

;	0827	!	MVL REBUILT

;	0828	!

;	0829	! ROUTINE VALUE:

;	0830	!	ADDRESS OF MVL CONTROL BLOCK

;	0831	!

;	0832	! SIDE EFFECTS:

;	0833	!	NONE

;	0834	!

;	0835	!--

;	0836	

;	0837	BEGIN

;	0838	

;	0839	EXTERNAL REGISTER

;	0840		COMMON_REG;

;	0841	

;	0842	MAP

;	0843		MVL		: REF BBLOCK;		!ADDRESS OF MAG TAPE VOLUME LIST

;	0844	

;	0845	LOCAL

;	0846		MVL_ADDR	: REF BBLOCKVECTOR[10,MVL$K_LENGTH],	!ADDRESS OF MVL CONTROL BLOCK

;	0847		NEWMVL		: REF BBLOCK,		!ADDRESS OF NEW MVL CONTROL BLOCK

;	0848		NVOL;					!NUMBER OF VOLUMES

;	0849	

;	0850	EXTERNAL ROUTINE

;	0851		ALLOCATE,				!ALLOCATE NON_PAGED SYSTEM MEMORY

;	0852		DEALLOCATE;				!DEALLOCATE NON_PAGED SYSTEM MEMORY

;	0853	

;	0854	NVOL = .MVL[MVL$B_NVOLS];			!GET NUMBER OF VOLUMES IT WILL HOLD

;	0855	NEWMVL = ALLOCATE((.VOL * MVL$K_LENGTH) + MVL$K_FIXLEN);!ALLOCATE NON_PAGED SYSTEM SPACE

;	0856	NEWMVL[MVL$B_TYPE] = DYN$C_MVL;

;	0857	NEWMVL[MVL$L_VCB] = .CURRENT_VCB;		!INITIALIZE NEW MVL

;	0858	NEWMVL[MVL$B_NVOLS] = .VOL;

;	0859	CH$MOVE(.MVL[MVL$W_SIZE] - MVL$K_FIXLEN,.MVL + MVL$K_FIXLEN,



; Bliss-32 7.352	Saturday 21-AUG-1978 23:38:28	DBB3:[MTAACP.SRC]MOUVOL.B32;29					Page 6-1

; Digital Equipment Corporation

;

;	0860		.NEWMVL + MVL$K_FIXLEN);

;	0861	MVL_ADDR = .NEWMVL + MVL$K_FIXLEN;

;	0862	

;	0863	! BLANK NEW RELATIVE VOLUME LABLES

;	0864	INCR I FROM .NVOL TO .VOL -1 DO

;	0865	    (CH$FILL(' ',MVL$S_VOLLBL,MVL_ADDR[.I,MVL$T_VOLLBL]));

;	0866	DEALLOCATE(.MVL);

;	0867	CURRENT_VCB[VCB$L_MVL] = .NEWMVL;

;	0868	RETURN .NEWMVL;

;	0869	END;						!END OF ROUTINE







							    .GLOBL  ALLOCATE, DEALLOCATE



					 07FC 0027D MAKE_VOL_ENTRY:

							    .WORD   Save R2,R3,R4,R5,R6,R7,R8,R9,R10			      ; 0805

		         5E	       04  C2 0027F 	    SUBL2   #4, SP						      ;

		         58	  08   AC  D0 00282 	    MOVL    MVL, R8						      ; 0854

		         56	  0B   A8  9A 00286 	    MOVZBL  11(R8), NVOL					      ;

		         5A	  04   AC  D0 0028A 	    MOVL    VOL, R10						      ; 0855

	   7E	         5A	       03  78 0028E 	    ASHL    #3, R10, -(SP)					      ;

		         6E	       0C  C0 00292 	    ADDL2   #12, (SP)						      ;

		  0000G  CF	       01  FB 00295 	    CALLS   #1, ALLOCATE					      ;

		         57	       50  D0 0029A 	    MOVL    R0, NEWMVL						      ;

		    0A   A7	       16  90 0029D 	    MOVB    #22, 10(NEWMVL)					      ; 0856

		         67	       5B  D0 002A1 	    MOVL    CURRENT_VCB, (NEWMVL)				      ; 0857

		    0B   A7	       5A  90 002A4 	    MOVB    R10, 11(NEWMVL)					      ; 0858

		         50	  08   A8  3C 002A8 	    MOVZWL  8(R8), R0						      ; 0859

		         50	       0C  C2 002AC 	    SUBL2   #12, R0						      ;

      0C   A7	    0C   A8	       50  28 002AF 	    MOVC3   R0, 12(R8), 12(NEWMVL)				      ;

		         59	  0C   A7  9E 002B5 	    MOVAB   12(NEWMVL), MVL_ADDR				      ; 0861

				       56  D7 002B9 	    DECL    I							      ; 0864

				       0B  11 002BB 	    BRB     2$							      ;

		         6E	     6946  7E 002BD 1$:     MOVAQ   (MVL_ADDR)[I], (SP)					      ; 0865

	   20	         6E	       00  2C 002C1 	    MOVC5   #0, (SP), #32, #6, @0(SP)				      ;

		    00   BE	       06     002C5									      ;

	   F1	         56	       5A  F2 002C8 2$:     AOBLSS  R10, I, 1$						      ; 0864

				       58  DD 002CC 	    PUSHL   R8							      ; 0866

		  0000G  CF	       01  FB 002CE 	    CALLS   #1, DEALLOCATE					      ;

		    34   AB	       57  D0 002D3 	    MOVL    NEWMVL, 52(CURRENT_VCB)				      ; 0867

		         50	       57  D0 002D7 	    MOVL    NEWMVL, R0						      ; 0868

					   04 002DA 	    RET     							      ; 0805



; Routine Size:  94 bytes





;	0870	



; Bliss-32 7.352	Saturday 21-AUG-1978 23:38:28	DBB3:[MTAACP.SRC]MOUVOL.B32;29					Page 7

; Digital Equipment Corporation

;

;	0871	ROUTINE ASSUME_MOUNTED : NOVALUE MVL_UCB  =

;	0872	

;	0873	!++

;	0874	!

;	0875	! FUNCTIONAL DESCRIPTION:

;	0876	!	THIS ROUTINE INDICATES THAT THE VOLUME IS MOUNTED

;	0877	!	AND SETS POSITION POINTERS TO THE BEGINNING OF TAPE

;	0878	!

;	0879	! CALLING SEQUENCE:

;	0880	!	ASSUME_MOUNTED(ARG1), CALLED IN KERNEL MODE

;	0881	!

;	0882	! INPUT PARAMETERS:

;	0883	!	NONE

;	0884	!

;	0885	! IMPLICIT INPUTS:

;	0886	!	MVL_ENTRY - ADDRESS OF CURRENT REL VOLUME ENTRY IN MVL

;	0887	!	CURRENT_VCB - ADDRESS OF CURRENT VOLUME CONTROL BLOCK

;	0888	!

;	0889	! OUTPUT PARAMETERS:

;	0890	!	NONE

;	0891	!

;	0892	! IMPLICIT OUTPUTS:

;	0893	!	NONE

;	0894	!

;	0895	! ROUTINE VALUE:

;	0896	!	NONE

;	0897	!

;	0898	! SIDE EFFECTS:

;	0899	!	NONE

;	0900	!

;	0901	!--

;	0902	

;	0903	BEGIN

;	0904	

;	0905	EXTERNAL REGISTER

;	0906		MVL_ENTRY	=  9 : REF BBLOCK,

;	0907		UCB_LIST	= 10 : REF VECTOR,

;	0908		COMMON_REG;

;	0909	

;	0910	MVL_ENTRY[MVL$V_MOUNTED] = 1;		!SET IT MOUNTED

;	0911	CURRENT_VCB[VCB$B_TM] = 0;

;	0912	CURRENT_VCB[VCB$L_ST_RECORD] = 0;

;	0913	CURRENT_VCB[VCB$V_LOGICEOVS] = 0;

;	0914	END;					!END OF ROUTINE











					 0000 002DB ASSUME_MOUNTED:

							    .WORD   Save nothing					      ; 0871

		    07   A9	       01  88 002DD 	    BISB2   #1, 7(MVL_ENTRY)					      ; 0910

				  2E   AB  94 002E1 	    CLRB    46(CURRENT_VCB)					      ; 0911

				  30   AB  D4 002E4 	    CLRL    48(CURRENT_VCB)					      ; 0912

		    0B   AB	       02  8A 002E7 	    BICB2   #2, 11(CURRENT_VCB)					      ; 0913



; Bliss-32 7.352	Saturday 21-AUG-1978 23:38:28	DBB3:[MTAACP.SRC]MOUVOL.B32;29					Page 7-1

; Digital Equipment Corporation

;

					   04 002EB 	    RET     							      ; 0871



; Routine Size:  17 bytes





;	0915	



; Bliss-32 7.352	Saturday 21-AUG-1978 23:38:28	DBB3:[MTAACP.SRC]MOUVOL.B32;29					Page 8

; Digital Equipment Corporation

;

;	0916	ROUTINE OPERATOR_LBL	: NOVALUE MVL_UCB  =

;	0917	

;	0918	!++

;	0919	!

;	0920	! FUNCTIONAL DESCRIPTION:

;	0921	!	THIS ROUTINE RECORDS THE LABEL ENTERED BY THE OPERATOR

;	0922	!

;	0923	! CALLING SEQUENCE:

;	0924	!	OPERATOR_LBL, CALLED IN KERNEL MODE

;	0925	!

;	0926	! INPUT PARAMETERS:

;	0927	!	NONE

;	0928	!

;	0929	! IMPLICIT INPUTS:

;	0930	!	OPERATOR MAILBOX MESSAGE AND SIZE

;	0931	!

;	0932	! OUTPUT PARAMETERS:

;	0933	!	NONE

;	0934	!

;	0935	! IMPLICIT OUTPUTS:

;	0936	!	MAGNETIC TAPE VOLUME LABEL

;	0937	!

;	0938	! ROUTINE VALUE:

;	0939	!	NONE

;	0940	!

;	0941	! SIDE EFFECTS:

;	0942	!	NONE

;	0943	!

;	0944	! USER ERRORS:

;	0945	!	NONE

;	0946	!

;	0947	!--

;	0948	

;	0949	BEGIN

;	0950	

;	0951	EXTERNAL REGISTER

;	0952		MVL_ENTRY	=  9 : REF BBLOCK,

;	0953		UCB_LIST	= 10 : REF VECTOR,

;	0954		COMMON_REG;

;	0955	

;	0956	LOCAL

;	0957		OPR_INPUT	: REF VECTOR [,BYTE],

;	0958		SIZE;

;	0959	

;	0960	OPR_INPUT = MAIL[OPC$L_MS_TEXT];

;	0961	SIZE = 0;

;	0962	INCR I FROM 0 TO .MAILSZ-1 DO

;	0963	    BEGIN

;	0964	    IF .OPR_INPUT[.I] EQL '/' THEN EXITLOOP;

;	0965	    SIZE = .SIZE + 1;

;	0966	    END;

;	0967	IF .SIZE NEQ 0 THEN

;	0968	CH$COPY(.SIZE,MAIL[OPC$L_MS_TEXT],' ',MVL$S_VOLLBL,MVL_ENTRY[MVL$T_VOLLBL]);

;	0969	END;





; Bliss-32 7.352	Saturday 21-AUG-1978 23:38:28	DBB3:[MTAACP.SRC]MOUVOL.B32;29					Page 8-1

; Digital Equipment Corporation

;









					 003C 002EC OPERATOR_LBL:

							    .WORD   Save R2,R3,R4,R5					      ; 0916

		         51	0000G  CF  9E 002EE 	    MOVAB   MAIL+8, OPR_INPUT					      ; 0960

				       52  D4 002F3 	    CLRL    SIZE						      ; 0961

		         50	       01  CE 002F5 	    MNEGL   #1, I						      ; 0962

				       08  11 002F8 	    BRB     2$							      ;

		         2F	     6041  91 002FA 1$:     CMPB    (I)[OPR_INPUT], #47					      ; 0964

				       08  13 002FE 	    BEQL    3$							      ;

				       52  D6 00300 	    INCL    SIZE						      ; 0965

	   F2	         50	0000G  CF  F2 00302 2$:     AOBLSS  MAILSZ, I, 1$					      ; 0962

				       52  D5 00308 3$:     TSTL    SIZE						      ; 0967

				       08  13 0030A 	    BEQL    4$							      ;

	   20	  0000G  CF	       52  2C 0030C 	    MOVC5   SIZE, MAIL+8, #32, #6, (MVL_ENTRY)			      ; 0968

		         69	       06     00312									      ;

					   04 00314 4$:     RET     							      ; 0916



; Routine Size:  41 bytes





;	0970	END

;	0971	ELUDOM













;				       PSECT SUMMARY

;

;	Name		 Bytes			       Attributes

;

;  $CODE$         	   789  NOWRT,  RD ,  EXE,NOSHR,  LCL,  REL,  CON,NOPIC,ALIGN(2)









;				LIBRARY STATISTICS

;

;					     -------- Symbols --------    Blocks

;	File				     Total    Loaded   Percent      Read

;

;  DBA4:[SYSLIB]LIB.L32;1		      5582        42         0       252











;	0972	

; Size:		781 code + 8 data bytes

; Run Time:	00:28.0

; Elapsed Time:	01:16.4



; Bliss-32 7.352	Saturday 21-AUG-1978 23:38:28									Page 8-2

; Digital Equipment Corporation

;

; Memory Used:	384 pages

; Compilation Complete

