

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

; Digital Equipment Corporation

;

;	0001	MODULE ACCFL (

;	0002			LANGUAGE (BLISS32),

;	0003			IDENT = 'A0001'

;	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 MAKES NECESSARY CHANGES TO I/O DATA BASE TO ALLOW ACCESS

;	0032	!

;	0033	! ENVIRONMENT:

;	0034	!

;	0035	!	STARLET OPERATING SYSTEM, INCLUDING PRIVILEGED SYSTEM SERVICES

;	0036	!	AND INTERNAL EXEC ROUTINES.

;	0037	!

;	0038	!--

;	0039	!

;	0040	!

;	0041	! AUTHOR:  D. H. GILLESPIE,	 CREATION DATE:	17-MAY-77  

;	0042	!

;	0043	! REVISION HISTORY:

;	0044	!

;	0045	!   D. H. Gillespie, 11-May-78  16:36

;	0046	!   A0001 - change CURRENT_VCB to register

;	0047	!

;	0048	!**

;	0049	

;	0050	

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

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

;	0348	

;	0349	EXTERNAL ROUTINE

;	0350		ALLOCATE,			!ALLOCATE NON_PAGED SYSTEM SPACE



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

; Digital Equipment Corporation

;

;	0351		IO_DONE;

;	0352	

;	0353	EXTERNAL

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



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

; Digital Equipment Corporation

;

;	0355	GLOBAL ROUTINE ACCESS_FILE(ORIGINAL_ACC,PID,READ_ACCESS,WRITE_ACCESS,ABD) : COMMON_CALL NOVALUE =

;	0356	

;	0357	!++

;	0358	!

;	0359	! FUNCTIONAL DESCRIPTION:

;	0360	!	THIS ROUTINE MAKES NECESSARY CHANGES TO I/O DATA BASE TO ALLOW ACCESS

;	0361	!

;	0362	!CALLING SEQUENCE:

;	0363	!	ACCESS_FILE(ARG1,ARG2,ARG3,ARG4,ARG5)

;	0364	!

;	0365	! INPUT PARAMETERS:

;	0366	!	ARG1 - ORIGINAL ACCESS REQUEST

;	0367	!	ARG2 - PID OF PROCESS REQUESTING ACCESS

;	0368	!	ARG3 - READ ACCESS REQUESTED(0 - NO, 1 - YES)

;	0369	!	ARG4 - WRITE ACCESS REQUESTED(0 - NO, 1 - YES)

;	0370	!	ARG5 - ADDRESS OF BUFFER DESCRIPTORS

;	0371	!

;	0372	! IMPLICIT INPUTS:

;	0373	!	CURRENT_UCB	- ADDRESS OF CURRENT UNIT CONTROL BLOCK

;	0374	!	CURRENT_VCB	- ADDRESS OF CURRENT VCB

;	0375	!	LOCAL_FIB 	- COPY OF USER'S FIB

;	0376	!

;	0377	! OUTPUT PARAMETERS:

;	0378	!	NONE

;	0379	!

;	0380	! IMPLICIT OUTPUTS:

;	0381	!	CURRENT_WCB - ADDRESS OF WINDOW CONTROL BLOCK

;	0382	!

;	0383	! ROUTINE VALUE:

;	0384	!	NONE

;	0385	!

;	0386	! SIDE EFFECTS:

;	0387	!	ENABLE WRITE BACK OF WINDOW

;	0388	!

;	0389	!--

;	0390	

;	0391	BEGIN

;	0392	

;	0393	EXTERNAL REGISTER

;	0394		COMMON_REG;

;	0395	

;	0396	

;	0397	LOCAL

;	0398		WINDOW:		REF BBLOCK;	!ADDRESS OF WINDOW FOR THIS FILE

;	0399	

;	0400	MAP

;	0401		ABD:		REF BBLOCKVECTOR[,ABD$C_LENGTH];!ADDRESS OF BUFFER DESCRIPTORS

;	0402	

;	0403	EXTERNAL

;	0404		LOCAL_FIB:	BBLOCK,		!COPY OF USER'S FILE INFORMATION BLOCK

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

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

;	0407	

;	0408	! CREATE WINDOW

;	0409	WINDOW = ALLOCATE(WCB$C_LENGTH+6);



; Bliss-32 7.352	Saturday 21-AUG-1978 23:26:06	DBB3:[MTAACP.SRC]ACCFL.B32;3					Page 2-1

; Digital Equipment Corporation

;

;	0410	WINDOW[WCB$B_TYPE] = DYN$C_WCB;

;	0411	

;	0412	! INITIALIZE WINDOW

;	0413	WINDOW[WCB$L_WLFL] = .CURRENT_VCB;	!LINK TO VCB

;	0414	WINDOW[WCB$L_WLBL] = .CURRENT_VCB;

;	0415	WINDOW[WCB$V_READ] = .READ_ACCESS;	!READ ACCESS SPECIFIED

;	0416	WINDOW[WCB$V_WRITE] = .WRITE_ACCESS;	!WRITE ACCESS SPECIFIED

;	0417	WINDOW[WCB$L_PID] = .PID;		!PID OF REQUESTER

;	0418	WINDOW[WCB$L_ORGUCB] = .CURRENT_UCB;	!CURRENT UNIT CONTROL BLOCK ADDRESS

;	0419	WINDOW[WCB$W_ACON] = .ORIGINAL_ACC<0,16>;	!ACCESS CONTROL BITS SAVED

;	0420	WINDOW[WCB$W_NMAP] = 0;			!PREVENT VIRTUAL IO

;	0421	WINDOW[WCB$L_RVT] = .CURRENT_VCB[VCB$L_RVT];	!ADDRESS OF RELATIVE VOLUME TABLE

;	0422	(WINDOW[WCB$W_P1_COUNT])<0,32> = .CURRENT_UCB;	!PUT UNIT TO RECEIVE IO IN MAPPING PTER

;	0423	CURRENT_WCB = .WINDOW;				!CURRENT WINDOW CONTROL BLOCK

;	0424	

;	0425	CURRENT_VCB[VCB$L_WCB] = .WINDOW;	!NOTE WINDOW ADDRESS

;	0426	CURRENT_VCB[VCB$V_PARTFILE] = 0;	!NOT PARTIAL FILE SINCE ACCESS ESTABLISHES HANDLES ON IT

;	0427	

;	0428	! ENABLE WRITE BACK OF WINDOW

;	0429	ABD[ABD$C_WINDOW,ABD$W_COUNT] = 4;

;	0430	.ABD[ABD$C_WINDOW,ABD$W_TEXT] + ABD[ABD$C_WINDOW,ABD$W_TEXT] + 1 = .WINDOW;

;	0431	IO_DONE(.IO_PACKET);			!COMPLETE IO

;	0432	IO_PACKET = 0;				!INDICATE IO COMPLETED ALREADY

;	0433	END;					!END OF ROUTINE





							    .TITLE  ACCFL

							    .IDENT  \A0001\



							    .GLOBL  ALLOCATE, IO_DONE, IO_PACKET, LOCAL_FIB, CURRENT_UCB

							    .GLOBL  CURRENT_WCB



							    .PSECT  $CODE$,NOWRT,2



					 0004 00000 	    .ENTRY  ACCESS_FILE, Save R2				      ; 0355

				       2A  DD 00002 	    PUSHL   #42							      ; 0409

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

		    0A   A0	       12  90 00009 	    MOVB    #18, 10(WINDOW)					      ; 0410

		         60	       5B  D0 0000D 	    MOVL    CURRENT_VCB, (WINDOW)				      ; 0413

		    04   A0	       5B  D0 00010 	    MOVL    CURRENT_VCB, 4(WINDOW)				      ; 0414

	   01	         00	  0C   AC  F0 00014 	    INSV    READ_ACCESS, #0, #1, 11(WINDOW)			      ; 0415

				  0B   A0     00019									      ;

	   01	         01	  10   AC  F0 0001B 	    INSV    WRITE_ACCESS, #1, #1, 11(WINDOW)			      ; 0416

				  0B   A0     00020									      ;

		    0C   A0	  08   AC  D0 00022 	    MOVL    PID, 12(WINDOW)					      ; 0417

		    10   A0	0000G  CF  D0 00027 	    MOVL    CURRENT_UCB, 16(WINDOW)				      ; 0418

		    14   A0	  04   AC  B0 0002D 	    MOVW    ORIGINAL_ACC, 20(WINDOW)				      ; 0419

				  16   A0  B4 00032 	    CLRW    22(WINDOW)						      ; 0420

		    1C   A0	  20   AB  D0 00035 	    MOVL    32(CURRENT_VCB), 28(WINDOW)				      ; 0421

		    24   A0	0000G  CF  D0 0003A 	    MOVL    CURRENT_UCB, 36(WINDOW)				      ; 0422

		  0000G  CF	       50  D0 00040 	    MOVL    WINDOW, CURRENT_WCB					      ; 0423

		    38   AB	       50  D0 00045 	    MOVL    WINDOW, 56(CURRENT_VCB)				      ; 0425

		    0B   AB	       01  8A 00049 	    BICB2   #1, 11(CURRENT_VCB)					      ; 0426

		         51	  14   AC  D0 0004D 	    MOVL    ABD, R1						      ; 0429

		    02   A1	       04  B0 00051 	    MOVW    #4, 2(R1)						      ;



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

; Digital Equipment Corporation

;

		         52	       61  3C 00055 	    MOVZWL  (R1), R2						      ; 0430

		         51	       52  C0 00058 	    ADDL2   R2, R1						      ;

		    01   A1	       50  D0 0005B 	    MOVL    WINDOW, 1(R1)					      ;

				0000G  CF  DD 0005F 	    PUSHL   IO_PACKET						      ; 0431

		  0000G  CF	       01  FB 00063 	    CALLS   #1, IO_DONE						      ;

				0000G  CF  D4 00068 	    CLRL    IO_PACKET						      ; 0432

					   04 0006C 	    RET     							      ; 0355



; Routine Size:  109 bytes





;	0434	END

;	0435	ELUDOM













;				       PSECT SUMMARY

;

;	Name		 Bytes			       Attributes

;

;  $CODE$         	   109  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        26         0       235











; Size:		109 code + 0 data bytes

; Run Time:	00:06.1

; Elapsed Time:	00:17.5

; Memory Used:	275 pages

; Compilation Complete

