

; Bliss-32 7.352	Saturday 21-AUG-1978 23:34:13	DBB3:[MTAACP.SRC]GETFIB.B32;3					Page 1

; Digital Equipment Corporation

;

;	0001	MODULE GETFIB (

;	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	!

;	0032	!	THIS ROUTINE OBTAINS THE ADDRESS OF THE FIB FOR THIS OPERATION.

;	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:  11-MAY-1977  01:02

;	0043	!

;	0044	! REVISION HISTORY:

;	0045	!

;	0046	!   D. H. Gillespie, 12-May-78  13:39

;	0047	!   A0001 - change CURRENT_VCB to a register

;	0048	!

;	0049	!**

;	0050	

;	0051	

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

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



; Bliss-32 7.352	Saturday 21-AUG-1978 23:34:13	DBB3:[MTAACP.SRC]GETFIB.B32;3					Page 2

; Digital Equipment Corporation

;

;	0349	GLOBAL ROUTINE GET_FIB (ABD) : COMMON_CALL =

;	0350	

;	0351	!++

;	0352	!

;	0353	! FUNCTIONAL DESCRIPTION:

;	0354	!

;	0355	!	THIS ROUTINE OBTAINS THE ADDRESS OF THE FIB FOR THIS OPERATION.

;	0356	!	IF A FILE IS ALREADY ACCESSED AND FID IS GIVEN THAN IT MUST BE THAT OF THE 

;	0357	!	ACCESSED FILE.  A COPY IS MADE IN USER SPACE.

;	0358	!

;	0359	! CALLING SEQUENCE:

;	0360	!	GET_FIB (ARG1)

;	0361	!

;	0362	! INPUT PARAMETERS:

;	0363	!	ARG1: ADDRESS OF BUFFER DESCRIPTOR LIST

;	0364	!

;	0365	! IMPLICIT INPUTS:

;	0366	!	CURRENT_WCB: ADDRESS OF USER'S WINDOW OR 0

;	0367	!

;	0368	! OUTPUT PARAMETERS:

;	0369	!	NONE

;	0370	!

;	0371	! IMPLICIT OUTPUTS:

;	0372	!	NONE

;	0373	!

;	0374	! ROUTINE VALUE:

;	0375	!	ADDRESS OF FIB

;	0376	!

;	0377	! SIDE EFFECTS:

;	0378	!	FID CHECKED

;	0379	!

;	0380	! USER ERRORS:

;	0381	!	SS$_ INSFARG - INSUFFICIENT ARGUMENTS

;	0382	!	SS$_BADPARAM - BAD INPUT PARAMETERS

;	0383	!

;	0384	!--

;	0385	

;	0386	BEGIN

;	0387	

;	0388	EXTERNAL REGISTER

;	0389		COMMON_REG;

;	0390	

;	0391	

;	0392	MAP

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

;	0394						! BUFFER DESCRIPTORS

;	0395	

;	0396	

;	0397	LOCAL

;	0398		FIB		: REF BBLOCK,	! ADDRESS OF FIB

;	0399		FIBL;				! LENGTH OF USER FIB

;	0400	

;	0401	EXTERNAL

;	0402		LOCAL_FIB	: BBLOCK,	! INTERNAL COPY OF USER FIB

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



; Bliss-32 7.352	Saturday 21-AUG-1978 23:34:13	DBB3:[MTAACP.SRC]GETFIB.B32;3					Page 2-1

; Digital Equipment Corporation

;

;	0404		CURRENT_WCB	: REF BBLOCK;	! USER'S WINDOW

;	0405	

;	0406	BIND

;	0407		LOC_FID = LOCAL_FIB[FIB$W_FID];

;	0408	

;	0409	

;	0410	! GET THE LENGTH OF THE USER-SUPPLIED FIB.

;	0411	

;	0412	FIBL = .ABD[ABD$C_FIB, ABD$W_COUNT];

;	0413	FIB = .ABD[ABD$C_FIB,ABD$W_TEXT] + ABD[ABD$C_FIB,ABD$W_TEXT] + 1;

;	0414	CH$COPY(.FIBL,.FIB,0,FIB$K_MTALEN,LOCAL_FIB);

;	0415	

;	0416	! IF FILE OPEN, THE INPUT FID MUST REQUEST SAME FILE

;	0417	IF .CURRENT_WCB NEQ 0

;	0418	THEN

;	0419	    BEGIN

;	0420	    IF .FIBL NEQ 0 AND .FIBL LSS FIB$C_ACCDATA

;	0421	    THEN ERR_EXIT (SS$_INSFARG);

;	0422	    IF .LOCAL_FIB[FIB$W_FID_NUM] EQL 0

;	0423	    THEN

;	0424		BEGIN

;	0425		LOC_FID<0,16> = .CURRENT_VCB[VCB$W_CUR_NUM];

;	0426		LOC_FID<16,16> = 1;		!ALWAYS RETURN SEQ = 1

;	0427		LOCAL_FIB[FIB$W_FID_RVN] = .CURRENT_VCB[VCB$W_RVN];

;	0428		END;

;	0429	    IF .CURRENT_VCB[VCB$W_CUR_NUM] NEQ .LOC_FID<0,16>

;	0430	    THEN ERR_EXIT (SS$_BADPARAM);

;	0431	    END

;	0432	

;	0433	! IF THERE IS NO FILE OPEN, THERE MUST BE A MINIMUM FIB.

;	0434	!

;	0435	

;	0436	ELSE

;	0437	    BEGIN

;	0438	    IF .FIBL LSS FIB$C_ACCDATA

;	0439	    THEN ERR_EXIT (SS$_INSFARG);

;	0440	    END;

;	0441	RETURN LOCAL_FIB;

;	0442	

;	0443	END;					! END OF ROUTINE GET_FIB





							    .TITLE  GETFIB

							    .IDENT  \A0001\



							    .GLOBL  LOCAL_FIB, IO_PACKET, CURRENT_WCB



							    .PSECT  $CODE$,NOWRT,2



					 047C 00000 	    .ENTRY  GET_FIB, Save R2,R3,R4,R5,R6,R10			      ; 0349

		         5A	0000G  CF  9E 00002 	    MOVAB   LOC_FID, R10					      ;

		         50	  04   AC  D0 00007 	    MOVL    ABD, R0						      ; 0412

		         56	  0A   A0  3C 0000B 	    MOVZWL  10(R0), FIBL					      ;

		         50	       08  C0 0000F 	    ADDL2   #8, R0						      ; 0413

		         51	       60  3C 00012 	    MOVZWL  (R0), R1						      ;



; Bliss-32 7.352	Saturday 21-AUG-1978 23:34:13	DBB3:[MTAACP.SRC]GETFIB.B32;3					Page 2-2

; Digital Equipment Corporation

;

		         50	       51  C0 00015 	    ADDL2   R1, R0						      ;

				       50  D6 00018 	    INCL    FIB							      ;

	   00	         60	       56  2C 0001A 	    MOVC5   FIBL, (FIB), #0, #28, LOCAL_FIB			      ; 0414

		    FC   AA	       1C     0001E									      ;

				0000G  CF  D5 00021 	    TSTL    CURRENT_WCB						      ; 0417

				       28  13 00025 	    BEQL    3$							      ;

				       56  D5 00027 	    TSTL    FIBL						      ; 0420

				       09  13 00029 	    BEQL    1$							      ;

		         0A	       56  D1 0002B 	    CMPL    FIBL, #10						      ;

				       04  18 0002E 	    BGEQ    1$							      ;

				0114   8F  BF 00030 	    CHMU    #276						      ; 0421

				       6A  B5 00034 1$:     TSTW    LOCAL_FIB+4						      ; 0422

				       0D  12 00036 	    BNEQ    2$							      ;

		         6A	  24   AB  B0 00038 	    MOVW    36(CURRENT_VCB), LOC_FID				      ; 0425

		    02   AA	       01  B0 0003C 	    MOVW    #1, LOC_FID+2					      ; 0426

		    04   AA	  0E   AB  B0 00040 	    MOVW    14(CURRENT_VCB), LOCAL_FIB+8			      ; 0427

		         6A	  24   AB  B1 00045 2$:     CMPW    36(CURRENT_VCB), LOC_FID				      ; 0429

				       0D  13 00049 	    BEQL    4$							      ;

				       14  BF 0004B 	    CHMU    #20							      ; 0430

				       09  11 0004D 	    BRB     4$							      ; 0417

		         0A	       56  D1 0004F 3$:     CMPL    FIBL, #10						      ; 0438

				       04  18 00052 	    BGEQ    4$							      ;

				0114   8F  BF 00054 	    CHMU    #276						      ; 0439

		         50	  FC   AA  9E 00058 4$:     MOVAB   LOCAL_FIB, R0					      ; 0441

					   04 0005C 	    RET     							      ; 0349



; Routine Size:  93 bytes





;	0444	

;	0445	END

;	0446	ELUDOM













;				       PSECT SUMMARY

;

;	Name		 Bytes			       Attributes

;

;  $CODE$         	    93  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        19         0       235







; Bliss-32 7.352	Saturday 21-AUG-1978 23:34:13	DBB3:[MTAACP.SRC]GETFIB.B32;3					Page 2-3

; Digital Equipment Corporation

;







; Size:		93 code + 0 data bytes

; Run Time:	00:05.7

; Elapsed Time:	00:14.8

; Memory Used:	270 pages

; Compilation Complete

