

; Bliss-32 7.352	Saturday 21-AUG-1978 23:26:25	DBB3:[MTAACP.SRC]ACPCTR.B32;29					Page 1

; Digital Equipment Corporation

;

;	0001	MODULE ACPCTR (

;	0002			LANGUAGE (BLISS32),

;	0003			IDENT = 'A0007'

;	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 HANDLES ACP CONTROL FUNCTIONS

;	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:  09-JUL-1977  

;	0043	!

;	0044	! REVISION HISTORY:

;	0045	!

;	0046	!   D. H. Gillespie, 16-Jan-1978  17:29

;	0047	!   X0002 - ADD CHECK FOR MUST CLOSE FILE

;	0048	!

;	0049	!   D. H. Gillespie, 25-Jan-1978  14:05

;	0050	!   X0003 - CLEANUP WINDOW IF CANCELED REQUEST IS AN ACCESS

;	0051	!

;	0052	!   D. H. Gillespie, 11-May-78  16:47

;	0053	!   A0001 - change CURRENT_VCB to register

;	0054	!

;	0055	!   D. H. Gillespie, 17-May-78  14:19



; Bliss-32 7.352	Saturday 21-AUG-1978 23:26:25	DBB3:[MTAACP.SRC]ACPCTR.B32;29					Page 1-1

; Digital Equipment Corporation

;

;	0056	!   A0002 - stall cancel when waiting for rewind or volume mount to complete

;	0057	!

;	0058	!   D. H. Gillespie, 18-May-78  11:33

;	0059	!   A0003 - change MOUNT function from IO$_ACPCONTROL TO IO$_MOUNT

;	0060	!

;	0061	!   D. H. Gillespie, 22-May-78  16:31

;	0062	!   A0004 - add NOTUSED

;	0063	!

;	0064	!   D. H. Gillespie, 6-Jul-78  12:58

;	0065	!   A0005 - add send message to error logger

;	0066	!   D. H. Gillespie, 7-Aug-78  19:15

;	0067	!   A0006 - pick up process name of mounter for opcom messages

;	0068	!

;	0069	!   D. H. Gillespie, 17-Aug-78  13:50

;	0070	!   A0007 - correct bug where window was not cleaned if DEACCESS is aborted

;	0071	!

;	0072	!**

;	0073	

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

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

;	0371	

;	0372	FORWARD ROUTINE

;	0373		MTA_ACPCNTRL	: NOPRES NOVALUE,	!CONTROL FUNCTION DISPATCH

;	0374		MTA_MOUNT	: NOPRES NOVALUE,	!MOUNT FUNCTION

;	0375		CANCEL_IO	: COMMON_CALL NOVALUE,	!CANCEL I/O CONTROL

;	0376		DO_CANCEL	: COMMON_CALL NOVALUE,	!DO ACTUAL CANCELATION OF IO

;	0377		MOUNT		: COMMON_CALL NOVALUE,	!MOUNT CONTROL FUNCTION, KERNEL MODE

;	0378		STALL		: COMMON_CALL NOVALUE,	!STALL CANCEL

;	0379		TERMINATE_VOL	: COMMON_CALL NOVALUE;	!TERMINATE MOUNT VOLUME REQUEST

;	0380	

;	0381	EXTERNAL ROUTINE

;	0382		CANCEL_OP_REPLY,			!CANCEL REPLY FROM OPERATOR

;	0383		IO_DONE,				!COMPLETE IO

;	0384		NEXT_VOL_READ	: L$NEXT_VOL_READ NOVALUE,	!GET NEXT VOL FOR READ

;	0385		NEXT_VOL_WRITE	: L$NEXT_VOL_WRIT NOVALUE,	!GET NEXT VOL FOR WRITE

;	0386		READ_BLOCK,				!READ A TAPE BLOCK

;	0387		RET_FREE_PAGE,				!RETURN VIRTUAL PAGE TO FREE LIST

;	0388		RETURN_ALL_ERR,				!RETURN BLOCKED VIRTUAL IO IN ERROR

;	0389		SEND_ERRLOG,

;	0390		SPACE_TM,				!SPACE TAPE MARK

;	0391		SYS$QIOW	: ADDRESSING_MODE(ABSOLUTE),

;	0392		ZERO_CHANNEL;				!ZERO CHANNEL

;	0393	

;	0394	EXTERNAL

;	0395		SCH$GL_PCBVEC	: REF VECTOR ADDRESSING_MODE(ABSOLUTE),

;	0396		CTL$GL_CCBBASE	: REF BBLOCK ADDRESSING_MODE(ABSOLUTE),

;	0397		CURRENT_UCB	: REF BBLOCK,

;	0398		CURRENT_WCB	: REF BBLOCK,		!ADDRESS OF CURRENT WINDOW CONTROL BLOCK

;	0399		HDR1		: REF BBLOCK,		!HDR1(EOF1) LABEL

;	0400		IO_CHANNEL,

;	0401		IO_PACKET	: REF BBLOCK,		!ADDRESS OF CURRENT IO PACKET

;	0402		USER_STATUS;				!ADDRESS OF USER STATUS



; Bliss-32 7.352	Saturday 21-AUG-1978 23:26:25	DBB3:[MTAACP.SRC]ACPCTR.B32;29					Page 2

; Digital Equipment Corporation

;

;	0403	GLOBAL ROUTINE MTA_ACPCNTRL : NOPRES NOVALUE  =

;	0404	

;	0405	!++

;	0406	!

;	0407	! FUNCTIONAL DESCRIPTION:

;	0408	!	THIS ROUTINE HANDLES THE ACP CONTROL FUNCTION

;	0409	!

;	0410	! CALLING SEQUENCE:

;	0411	!	MTA_ACPCNTRL()

;	0412	!

;	0413	! INPUT PARAMETERS:

;	0414	!	NONE

;	0415	!

;	0416	! IMPLICIT INPUTS:

;	0417	!	CURRENT_UCB - ADDRESS OF CURRENT UNIT CONTROL BLOCK

;	0418	!	CURRENT_VCB - ADDRESS OF CURRENT VOLUME CONTROL BLOCK

;	0419	!	IO_PACKET - ADDRESS OF CURRENT IO REQUEST PACKET

;	0420	!	QUEUE_HEAD  - ADDRESS OF ACP QUEUE

;	0421	!

;	0422	! OUTPUT PARAMETERS:

;	0423	!	NONE

;	0424	!

;	0425	! IMPLICIT OUTPUTS:

;	0426	!	LOCAL_FIB - COPY OF USER'S FIB

;	0427	!

;	0428	! ROUTINE VALUE:

;	0429	!	NONE

;	0430	!

;	0431	! SIDE EFFECTS:

;	0432	!	NONE

;	0433	!

;	0434	!--

;	0435	

;	0436	BEGIN

;	0437	EXTERNAL REGISTER

;	0438		COMMON_REG;

;	0439	

;	0440	EXTERNAL ROUTINE

;	0441		GET_FIB,			!GET USER'S FILE INFORMATION BLOCK

;	0442		POSITION_TO_END,		!POSITION VOLUME SET TO END

;	0443		SPACE_IN_FILE,			!SPACE WITHIN FILE

;	0444		REWIND_FILE,			!REWIND FILE

;	0445		REWIND_VOL_SET;			!REWIND VOLUME SET

;	0446	

;	0447	EXTERNAL

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

;	0449		IO_PACKET	: REF BBLOCK,	!ADDRESS OF CURRENT IO REQUEST PACKET

;	0450		QUEUE_HEAD	: REF BBLOCK;	!ADDRESS OF ACP QUEUE HEAD

;	0451	

;	0452	LOCAL

;	0453		FIB		: REF BBLOCK,	!ADDRESS OF COPY OF USER'S FILE INFO BLOCK

;	0454		FUNCTION	: BBLOCK[1],	!IO FUNCTION CODE AND MODIFIERS

;	0455		PACKET		: REF BBLOCK;	!ADDRESS OF IO REQUEST PACKET

;	0456	

;	0457	PACKET = .IO_PACKET;			!GET ADDRESS  OF IO PACKET



; Bliss-32 7.352	Saturday 21-AUG-1978 23:26:25	DBB3:[MTAACP.SRC]ACPCTR.B32;29					Page 2-1

; Digital Equipment Corporation

;

;	0458	FUNCTION = .PACKET[IRP$W_FUNC];		!GET FUNCTION CODE AND MODIFIERS

;	0459	

;	0460	IF .FUNCTION[IO$V_DMOUNT] OR .FUNCTION[IO$V_MOUNT]

;	0461	THEN RETURN;

;	0462	

;	0463	IF NOT .PACKET[IRP$V_VIRTUAL] THEN 

;	0464	    BEGIN

;	0465	    KERNEL_CALL(CANCEL_IO);

;	0466	    IF (.CURRENT_VCB[VCB$V_WAIMOUVOL] AND NOT CANCEL_OP_REPLY()) 

;	0467	    OR .CURRENT_VCB[VCB$V_WAIUSRLBL] THEN

;	0468		BEGIN

;	0469		ERROR(SS$_CANCEL);

;	0470		KERNEL_CALL(DO_CANCEL);

;	0471		END;

;	0472	

;	0473	! Stall cancel until rewind or mount vol complete so cancels are not

;	0474	! continuously issued.

;	0475	    IF .CURRENT_VCB[VCB$V_WAIREWIND] OR .CURRENT_VCB[VCB$V_WAIMOUVOL]

;	0476	    THEN KERNEL_CALL(STALL);

;	0477	    RETURN;

;	0478	    END;

;	0479	FIB = GET_FIB(.BBLOCK[.PACKET[IRP$L_SVAPTE],AIB$L_DESCRIPT]);

;	0480	IF .CURRENT_VCB[VCB$V_WAIUSRLBL] THEN ERR_EXIT(SS$_WAITUSRLBL);

;	0481	IF .CURRENT_VCB[VCB$V_MUSTCLOSE] THEN ERR_EXIT(SS$_MUSTCLOSEFL);

;	0482	CASE .FIB[FIB$W_CNTRLFUNC] FROM FIB$C_REWINDVOL TO FIB$C_REWINDFIL OF

;	0483	    SET

;	0484	    [FIB$C_REWINDFIL]	:	REWIND_FILE();

;	0485	    [FIB$C_POSEND]	:	POSITION_TO_END();

;	0486	    [FIB$C_NEXTVOL]	:	BEGIN

;	0487	

;	0488	! FILE MUST BE ACCESSED

;	0489					IF .CURRENT_WCB EQL 0 THEN ERR_EXIT(SS$_FILNOTACC);

;	0490	

;	0491	! IF NOT IN DATA AREA, NOT APPROPRIATE TIME TO BE DOING A NEXT VOLUME

;	0492					IF .CURRENT_VCB[VCB$B_TM] NEQ 1 THEN ERR_EXIT(SS$_ILLSEQOP);

;	0493	

;	0494					IF .CURRENT_WCB[WCB$V_READ] THEN

;	0495					    BEGIN			!READ CASE

;	0496					    SPACE_TM(1);			!SPACE TO TRAILER RECORD

;	0497					    IF NOT READ_BLOCK(.HDR1,80) THEN ERR_EXIT(SS$_TAPEPOSLOST);

;	0498					    IF .HDR1[EO1$L_EO1LID] EQL 'EOF1' THEN ERR_EXIT(SS$_ENDOFFILE);

;	0499					    NEXT_VOL_READ();

;	0500					    END

;	0501					ELSE

;	0502					    NEXT_VOL_WRITE();			!WRITE CASE

;	0503					END;

;	0504	    [FIB$C_SPACE]	:	SPACE_IN_FILE();

;	0505	    [FIB$C_REWINDVOL]	:	REWIND_VOL_SET();

;	0506	    [OUTRANGE]		:	ERR_EXIT(SS$_ILLCNTRFUNC);

;	0507	    [INRANGE]		:	ERR_EXIT(SS$_ILLCNTRFUNC);

;	0508	    TES;

;	0509	END;





							    .TITLE  ACPCTR



; Bliss-32 7.352	Saturday 21-AUG-1978 23:26:25	DBB3:[MTAACP.SRC]ACPCTR.B32;29					Page 2-2

; Digital Equipment Corporation

;

							    .IDENT  \A0007\



							    .GLOBL  CANCEL_OP_REPLY, IO_DONE, NEXT_VOL_READ, NEXT_VOL_WRITE

							    .GLOBL  READ_BLOCK, RET_FREE_PAGE, RETURN_ALL_ERR, SEND_ERRLOG

							    .GLOBL  SPACE_TM, SYS$QIOW, ZERO_CHANNEL, SCH$GL_PCBVEC

							    .GLOBL  CTL$GL_CCBBASE, CURRENT_UCB, CURRENT_WCB, HDR1

							    .GLOBL  IO_CHANNEL, IO_PACKET, USER_STATUS, GET_FIB, POSITION_TO_END

							    .GLOBL  SPACE_IN_FILE, REWIND_FILE, REWIND_VOL_SET, QUEUE_HEAD

							    .GLOBL  SYS$CMKRNL



							    .PSECT  $CODE$,NOWRT,2



					 0000 00000 	    .ENTRY  MTA_ACPCNTRL, Save nothing				      ; 0403

		         52	0000G  CF  D0 00002 	    MOVL    IO_PACKET, PACKET					      ; 0457

		         50	  20   A2  3C 00007 	    MOVZWL  32(PACKET), FUNCTION				      ; 0458

	   01	         50	       0A  E1 0000B 	    BBC     #10, FUNCTION, 1$					      ; 0460

					   04 0000F 	    RET     							      ;

	   01	         50	       09  E1 00010 1$:     BBC     #9, FUNCTION, 2$					      ;

					   04 00014 	    RET     							      ;

	   52	    2A   A2	       04  E0 00015 2$:     BBS     #4, 42(PACKET), 7$					      ; 0463

				       7E  D4 0001A 	    CLRL    -(SP)						      ; 0465

				       5E  DD 0001C 	    PUSHL   SP							      ;

				0000V  CF  9F 0001E 	    PUSHAB  CANCEL_IO						      ;

	      00000000G  9F	       03  FB 00022 	    CALLS   #3, @#SYS$CMKRNL					      ;

	   08	    0B   AB	       02  E1 00029 	    BBC     #2, 11(CURRENT_VCB), 3$				      ; 0466

		  0000G  CF	       00  FB 0002E 	    CALLS   #0, CANCEL_OP_REPLY					      ;

		         05	       50  E9 00033 	    BLBC    R0, 4$						      ;

	   16	    0B   AB	       04  E1 00036 3$:     BBC     #4, 11(CURRENT_VCB), 5$				      ; 0467

		  0000G  CF	0830   8F  B0 0003B 4$:     MOVW    #2096, USER_STATUS					      ; 0469

				       7E  D4 00042 	    CLRL    -(SP)						      ; 0470

				       5E  DD 00044 	    PUSHL   SP							      ;

				0000V  CF  9F 00046 	    PUSHAB  DO_CANCEL						      ;

	      00000000G  9F	       03  FB 0004A 	    CALLS   #3, @#SYS$CMKRNL					      ;

	   06	    0B   AB	       03  E0 00051 5$:     BBS     #3, 11(CURRENT_VCB), 6$				      ; 0475

	   01	    0B   AB	       02  E0 00056 	    BBS     #2, 11(CURRENT_VCB), 6$				      ;

					   04 0005B 	    RET     							      ;

				       7E  D4 0005C 6$:     CLRL    -(SP)						      ; 0476

				       5E  DD 0005E 	    PUSHL   SP							      ;

				0000V  CF  9F 00060 	    PUSHAB  STALL						      ;

	      00000000G  9F	       03  FB 00064 	    CALLS   #3, @#SYS$CMKRNL					      ;

					   04 0006B 	    RET     							      ; 0477

				  2C   B2  DD 0006C 7$:     PUSHL   @44(PACKET)						      ; 0479

		  0000G  CF	       01  FB 0006F 	    CALLS   #1, GET_FIB						      ;

	   04	    0B   AB	       04  E1 00074 	    BBC     #4, 11(CURRENT_VCB), 8$				      ; 0480

				0950   8F  BF 00079 	    CHMU    #2384						      ;

	   04	    0B   AB	       06  E1 0007D 8$:     BBC     #6, 11(CURRENT_VCB), 9$				      ; 0481

				0948   8F  BF 00082 	    CHMU    #2376						      ;

	   05	         01	  16   A0  AF 00086 9$:     CASEW   22(FIB), #1, #5					      ; 0482

	 001A	       0014	     006F     0008B 10$:    .WORD   20$-10$,-						      ;

	 000E	       0075	     0069     00091		    12$-10$,-						      ;

								    13$-10$,-						      ;

								    19$-10$,-						      ;

								    21$-10$,-						      ;

								    11$-10$						      ;

				       67  11 00097 	    BRB     21$							      ; 0506



; Bliss-32 7.352	Saturday 21-AUG-1978 23:26:25	DBB3:[MTAACP.SRC]ACPCTR.B32;29					Page 2-3

; Digital Equipment Corporation

;

		  0000G  CF	       00  FB 00099 11$:    CALLS   #0, REWIND_FILE					      ; 0484

					   04 0009E 	    RET     							      ; 0482

		  0000G  CF	       00  FB 0009F 12$:    CALLS   #0, POSITION_TO_END					      ; 0485

					   04 000A4 	    RET     							      ; 0482

				0000G  CF  D5 000A5 13$:    TSTL    CURRENT_WCB						      ; 0489

				       04  12 000A9 	    BNEQ    14$							      ;

				00AC   8F  BF 000AB 	    CHMU    #172						      ;

		         01	  2E   AB  91 000AF 14$:    CMPB    46(CURRENT_VCB), #1					      ; 0492

				       04  13 000B3 	    BEQL    15$							      ;

				02DC   8F  BF 000B5 	    CHMU    #732						      ;

		         50	0000G  CF  D0 000B9 15$:    MOVL    CURRENT_WCB, R0					      ; 0494

		         2E	  0B   A0  E9 000BE 	    BLBC    11(R0), 18$						      ;

				       01  DD 000C2 	    PUSHL   #1							      ; 0496

		  0000G  CF	       01  FB 000C4 	    CALLS   #1, SPACE_TM					      ;

		         7E	  50   8F  9A 000C9 	    MOVZBL  #80, -(SP)						      ; 0497

				0000G  CF  DD 000CD 	    PUSHL   HDR1						      ;

		  0000G  CF	       02  FB 000D1 	    CALLS   #2, READ_BLOCK					      ;

		         04	       50  E8 000D6 	    BLBS    R0, 16$						      ;

				0224   8F  BF 000D9 	    CHMU    #548						      ;

	      31464F45   8F	0000G  DF  D1 000DD 16$:    CMPL    @HDR1, #826691397					      ; 0498

				       04  12 000E6 	    BNEQ    17$							      ;

				0870   8F  BF 000E8 	    CHMU    #2160						      ;

				     0000  30 000EC 17$:    BSBW    NEXT_VOL_READ					      ; 0499

					   04 000EF 	    RET     							      ; 0494

				     0000  30 000F0 18$:    BSBW    NEXT_VOL_WRITE					      ; 0502

					   04 000F3 	    RET     							      ; 0482

		  0000G  CF	       00  FB 000F4 19$:    CALLS   #0, SPACE_IN_FILE					      ; 0504

					   04 000F9 	    RET     							      ; 0482

		  0000G  CF	       00  FB 000FA 20$:    CALLS   #0, REWIND_VOL_SET					      ; 0505

					   04 000FF 	    RET     							      ; 0482

				00E4   8F  BF 00100 21$:    CHMU    #228						      ; 0507

					   04 00104 22$:    RET     							      ; 0403



; Routine Size:  261 bytes





;	0510	

;	0511	

;	0512	



; Bliss-32 7.352	Saturday 21-AUG-1978 23:26:25	DBB3:[MTAACP.SRC]ACPCTR.B32;29					Page 3

; Digital Equipment Corporation

;

;	0513	ROUTINE MOUNT : COMMON_CALL NOVALUE  =

;	0514	

;	0515	!++

;	0516	!

;	0517	! FUNCTIONAL DESCRIPTION:

;	0518	!	THIS ROUTINE GETS A VIRTUAL PAGE FOR THE MOUNTED VOLUME TO USE

;	0519	!

;	0520	! CALLING SEQUENCE:

;	0521	!	MOUNT(), MUST BE CALLED IN KERNEL MODE

;	0522	!

;	0523	! INPUT PARAMETERS:

;	0524	!	NONE

;	0525	!

;	0526	! IMPLICIT INPUTS:

;	0527	!	CURRENT_UCB - ADDRESS OF CURRNET UNIT CONTROL BLOCK

;	0528	!	CURRENT_VCB - ADDRESS OF CURRENT VOLUME CONTROL BLOCK

;	0529	!

;	0530	! OUTPUT PARAMETERS:

;	0531	!	NONE

;	0532	!

;	0533	! IMPLICIT OUTPUTS:

;	0534	!	VIRTUAL PAGE FOR VOLUME TO USE

;	0535	!

;	0536	! ROUTINE VALUE:

;	0537	!	NONE

;	0538	!

;	0539	! SIDE EFFECTS:

;	0540	!	NONE

;	0541	!

;	0542	!--

;	0543	

;	0544	BEGIN

;	0545	

;	0546	EXTERNAL REGISTER

;	0547		COMMON_REG;

;	0548	

;	0549	EXTERNAL ROUTINE

;	0550		GET_FREE_PAGE;			!GET FREE VIRTUAL PAGE

;	0551	

;	0552	EXTERNAL

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

;	0554	

;	0555	LOCAL

;	0556		PCB		: REF BBLOCK,

;	0557		VPAGE		: REF BBLOCK;	!ADDRESS OF VIRTUAL PAGE FOR VOLUME SET

;	0558	

;	0559	

;	0560	! GET VIRTUAL PAGE FOR USE BY THE VOLUME SET

;	0561	GET_FREE_PAGE(1,VPAGE);

;	0562	VPAGE[VVP$B_TYPE] = VVP_TYPE;

;	0563	INSQUE(.VPAGE,CURRENT_VCB[VCB$L_VPFL]);

;	0564	VPAGE[VVP$L_STALLIOFL] = VPAGE[VVP$L_STALLIOFL];

;	0565	VPAGE[VVP$L_STALLIOBL] = VPAGE[VVP$L_STALLIOFL];

;	0566	CURRENT_UCB[UCB$L_DEVCHAR] = .CURRENT_UCB[UCB$L_DEVCHAR] OR

;	0567		(DEV$M_MNT OR DEV$M_DIR);



; Bliss-32 7.352	Saturday 21-AUG-1978 23:26:25	DBB3:[MTAACP.SRC]ACPCTR.B32;29					Page 3-1

; Digital Equipment Corporation

;

;	0568	PCB = .SCH$GL_PCBVEC[.(IO_PACKET[IRP$L_PID])<0,16>];

;	0569	CH$COPY(.(PCB[PCB$T_LNAME])<0,8>,PCB[PCB$T_LNAME] + 1,' ',

;	0570			VVP$S_PROC_NAME, VPAGE[VVP$T_PROC_NAME]);

;	0571	

;	0572	END;					!END OF PAGE







							    .GLOBL  GET_FREE_PAGE



					 003C 00105 MOUNT:  .WORD   Save R2,R3,R4,R5					      ; 0513

		         5E	       04  C2 00107 	    SUBL2   #4, SP						      ;

				       5E  DD 0010A 	    PUSHL   SP							      ; 0561

				       01  DD 0010C 	    PUSHL   #1							      ;

		  0000G  CF	       02  FB 0010E 	    CALLS   #2, GET_FREE_PAGE					      ;

		         50	       6E  D0 00113 	    MOVL    VPAGE, R0						      ; 0562

		    0A   A0	       02  90 00116 	    MOVB    #2, 10(R0)						      ;

		    3C   AB	       60  0E 0011A 	    INSQUE  (R0), 60(CURRENT_VCB)				      ; 0563

		         51	       6E  D0 0011E 	    MOVL    VPAGE, R1						      ; 0564

		         50	0104   C1  9E 00121 	    MOVAB   260(R1), R0						      ;

		         60	       50  D0 00126 	    MOVL    R0, (R0)						      ;

		  0108   C1	       50  D0 00129 	    MOVL    R0, 264(R1)						      ; 0565

		         50	0000G  CF  D0 0012E 	    MOVL    CURRENT_UCB, R0					      ; 0566

		    34   A0 00080008   8F  C8 00133 	    BISL2   #524296, 52(R0)					      ;

		         52 00000000G  9F  D0 0013B 	    MOVL    @#SCH$GL_PCBVEC, R2					      ; 0568

		         50	0000G  CF  D0 00142 	    MOVL    IO_PACKET, R0					      ;

		         50	  0C   A0  3C 00147 	    MOVZWL  12(R0), R0						      ;

		         50	     6240  D0 0014B 	    MOVL    (R2)[R0], PCB					      ;

		         50	  6C   A0  9E 0014F 	    MOVAB   108(R0), R0						      ; 0569

		         52	       60  9A 00153 	    MOVZBL  (R0), R2						      ;

	   20	    01   A0	       52  2C 00156 	    MOVC5   R2, 1(R0), #32, #12, 272(R1)			      ;

		  0110   C1	       0C     0015B									      ;

					   04 0015F 	    RET     							      ; 0513



; Routine Size:  91 bytes







; Bliss-32 7.352	Saturday 21-AUG-1978 23:26:25	DBB3:[MTAACP.SRC]ACPCTR.B32;29					Page 4

; Digital Equipment Corporation

;

;	0573	ROUTINE CANCEL_IO : COMMON_CALL NOVALUE  =

;	0574	

;	0575	!++

;	0576	!

;	0577	! FUNCTIONAL DESCRIPTION:

;	0578	!	THIS ROUTINE SETS THE CANCEL IO INDICATOR IF A FILE IS ACCESSED

;	0579	!

;	0580	! CALLING SEQUENCE:

;	0581	!	CANCEL_IO()

;	0582	!

;	0583	! INPUT PARAMETERS:

;	0584	!	NONE

;	0585	!

;	0586	! IMPLICIT INPUTS:

;	0587	!	CURRENT_VCB - ADDRESS OF CURRENT VOLUME CONTROL BLOCK

;	0588	!

;	0589	! OUTPUT PARAMETERS:

;	0590	!	NONE

;	0591	!

;	0592	! IMPLICIT OUTPUTS:

;	0593	!	NONE

;	0594	!

;	0595	! ROUTINE VALUE:

;	0596	!	NONE

;	0597	!

;	0598	! SIDE EFFECTS:

;	0599	!	NONE

;	0600	!

;	0601	! USER ERRORS:

;	0602	!	NONE

;	0603	!

;	0604	!--

;	0605	

;	0606	BEGIN

;	0607	

;	0608	EXTERNAL REGISTER

;	0609		COMMON_REG;

;	0610	

;	0611	IF .CURRENT_VCB[VCB$L_WCB] NEQ 0

;	0612	THEN CURRENT_VCB[VCB$V_CANCELIO] = 1;	!REMEMBER THAT CANCEL WAS ISSUED

;	0613	END;











					 0000 00160 CANCEL_IO:

							    .WORD   Save nothing					      ; 0573

				  38   AB  D5 00162 	    TSTL    56(CURRENT_VCB)					      ; 0611

				       04  13 00165 	    BEQL    1$							      ;

		    0B   AB	       20  88 00167 	    BISB2   #32, 11(CURRENT_VCB)				      ; 0612

					   04 0016B 1$:     RET     							      ; 0573



; Routine Size:  12 bytes





; Bliss-32 7.352	Saturday 21-AUG-1978 23:26:25	DBB3:[MTAACP.SRC]ACPCTR.B32;29					Page 4-1

; Digital Equipment Corporation

;



;	0614	



; Bliss-32 7.352	Saturday 21-AUG-1978 23:26:25	DBB3:[MTAACP.SRC]ACPCTR.B32;29					Page 5

; Digital Equipment Corporation

;

;	0615	GLOBAL ROUTINE DO_CANCEL : COMMON_CALL NOVALUE  =

;	0616	

;	0617	!++

;	0618	!

;	0619	! FUNCTIONAL DESCRIPTION:

;	0620	!	THIS ROUTINE CANCELS ALL BLOCKED IO AND ACP FUNCTIONS

;	0621	!

;	0622	! CALLING SEQUENCE:

;	0623	!	DO_CANCEL(), CALLED IN KERNEL MODE

;	0624	!

;	0625	! INPUT PARAMETERS:

;	0626	!	NONE

;	0627	!

;	0628	! IMPLICIT INPUTS:

;	0629	!	CURRENT_VCB - ADDRESS OF CURRENT VOLUME CONTROL BLOCK

;	0630	!	USER_STATUS - CONTAINS ERROR CODE WHICH BLOCKED IO SHOULD BE RETURNED WITH

;	0631	!

;	0632	! OUTPUT PARAMETERS:

;	0633	!	USER_STATUS - RESET TO NORMAL STATUS

;	0634	!

;	0635	! IMPLICIT OUTPUTS:

;	0636	!	NONE

;	0637	!

;	0638	! ROUTINE VALUE:

;	0639	!	NONE

;	0640	!

;	0641	! SIDE EFFECTS:

;	0642	!	NONE

;	0643	!

;	0644	! USER ERRORS:

;	0645	!	NONE

;	0646	!

;	0647	!--

;	0648	

;	0649	BEGIN

;	0650	

;	0651	EXTERNAL REGISTER

;	0652		COMMON_REG;

;	0653	

;	0654	LOCAL

;	0655		ABD	:  REF BBLOCKVECTOR [,ABD$C_LENGTH],

;	0656		BLOCK_PAGE,			!ADDRESS CONTAINING INFORMATION ABOUT BLOCKED REQUEST

;	0657		FUNCTION	: BLOCK [1],

;	0658		PACKET		: REF BBLOCK,	!ADDRESS OF IO BLOCKED REQUEST

;	0659		WINDOW;				!ADDRESS OF WINDOW FOR THIS REQUEST

;	0660	

;	0661	! IF THE PROCESS DOES NOT HAVE A VIRTUAL PAGE CONTAINING THE INFORMATION 

;	0662	! DESCRIBING THE BLOCKED REQUEST THEN HAVE  FATAL ERROR

;	0663	IF .CURRENT_VCB[VCB$L_VPFL] EQLA .CURRENT_VCB[VCB$L_VPBL]

;	0664	THEN BUG_CHECK(NOBVPVCB);

;	0665	REMQUE(.CURRENT_VCB[VCB$L_VPBL],BLOCK_PAGE);

;	0666	

;	0667	PACKET = .(.BLOCK_PAGE + VVP$K_LENGTH + IO_PACKET - USER_STATUS);

;	0668	RET_FREE_PAGE(.BLOCK_PAGE);		!RETURN PAGE(S) TO VIRTAUL MEMORY

;	0669	RETURN_ALL_ERR();			!RETURN ALL BLOCKED PHYSICAL IO IN ERROR



; Bliss-32 7.352	Saturday 21-AUG-1978 23:26:25	DBB3:[MTAACP.SRC]ACPCTR.B32;29					Page 5-1

; Digital Equipment Corporation

;

;	0670	

;	0671	IF .CURRENT_VCB[VCB$V_WAIMOUVOL] OR .CURRENT_VCB[VCB$V_WAIREWIND]

;	0672	THEN TERMINATE_VOL(.CURRENT_VCB[VCB$L_WCB]);

;	0673	

;	0674	! IF FIB DESCRIPTOR PRESENT, ZERO COUNT SO THE FIB IS NOT RETURNED.  

;	0675	! COMPLETE I/O.

;	0676	IF .PACKET NEQ 0 THEN

;	0677	    BEGIN

;	0678	

;	0679	!

;	0680	    IF .PACKET[IRP$V_COMPLX] THEN

;	0681		BEGIN

;	0682		FUNCTION = .PACKET[IRP$W_FUNC];

;	0683		ABD = .BBLOCK[.PACKET[IRP$L_SVAPTE],AIB$L_DESCRIPT];

;	0684		IF .FUNCTION[IO$V_ACCESS] THEN ZERO_CHANNEL(.PACKET)

;	0685		ELSE

;	0686		    BEGIN

;	0687		    FUNCTION = .PACKET[IRP$V_FCODE];

;	0688		    IF .FUNCTION NEQ IO$_DEACCESS

;	0689		    THEN ABD[ABD$C_WINDOW,ABD$W_COUNT] = 0;

;	0690		    END;

;	0691		ABD[ABD$C_FIB,ABD$W_COUNT] = 0;

;	0692		END;

;	0693	    IO_DONE(.PACKET);

;	0694	    END;

;	0695	

;	0696	

;	0697	! RETURN STALLED I/O WITH CANCEL 

;	0698	WHILE 1 DO

;	0699	    BEGIN

;	0700	    LOCAL SAVE_STATUS;

;	0701	    IF REMQUE(.BBLOCK[.CURRENT_VCB[VCB$L_VPFL],VVP$L_STALLIOFL],PACKET) THEN EXITLOOP;

;	0702	    IF .PACKET[IRP$V_COMPLX] THEN

;	0703		BEGIN

;	0704		FUNCTION = .PACKET[IRP$W_FUNC];

;	0705		ABD = .BBLOCK[.PACKET[IRP$L_SVAPTE],AIB$L_DESCRIPT];

;	0706		IF .FUNCTION[IO$V_ACCESS] THEN ZERO_CHANNEL(.PACKET)

;	0707		ELSE ABD[ABD$C_WINDOW,ABD$W_COUNT] = 0;

;	0708		ABD[ABD$C_FIB,ABD$W_COUNT] = 0;

;	0709		END;

;	0710	!

;	0711	! IF THIS IS A CANCEL REQUEST, RETURN IS WITH NORMAL STATUS

;	0712	    SAVE_STATUS = .USER_STATUS;

;	0713	    FUNCTION = .PACKET[IRP$V_FCODE];

;	0714	    IF .FUNCTION EQL IO$_ACPCONTROL 

;	0715	    AND NOT .PACKET[IRP$V_VIRTUAL]

;	0716	    THEN USER_STATUS = 1;

;	0717	    IO_DONE(.PACKET);

;	0718	    USER_STATUS = .SAVE_STATUS;

;	0719	    END;

;	0720	CURRENT_VCB[VCB$V_WAIREWIND] = 0;	!NO LONGER WAITING

;	0721	CURRENT_VCB[VCB$V_WAIUSRLBL] = 0;

;	0722	CURRENT_VCB[VCB$V_WAIMOUVOL] = 0;

;	0723	ERROR (SS$_NORMAL);			!CANCEL FUNCTION SHOULD COMPLETE NORMALLY

;	0724	



; Bliss-32 7.352	Saturday 21-AUG-1978 23:26:25	DBB3:[MTAACP.SRC]ACPCTR.B32;29					Page 5-2

; Digital Equipment Corporation

;

;	0725	END;







							    .PSECT  $LOCKEDC2$,NOWRT,2



					      00000 P.AAA:  .WORD   0, -257						      ;

					      00004 	    .WORD    <BUG$_NOBVPVCB!4>					      ;

					      00006	    .BLKB   2



							    .GLOBL  BUG$_NOBVPVCB



							    .PSECT  $CODE$,NOWRT,2



					 043C 0016C 	    .ENTRY  DO_CANCEL, Save R2,R3,R4,R5,R10			      ; 0615

		         5A	0000G  CF  9E 0016E 	    MOVAB   USER_STATUS, R10					      ;

		    40   AB	  3C   AB  D1 00173 	    CMPL    60(CURRENT_VCB), 64(CURRENT_VCB)			      ; 0663

				       05  12 00178 	    BNEQ    1$							      ;

		  0000'  CF	       00  FB 0017A 	    CALLS   #0, P.AAA						      ; 0664

		         50	  40   BB  0F 0017F 1$:     REMQUE  @64(CURRENT_VCB), BLOCK_PAGE			      ; 0665

		         51	0000GCF40  9E 00183 	    MOVAB   IO_PACKET[BLOCK_PAGE], R1				      ; 0667

		         52	       6A  9E 00189 	    MOVAB   USER_STATUS, R2					      ;

		         51	       52  C2 0018C 	    SUBL2   R2, R1						      ;

		         52	  0C   A1  D0 0018F 	    MOVL    12(R1), PACKET					      ;

				       50  DD 00193 	    PUSHL   BLOCK_PAGE						      ; 0668

		  0000G  CF	       01  FB 00195 	    CALLS   #1, RET_FREE_PAGE					      ;

		  0000G  CF	       00  FB 0019A 	    CALLS   #0, RETURN_ALL_ERR					      ; 0669

	   05	    0B   AB	       02  E0 0019F 	    BBS     #2, 11(CURRENT_VCB), 2$				      ; 0671

	   08	    0B   AB	       03  E1 001A4 	    BBC     #3, 11(CURRENT_VCB), 3$				      ;

				  38   AB  DD 001A9 2$:     PUSHL   56(CURRENT_VCB)					      ; 0672

		  0000V  CF	       01  FB 001AC 	    CALLS   #1, TERMINATE_VOL					      ;

				       52  D5 001B1 3$:     TSTL    PACKET						      ; 0676

				       32  13 001B3 	    BEQL    7$							      ;

	   26	    2A   A2	       03  E1 001B5 	    BBC     #3, 42(PACKET), 6$					      ; 0680

		         54	  20   A2  3C 001BA 	    MOVZWL  32(PACKET), FUNCTION				      ; 0682

		         53	  2C   B2  D0 001BE 	    MOVL    @44(PACKET), ABD					      ; 0683

	   09	         54	       06  E1 001C2 	    BBC     #6, FUNCTION, 4$					      ; 0684

				       52  DD 001C6 	    PUSHL   PACKET						      ;

		  0000G  CF	       01  FB 001C8 	    CALLS   #1, ZERO_CHANNEL					      ;

				       0E  11 001CD 	    BRB     5$							      ;

      20   A2	         06	       00  EF 001CF 4$:     EXTZV   #0, #6, 32(PACKET), FUNCTION			      ; 0687

				       54     001D4									      ;

		         34	       54  D1 001D5 	    CMPL    FUNCTION, #52					      ; 0688

				       03  13 001D8 	    BEQL    5$							      ;

				  02   A3  B4 001DA 	    CLRW    2(ABD)						      ; 0689

				  0A   A3  B4 001DD 5$:     CLRW    10(ABD)						      ; 0691

				       52  DD 001E0 6$:     PUSHL   PACKET						      ; 0693

		  0000G  CF	       01  FB 001E2 	    CALLS   #1, IO_DONE						      ;

		         50	  3C   AB  D0 001E7 7$:     MOVL    60(CURRENT_VCB), R0					      ; 0701

		         52	0104   D0  0F 001EB 	    REMQUE  @260(R0), PACKET					      ;

				       42  1D 001F0 	    BVS     12$							      ;

	   1B	    2A   A2	       03  E1 001F2 	    BBC     #3, 42(PACKET), 10$					      ; 0702

		         54	  20   A2  3C 001F7 	    MOVZWL  32(PACKET), FUNCTION				      ; 0704

		         53	  2C   B2  D0 001FB 	    MOVL    @44(PACKET), ABD					      ; 0705

	   09	         54	       06  E1 001FF 	    BBC     #6, FUNCTION, 8$					      ; 0706



; Bliss-32 7.352	Saturday 21-AUG-1978 23:26:25	DBB3:[MTAACP.SRC]ACPCTR.B32;29					Page 5-3

; Digital Equipment Corporation

;

				       52  DD 00203 	    PUSHL   PACKET						      ;

		  0000G  CF	       01  FB 00205 	    CALLS   #1, ZERO_CHANNEL					      ;

				       03  11 0020A 	    BRB     9$							      ;

				  02   A3  B4 0020C 8$:     CLRW    2(ABD)						      ; 0707

				  0A   A3  B4 0020F 9$:     CLRW    10(ABD)						      ; 0708

		         55	       6A  D0 00212 10$:    MOVL    USER_STATUS, SAVE_STATUS				      ; 0712

      20   A2	         06	       00  EF 00215 	    EXTZV   #0, #6, 32(PACKET), FUNCTION			      ; 0713

				       54     0021A									      ;

		         38	       54  D1 0021B 	    CMPL    FUNCTION, #56					      ; 0714

				       08  12 0021E 	    BNEQ    11$							      ;

	   03	    2A   A2	       04  E0 00220 	    BBS     #4, 42(PACKET), 11$					      ; 0715

		         6A	       01  D0 00225 	    MOVL    #1, USER_STATUS					      ; 0716

				       52  DD 00228 11$:    PUSHL   PACKET						      ; 0717

		  0000G  CF	       01  FB 0022A 	    CALLS   #1, IO_DONE						      ;

		         6A	       55  D0 0022F 	    MOVL    SAVE_STATUS, USER_STATUS				      ; 0718

				       B3  11 00232 	    BRB     7$							      ; 0698

		    0B   AB	       1C  8A 00234 12$:    BICB2   #28, 11(CURRENT_VCB)				      ; 0722

		         6A	       01  B0 00238 	    MOVW    #1, USER_STATUS					      ; 0723

					   04 0023B 	    RET     							      ; 0615



; Routine Size:  208 bytes







; Bliss-32 7.352	Saturday 21-AUG-1978 23:26:25	DBB3:[MTAACP.SRC]ACPCTR.B32;29					Page 6

; Digital Equipment Corporation

;

;	0726	GLOBAL ROUTINE TERMINATE_VOL(WINDOW) : COMMON_CALL NOVALUE  =

;	0727	

;	0728	!++

;	0729	!

;	0730	! FUNCTIONAL DESCRIPTION:

;	0731	!	THIS ROUTINE TERMINATES A MOUNT REQUEST.  IF A FILE IS OPEN

;	0732	!	THEN THE USER MUST CLOSE THE FILE.  THE WRITE INDICATOR IS CLEARED SO

;	0733	!	THAT EOF TRAILERS ARE NOT WRITTEN ON DEACCESS.  THE VOLUME IS MARKED

;	0734	!	NOT MOUNTED AND THE VOLUME POSITION IS MARKED AMBIGUOUS.

;	0735	

;	0736	!

;	0737	! CALLING SEQUENCE:

;	0738	!	TERMINATE_MOUNT(WINDOW), CALLED IN KERNEL MODE

;	0739	!

;	0740	! INPUT PARAMETERS:

;	0741	!	ARG1 - ADDRESS OF WINDOW FOR REQUEST

;	0742	!

;	0743	! IMPLICIT INPUTS:

;	0744	!	NONE

;	0745	!

;	0746	! OUTPUT PARAMETERS:

;	0747	!	NONE

;	0748	!

;	0749	! IMPLICIT OUTPUTS:

;	0750	!	NONE

;	0751	!

;	0752	! ROUTINE VALUE:

;	0753	!	NONE

;	0754	!

;	0755	! SIDE EFFECTS:

;	0756	!	NONE

;	0757	!

;	0758	! USER ERRORS:

;	0759	!	NONE

;	0760	!

;	0761	!--

;	0762	

;	0763	BEGIN

;	0764	EXTERNAL REGISTER

;	0765		COMMON_REG;

;	0766	

;	0767	

;	0768	MAP

;	0769		WINDOW	: REF BBLOCK;		!ADDRESS OF WINDOW CONTROL BLOCK

;	0770	

;	0771	LOCAL

;	0772		MVL_ENTRY	: REF BBLOCK;	!address of MVL entry

;	0773	

;	0774	

;	0775	IF .WINDOW NEQ 0 THEN			!a file is open

;	0776	    BEGIN

;	0777	    CURRENT_VCB[VCB$V_NOWRITE] = 1;

;	0778	    CURRENT_VCB[VCB$V_MUSTCLOSE] = 1;	!the file must be closed

;	0779	    END;

;	0780	



; Bliss-32 7.352	Saturday 21-AUG-1978 23:26:25	DBB3:[MTAACP.SRC]ACPCTR.B32;29					Page 6-1

; Digital Equipment Corporation

;

;	0781	IF .CURRENT_VCB[VCB$V_WAIMOUVOL] THEN

;	0782	    BEGIN

;	0783	    LOCAL	CCB	: REF BBLOCK,

;	0784			UCB	: REF VECTOR;

;	0785	    MVL_ENTRY = .CURRENT_VCB[VCB$L_MVL] + MVL$K_FIXLEN + 

;	0786	    	((.CURRENT_VCB[VCB$B_CUR_RVN] - 1) * MVL$K_LENGTH);

;	0787	    

;	0788	    MVL_ENTRY[MVL$V_MOUNTED] = 0;		!volume is not mounted

;	0789	    UCB = BBLOCK[.CURRENT_VCB[VCB$L_RVT],RVT$L_UCBLST];

;	0790	    UCB = .UCB[.CURRENT_VCB[VCB$W_RVN]];

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

;	0792	    CCB[CCB$L_UCB] = .UCB;

;	0793	    SYS$QIOW(,.IO_CHANNEL,IO$_REWINDOFF OR IO$M_NOWAIT,,,, ,,,,,);

;	0794	    SEND_ERRLOG(0,.UCB);

;	0795	    CURRENT_VCB[VCB$B_CUR_RVN]= 0;		!no volume is current

;	0796	    CURRENT_VCB[VCB$L_CUR_FID] = 0;		!no file is current, ie: start at beginning

;	0797	    END;

;	0798	

;	0799	END;					!end of routine TERMINATE_MOUNT











					 0004 0023C 	    .ENTRY  TERMINATE_VOL, Save R2				      ; 0726

				  04   AC  D5 0023E 	    TSTL    WINDOW						      ; 0775

				       05  13 00241 	    BEQL    1$							      ;

		    0B   AB	  C0   8F  88 00243 	    BISB2   #192, 11(CURRENT_VCB)				      ; 0778

	   54	    0B   AB	       02  E1 00248 1$:     BBC     #2, 11(CURRENT_VCB), 2$				      ; 0781

		         50	  2F   AB  9A 0024D 	    MOVZBL  47(CURRENT_VCB), R0					      ; 0786

		         50	  34 BB40  7E 00251 	    MOVAQ   @52(CURRENT_VCB)[R0], MVL_ENTRY			      ; 0785

		         50	       04  C0 00256 	    ADDL2   #4, MVL_ENTRY					      ;

		    07   A0	       01  8A 00259 	    BICB2   #1, 7(MVL_ENTRY)					      ; 0788

	   52	    20   AB	       0C  C1 0025D 	    ADDL3   #12, 32(CURRENT_VCB), UCB				      ; 0789

		         50	  0E   AB  3C 00262 	    MOVZWL  14(CURRENT_VCB), R0					      ; 0790

		         52	     6240  D0 00266 	    MOVL    (UCB)[R0], UCB					      ;

	   50 00000000G  9F	0000G  CF  C3 0026A 	    SUBL3   IO_CHANNEL, @#CTL$GL_CCBBASE, CCB			      ; 0791

		         60	       52  D0 00274 	    MOVL    UCB, (CCB)						      ; 0792

				       7E  7C 00277 	    CLRQ    -(SP)						      ; 0793

				       7E  7C 00279 	    CLRQ    -(SP)						      ;

				       7E  7C 0027B 	    CLRQ    -(SP)						      ;

				       7E  7C 0027D 	    CLRQ    -(SP)						      ;

				       7E  D4 0027F 	    CLRL    -(SP)						      ;

		         7E	  A2   8F  9A 00281 	    MOVZBL  #162, -(SP)						      ;

				0000G  CF  DD 00285 	    PUSHL   IO_CHANNEL						      ;

				       7E  D4 00289 	    CLRL    -(SP)						      ;

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

				       52  DD 00292 	    PUSHL   UCB							      ; 0794

				       7E  D4 00294 	    CLRL    -(SP)						      ;

		  0000G  CF	       02  FB 00296 	    CALLS   #2, SEND_ERRLOG					      ;

				  2F   AB  94 0029B 	    CLRB    47(CURRENT_VCB)					      ; 0795

				  24   AB  D4 0029E 	    CLRL    36(CURRENT_VCB)					      ; 0796

					   04 002A1 2$:     RET     							      ; 0726



; Routine Size:  102 bytes



; Bliss-32 7.352	Saturday 21-AUG-1978 23:26:25	DBB3:[MTAACP.SRC]ACPCTR.B32;29					Page 6-2

; Digital Equipment Corporation

;





;	0800	



; Bliss-32 7.352	Saturday 21-AUG-1978 23:26:25	DBB3:[MTAACP.SRC]ACPCTR.B32;29					Page 7

; Digital Equipment Corporation

;

;	0801	GLOBAL ROUTINE MTA_MOUNT  : NOPRES NOVALUE =

;	0802	

;	0803	!++

;	0804	!

;	0805	! FUNCTIONAL DESCRIPTION:

;	0806	!	This routine checks the validity of the mount request and 

;	0807	!	sets up a virtual page for this volume set.

;	0808	!

;	0809	!

;	0810	! CALLING SEQUENCE:

;	0811	!	MTA_MOUNT()

;	0812	!

;	0813	! INPUT PARAMETERS:

;	0814	!	NONE

;	0815	!

;	0816	! IMPLICIT INPUTS:

;	0817	!	CURRENT_UCB	- address of current unit control block

;	0818	!	QUEUE_HEAD	- address of queue head for ACP

;	0819	!

;	0820	! OUTPUT PARAMETERS:

;	0821	!	NONE

;	0822	!

;	0823	! IMPLICIT OUTPUTS:

;	0824	!	one page of virtual memory is devoted to this volume set

;	0825	!

;	0826	! ROUTINE VALUE:

;	0827	!	NONE

;	0828	!

;	0829	! SIDE EFFECTS:

;	0830	!	NONE

;	0831	!

;	0832	!--

;	0833	

;	0834	BEGIN

;	0835	

;	0836	EXTERNAL

;	0837		CURRENT_UCB	: REF BBLOCK,

;	0838		QUEUE_HEAD	: REF BBLOCK;

;	0839	

;	0840	EXTERNAL REGISTER

;	0841		COMMON_REG;

;	0842	

;	0843	IF NOT .BBLOCK[CURRENT_UCB[UCB$L_DEVCHAR],DEV$V_SQD] 

;	0844	OR .QUEUE_HEAD[AQB$B_ACPTYPE] NEQ AQB$K_MTA

;	0845	THEN ERR_EXIT(SS$_WRONGACP);

;	0846	KERNEL_CALL(MOUNT);

;	0847	

;	0848	END;				! end of routine MTA_MOUNT











					 0000 002A2 	    .ENTRY  MTA_MOUNT, Save nothing				      ; 0801

		         50	0000G  CF  D0 002A4 	    MOVL    CURRENT_UCB, R0					      ; 0843



; Bliss-32 7.352	Saturday 21-AUG-1978 23:26:25	DBB3:[MTAACP.SRC]ACPCTR.B32;29					Page 7-1

; Digital Equipment Corporation

;

	   0B	    34   A0	       05  E1 002A9 	    BBC     #5, 52(R0), 1$					      ;

		         50	0000G  CF  D0 002AE 	    MOVL    QUEUE_HEAD, R0					      ; 0844

		         03	  15   A0  91 002B3 	    CMPB    21(R0), #3						      ;

				       04  13 002B7 	    BEQL    2$							      ;

				031C   8F  BF 002B9 1$:     CHMU    #796						      ; 0845

				       7E  D4 002BD 2$:     CLRL    -(SP)						      ; 0846

				       5E  DD 002BF 	    PUSHL   SP							      ;

				FE40   CF  9F 002C1 	    PUSHAB  MOUNT						      ;

	      00000000G  9F	       03  FB 002C5 	    CALLS   #3, @#SYS$CMKRNL					      ;

					   04 002CC 	    RET     							      ; 0801



; Routine Size:  43 bytes





;	0849	ROUTINE STALL : COMMON_CALL NOVALUE  =

;	0850	

;	0851	!++

;	0852	!

;	0853	! FUNCTIONAL DESCRIPTION:

;	0854	!

;	0855	!	This routine puts the cancel request packet on the stalled queue

;	0856	!

;	0857	! CALLING SEQUENCE:

;	0858	!	STALL(), called in KERNEL mode

;	0859	!

;	0860	! INPUT PARAMETERS:

;	0861	!	NONE

;	0862	!

;	0863	! IMPLICIT INPUTS:

;	0864	!	NONE

;	0865	!

;	0866	! OUTPUT PARAMETERS:

;	0867	!	NONE

;	0868	!

;	0869	! IMPLICIT OUTPUTS:

;	0870	!	cancel request queued to stall I/O queue

;	0871	!

;	0872	! ROUTINE VALUE:

;	0873	!	NONE

;	0874	!

;	0875	! SIDE EFFECTS:

;	0876	!	NONE

;	0877	!

;	0878	!--

;	0879	

;	0880	BEGIN

;	0881	

;	0882	EXTERNAL

;	0883		IO_PACKET	: REF BBLOCK;	! address of current I/O packet

;	0884	

;	0885	EXTERNAL REGISTER

;	0886		COMMON_REG;

;	0887	

;	0888	LOCAL VPAGE : REF BBLOCK;

;	0889	



; Bliss-32 7.352	Saturday 21-AUG-1978 23:26:25	DBB3:[MTAACP.SRC]ACPCTR.B32;29					Page 7-2

; Digital Equipment Corporation

;

;	0890	VPAGE = .CURRENT_VCB[VCB$L_VPFL];

;	0891	INSQUE(.IO_PACKET,.VPAGE[VVP$L_STALLIOBL]);

;	0892	IO_PACKET = 0;

;	0893	END;











					 0000 002CD STALL:  .WORD   Save nothing					      ; 0849

		         50	  3C   AB  D0 002CF 	    MOVL    60(CURRENT_VCB), VPAGE				      ; 0890

		  0108   D0	0000G  DF  0E 002D3 	    INSQUE  @IO_PACKET, @264(VPAGE)				      ; 0891

				0000G  CF  D4 002DA 	    CLRL    IO_PACKET						      ; 0892

					   04 002DE 	    RET     							      ; 0849



; Routine Size:  18 bytes





;	0894	

;	0895	END

;	0896	ELUDOM













;				       PSECT SUMMARY

;

;	Name		 Bytes			       Attributes

;

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

;  $LOCKEDC2$     	     8  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        69         1       277











; Size:		735 code + 8 data bytes

; Run Time:	00:21.0

; Elapsed Time:	00:49.4

; Memory Used:	312 pages

; Compilation Complete

