

; Bliss-32 7.352	Saturday 22-AUG-1978 02:05:51	DBB3:[NCP.SRC]NCPSUB.B32;6					Page 1

; Digital Equipment Corporation

;

;	0001	MODULE NETCONFIG_UTIL =	

;	0002	BEGIN

;	0003	

;	0004	!

;	0005	! COPYRIGHT (C) 1977

;	0006	! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS 01754

;	0007	!

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

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

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

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

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

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

;	0014	! REMAIN IN DEC.

;	0015	!

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

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

;	0018	! CORPORATION.

;	0019	!

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

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

;	0022	

;	0023	!++

;	0024	! FACILITY:NETWORK CONTROL PROGRAM

;	0025	!

;	0026	! ABSTRACT:NCP PROVIDE TOOLS FOR LOCAL NETWORK MANAGEMENT.

;	0027	!	AN OPERATOR ENTERS DCLS LIKE COMMANDS

;	0028	!	AND NCP INTERACTS WITH NETACP,NICE, AND CONFIGURATION 

;	0029	!	DATABASE FOR HIM.

;	0030	!

;	0031	! ENVIRONMENT:VAX-11/780

;	0032	!

;	0033	! AUTHOR:TOM DOPIRAK	, CREATION DATE:12/6/77

;	0034	!

;	0035	! MODIFIED BY:

;	0036	!

;	0037	! 	, : VERSION

;	0038	! 01	- 

;	0039	!--



; Bliss-32 7.352	Saturday 22-AUG-1978 02:05:51	DBB3:[NCP.SRC]NCPSUB.B32;6					Page 2

; Digital Equipment Corporation

;

;	0040	!

;	0041	! TABLE OF CONTENTS:

;	0042	!

;	0043	

;	0044	

;	0045	!

;	0046	! INCLUDE FILES:

;	0047	!

;	0048	LIBRARY 'SYS$LIBRARY:STARLET.L32';

;	0049	REQUIRE 'LIBD$:[NCP.OBJ]NCPDEF.B32';

;	0219	

;	0220	!

;	0221	! MACROS:

;	0222	!

;	0223	



; Bliss-32 7.352	Saturday 22-AUG-1978 02:05:51	DBB3:[NCP.SRC]NCPSUB.B32;6					Page 3

; Digital Equipment Corporation

;

;	0224	MACRO

;	0225	!

;	0226		NAMESIZE=0,0,32,0%,

;	0227		FILENAME=1,0,32,0%;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:05:51	DBB3:[NCP.SRC]NCPSUB.B32;6					Page 4

; Digital Equipment Corporation

;

;	0228	!

;	0229	! EQUATED SYMBOLS:

;	0230	!

;	0231	LITERAL

;	0232	!

;	0233	    TRUE=1,

;	0234	    FALSE=0;

;	0235	



; Bliss-32 7.352	Saturday 22-AUG-1978 02:05:51	DBB3:[NCP.SRC]NCPSUB.B32;6					Page 5

; Digital Equipment Corporation

;

;	0236	BIND

;	0237	!

;	0238	!SYMBOLS FOR VARIOUS FILENAMES

;	0239	!

;	0240	    LND$_FILENAME=UPLIT BYTE('SYS$SYSTEM:LOCALNODE.DAT'),

;	0241	    LND$_NAMESIZE=%CHARCOUNT('SYS$SYSTEM:LOCALNODE.DAT'),

;	0242	    RND$_FILENAME=UPLIT BYTE('SYS$SYSTEM:RMTNODE.DAT'),

;	0243	    RND$_NAMESIZE=%CHARCOUNT('SYS$SYSTEM:RMTNODE.DAT'),

;	0244	    ODB$_FILENAME=UPLIT BYTE('SYS$SYSTEM:OBJECT.DAT'),

;	0245	    ODB$_NAMESIZE=%CHARCOUNT('SYS$SYSTEM:OBJECT.DAT'),

;	0246	    LID$_FILENAME=UPLIT BYTE('SYS$SYSTEM:LINE.DAT'),

;	0247	    LID$_NAMESIZE=%CHARCOUNT('SYS$SYSTEM:LINE.DAT');



; Bliss-32 7.352	Saturday 22-AUG-1978 02:05:51	DBB3:[NCP.SRC]NCPSUB.B32;6					Page 6

; Digital Equipment Corporation

;

;	0248	OWN

;	0249	!

;	0250	!DATASTRUCTURES FOR ACCESSING DATA BASE

;	0251	!

;	0252		    FILEFAB:$FAB(

;     P 0253			SHR=(GET,PUT,UPD,UPI),

;     P 0254			RFM=FIX,

;     P 0255			RAT=BLK,

;     P 0256			FAC=GET

;     P 0257			),

;	0258		    FILERAB:$RAB(

;     P 0259			RAC=SEQ,

;     P 0260			FAB=FILEFAB

;     P 0261			),

;	0262	    FILETABLE:BLOCKVECTOR[4,2]

;	0263			INITIAL( LND$_NAMESIZE,LND$_FILENAME,

;	0264				RND$_NAMESIZE,RND$_FILENAME,

;	0265				LID$_NAMESIZE,LID$_FILENAME,

;	0266				ODB$_NAMESIZE,ODB$_FILENAME);

;	0267	

;	0268	!

;	0269	! EXTERNAL REFERENCES:

;	0270	!

;	0271	



; Bliss-32 7.352	Saturday 22-AUG-1978 02:05:51	DBB3:[NCP.SRC]NCPSUB.B32;6					Page 7

; Digital Equipment Corporation

;

;	0272	GLOBAL      ROUTINE READ_RECORD(BUFFERADDRESS)=

;	0273	

;	0274	!++

;	0275	! FUNCTIONAL DESCRIPTION:

;	0276	!

;	0277	!	READ_RECORD PERFORMS AN RMS $GET FUNCTION ON THE 

;	0278	!	CURRENTLY OPENED AND CONNECTED FILE.THE RECORD SIZE

;	0279	!	FOR THE READ IS TAKEN FROM THE FAB$W_MRS FIELD

;	0280	!

;	0281	! FORMAL PARAMETERS:

;	0282	!

;	0283	!	BUFFERADDRESS:BUFFER DESTINATION OF $GET

;	0284	!

;	0285	! IMPLICIT INPUTS:

;	0286	!

;	0287	!	FILEFAB AND FILERAB, RMS DATASTRUCTURES INITIATED AT 

;	0288	!	OPEN AND CONNECT.

;	0289	!

;	0290	! IMPLICIT OUTPUTS:

;	0291	!

;	0292	!	NONE

;	0293	!

;	0294	! ROUTINE VALUE:

;	0295	! COMPLETION CODES:

;	0296	!

;	0297	!	THE RMS CODE OF THE $GET IS RETURNED

;	0298	!

;	0299	! SIDE EFFECTS:

;	0300	!

;	0301	!	NONE

;	0302	!

;	0303	!--

;	0304	

;	0305		BEGIN

;	0306	LOCAL

;	0307	    STATUS;

;	0308	MACRO

;	0309		IN_USE=(.BUFFERADDRESS)<0,8>%,

;	0310		SECURITY_BYTE=(.BUFFERADDRESS+.FILEFAB[FAB$W_MRS]-1)<0,8>%;

;	0311	

;	0312		FILERAB[RAB$L_UBF]=.BUFFERADDRESS;		!ADDRESS OF NEW RECORD

;	0313		FILERAB[RAB$W_USZ]=.FILEFAB[FAB$W_MRS];		!SIZE OF NEW RECORD

;	0314		WHILE TRUE DO

;	0315		    BEGIN

;	0316		    !+

;	0317		    !CHECK FOR SUCCESSFUL IO

;	0318	

;	0319		    IF

;	0320			NOT(STATUS=$GET(RAB=FILERAB))

;	0321		    THEN

;	0322			RETURN .STATUS;

;	0323	

;	0324		   !+

;	0325		   !CHECK FOR VALID USE BYTE AND VALID

;	0326		   !SECURITY BYTE



; Bliss-32 7.352	Saturday 22-AUG-1978 02:05:51	DBB3:[NCP.SRC]NCPSUB.B32;6					Page 7-1

; Digital Equipment Corporation

;

;	0327	

;	0328		    IF

;	0329			 .IN_USE 

;	0330		    THEN

;	0331			IF .SECURITY_BYTE EQL 155

;	0332			THEN

;	0333			    RETURN .STATUS

;	0334			ELSE

;	0335			    RETURN 0

;	0336		    END

;	0337		END;





							    .TITLE  NETCONFIG_UTIL



							    .PSECT  $PLIT$,NOWRT,NOEXE,2



					      00000 P.AAA:  .ASCII  \SYS$SYSTEM:LOCALNODE.DAT\				      ;

					      00018 P.AAB:  .ASCII  \SYS$SYSTEM:RMTNODE.DAT\				      ;

					      0002E	    .BLKB   2

					      00030 P.AAC:  .ASCII  \SYS$SYSTEM:OBJECT.DAT\				      ;

					      00045	    .BLKB   3

					      00048 P.AAD:  .ASCII  \SYS$SYSTEM:LINE.DAT\				      ;

					      0005B	    .BLKB   1



							    .PSECT  $OWN$,NOEXE,2



					      00000 FILEFAB:.BYTE   3							      ;

					      00001 	    .BYTE   80							      ;

					      00002 	    .WORD   0							      ;

					      00004 	    .LONG   0							      ;

					      00008 	    .LONG   0							      ;

					      0000C 	    .LONG   0							      ;

					      00010 	    .LONG   0							      ;

					      00014 	    .WORD   0							      ;

					      00016 	    .BYTE   2							      ;

					      00017 	    .BYTE   75							      ;

					      00018 	    .LONG   0							      ;

					      0001C 	    .BYTE   0							      ;

					      0001D 	    .BYTE   0							      ;

					      0001E 	    .BYTE   8							      ;

					      0001F 	    .BYTE   1							      ;

					      00020 	    .LONG   0							      ;

					      00024 	    .LONG   0							      ;

					      00028 	    .LONG   0							      ;

					      0002C 	    .LONG   0							      ;

					      00030 	    .LONG   0							      ;

					      00034 	    .BYTE   0							      ;

					      00035 	    .BYTE   0							      ;

					      00036 	    .WORD   0							      ;

					      00038 	    .LONG   0							      ;

					      0003C 	    .WORD   0							      ;

					      0003E 	    .BYTE   0							      ;

					      0003F 	    .BYTE   0							      ;

					      00040 	    .LONG   0							      ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:05:51	DBB3:[NCP.SRC]NCPSUB.B32;6					Page 7-2

; Digital Equipment Corporation

;

					      00044 	    .LONG   0							      ;

					      00048 	    .LONG   0, 0						      ;

					      00050 FILERAB:.BYTE   1							      ;

					      00051 	    .BYTE   68							      ;

					      00052 	    .WORD   0							      ;

					      00054 	    .LONG   0							      ;

					      00058 	    .LONG   0							      ;

					      0005C 	    .LONG   0							      ;

					      00060 	    .WORD   0, 0, 0						      ;

					      00066 	    .WORD   0							      ;

					      00068 	    .LONG   0							      ;

					      0006C 	    .WORD   0							      ;

					      0006E 	    .BYTE   0							      ;

					      0006F 	    .BYTE   0							      ;

					      00070 	    .WORD   0							      ;

					      00072 	    .WORD   0							      ;

					      00074 	    .LONG   0							      ;

					      00078 	    .LONG   0							      ;

					      0007C 	    .LONG   0							      ;

					      00080 	    .LONG   0							      ;

					      00084 	    .BYTE   0							      ;

					      00085 	    .BYTE   0							      ;

					      00086 	    .BYTE   0							      ;

					      00087 	    .BYTE   0							      ;

					      00088 	    .LONG   0							      ;

					      0008C 	    .ADDRESS  FILEFAB						      ;

					      00090 	    .LONG   0							      ;

					      00094 FILETABLE:

							    .LONG   24							      ;

					      00098 	    .ADDRESS  LND$_FILENAME					      ;

					      0009C 	    .LONG   22							      ;

					      000A0 	    .ADDRESS  RND$_FILENAME					      ;

					      000A4 	    .LONG   19							      ;

					      000A8 	    .ADDRESS  LID$_FILENAME					      ;

					      000AC 	    .LONG   21							      ;

					      000B0 	    .ADDRESS  ODB$_FILENAME					      ;



						    LND$_FILENAME=	P.AAA

						    LND$_NAMESIZE=	24

						    RND$_FILENAME=	P.AAB

						    RND$_NAMESIZE=	22

						    ODB$_FILENAME=	P.AAC

						    ODB$_NAMESIZE=	21

						    LID$_FILENAME=	P.AAD

						    LID$_NAMESIZE=	19

							    .GLOBL  SYS$GET



							    .PSECT  $CODE$,NOWRT,2



					 0804 00000 	    .ENTRY  READ_RECORD, Save R2,R11				      ; 0272

		         5B	0000'  CF  9E 00002 	    MOVAB   FILEFAB+54, R11					      ;

		    3E   AB	  04   AC  D0 00007 	    MOVL    BUFFERADDRESS, FILERAB+36				      ; 0312

		    3A   AB	       6B  B0 0000C 	    MOVW    FILEFAB+54, FILERAB+32				      ; 0313

				  1A   AB  9F 00010 1$:     PUSHAB  FILERAB						      ; 0320

	      00000000G  9F	       01  FB 00013 	    CALLS   #1, @#SYS$GET					      ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:05:51	DBB3:[NCP.SRC]NCPSUB.B32;6					Page 7-3

; Digital Equipment Corporation

;

		         52	       50  D0 0001A 	    MOVL    R0, STATUS						      ;

		         12	       52  E9 0001D 	    BLBC    STATUS, 2$						      ;

		         EC	  04   BC  E9 00020 	    BLBC    @BUFFERADDRESS, 1$					      ; 0329

		         50	       6B  3C 00024 	    MOVZWL  FILEFAB+54, R0					      ; 0331

		         50	  04   AC  C0 00027 	    ADDL2   BUFFERADDRESS, R0					      ;

		    9B   8F	  FF   A0  91 0002B 	    CMPB    -1(R0), #155					      ;

				       04  12 00030 	    BNEQ    3$							      ;

		         50	       52  D0 00032 2$:     MOVL    STATUS, R0						      ; 0333

					   04 00035 	    RET     							      ;

				       50  D4 00036 3$:     CLRL    R0							      ; 0335

					   04 00038 	    RET     							      ; 0272



; Routine Size:  57 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 02:05:51	DBB3:[NCP.SRC]NCPSUB.B32;6					Page 8

; Digital Equipment Corporation

;

;	0338	    GLOBAL ROUTINE MATCHKEY(INPUT_DESC,KEYSIZE,PURE_KEY,IMPURE_KEY)=

;	0339	

;	0340	!++

;	0341	! FUNCTIONAL DESCRIPTION:

;	0342	!

;	0343	!	MATCHKEY SEARCHES THROUGH THE CURRENTLY OPEN 

;	0344	!	CONFIGURATION FILE FOR A KEY MATCHING A SPECIFIED ONE.

;	0345	!	THE RECORD CONTAINING THAT KEY IS PLACED IN A USER

;	0346	!	SPECIFIED BUFFER.

;	0347	!

;	0348	! FORMAL PARAMETERS:

;	0349	!

;	0350	!	INPUT_DESC:BUFFER DESCRIPTOR OF BUFFER USED TO RETURN

;	0351	!		CHOSEN RECORD AND FOR INTERMEDIATE DISK READS

;	0352	!	KEYSIZE:SIZE IN BYTES OF KEY BEING SOUGHT.

;	0353	!	PURE_KEY:ADDRESS OF KEY BEING MATCHED

;	0354	!	IMPURE_KEY: ADDRESS WITHIN  USER SPECIFIED RECORD

;	0355	!		BUFFER OF AT WHICH KEY WILL OCCUR.

;	0356	!

;	0357	! IMPLICIT INPUTS:

;	0358	!

;	0359	!	NONE

;	0360	!

;	0361	! IMPLICIT OUTPUTS:

;	0362	!

;	0363	!	NONE

;	0364	!

;	0365	! ROUTINE VALUE:

;	0366	! COMPLETION CODES:

;	0367	!

;	0368	!	KEY_FOUND:KEY MATCHED,ITS RECORD IS RETURNED

;	0369	!	KEY_NOT_FOUND:EOF ENCOUNTERED KEY NOT FOUND

;	0370	!	BAD_READ:RMS $GET HAS FAILED

;	0371	!	BUFFER_SHORT:SUPPLIED BUFFER IS TOO SHORT

;	0372	!	BAD_KEY:KEYSIZE PARAMETER IS INVALID

;	0373	!

;	0374	! SIDE EFFECTS:

;	0375	!

;	0376	!	NONE

;	0377	!

;	0378	!--

;	0379	

;	0380	BEGIN

;	0381	LOCAL

;	0382	    DATA_DESC:REF VECTOR;

;	0383	MACRO

;	0384	    USER_BUFFER=DATA_DESC[1]%,

;	0385	    USER_SIZE=DATA_DESC[0]%,

;	0386	    FILE_SIZE=FILEFAB[FAB$W_MRS]%;

;	0387	LITERAL

;	0388	    KEY_FOUND=1,

;	0389	    KEY_NOT_FOUND=2,

;	0390	    BAD_READ=4,

;	0391	    BUFFER_SHORT=6,

;	0392	    BAD_KEY=8;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:05:51	DBB3:[NCP.SRC]NCPSUB.B32;6					Page 8-1

; Digital Equipment Corporation

;

;	0393	!+

;	0394	!SET UP POINTER TO BUFFER DESCRIPTOR

;	0395	

;	0396	    DATA_DESC=.INPUT_DESC;

;	0397	!+

;	0398	!CHECK LENGTH OF SUPPLIED BUFFER

;	0399	

;	0400	    IF

;	0401		.USER_SIZE LSS .FILE_SIZE

;	0402	    THEN

;	0403		RETURN BUFFER_SHORT;

;	0404	!+

;	0405	!CHECK RANGE OF KEYSIZE

;	0406	

;	0407	    IF

;	0408		.KEYSIZE LSS 0

;	0409	    THEN

;	0410		RETURN BAD_KEY;

;	0411	

;	0412	!+

;	0413	!CHECK KEY SIZE

;	0414	

;	0415	    IF

;	0416		(.KEYSIZE NEQ 0) AND

;	0417		((.KEYSIZE+.IMPURE_KEY) GTRA (.USER_BUFFER+.FILE_SIZE-1))

;	0418	    THEN

;	0419		RETURN BAD_KEY;

;	0420		WHILE TRUE DO

;	0421		    SELECTONEU READ_RECORD(.USER_BUFFER) OF

;	0422			SET

;	0423	

;	0424			!RECORD SUCESSFULLY RETURNED,

;	0425			!IF NO KEY MATCH SPECIFIED(KEYSIZE=0)

;	0426			!OR THE KEYS MATCH THEN RETURN

;	0427	

;	0428			[RMS$_NORMAL]:

;	0429			    IF (.KEYSIZE EQL 0) OR

;	0430				(CH$EQL(.KEYSIZE,.IMPURE_KEY,.KEYSIZE,.PURE_KEY))

;	0431			    THEN

;	0432				RETURN KEY_FOUND;

;	0433	

;	0434			!END OF FILE REACHED AND PROPER 

;	0435			!RECORD NOT FOUND 

;	0436			!RETURN FAILURE

;	0437	

;	0438			[RMS$_EOF]:

;	0439			    RETURN KEY_NOT_FOUND;

;	0440	

;	0441			!A READ ERROR HAS OCCURRED

;	0442			!RETURN FAILURE

;	0443	

;	0444			[OTHERWISE]:

;	0445			    RETURN BAD_READ

;	0446			TES;

;	0447	END;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:05:51	DBB3:[NCP.SRC]NCPSUB.B32;6					Page 8-2

; Digital Equipment Corporation

;











					 007C 00039 	    .ENTRY  MATCHKEY, Save R2,R3,R4,R5,R6			      ; 0338

		         54	  04   AC  D0 0003B 	    MOVL    INPUT_DESC, DATA_DESC				      ; 0396

    0000'  CF	         10	       00  ED 0003F 	    CMPZV   #0, #16, FILEFAB+54, (DATA_DESC)			      ; 0401

				       64     00045									      ;

				       04  15 00046 	    BLEQ    1$							      ;

		         50	       06  D0 00048 	    MOVL    #6, R0						      ; 0403

					   04 0004B 	    RET     							      ;

		         55	  08   AC  D0 0004C 1$:     MOVL    KEYSIZE, R5						      ; 0408

				       17  19 00050 	    BLSS    2$							      ;

				       19  13 00052 	    BEQL    3$							      ; 0416

	   51	         55	  10   AC  C1 00054 	    ADDL3   IMPURE_KEY, R5, R1					      ; 0417

		         50	0000'  CF  3C 00059 	    MOVZWL  FILEFAB+54, R0					      ;

		         50	  04   A4  C0 0005E 	    ADDL2   4(DATA_DESC), R0					      ;

				       50  D7 00062 	    DECL    R0							      ;

		         50	       51  D1 00064 	    CMPL    R1, R0						      ;

				       04  1B 00067 	    BLEQU   3$							      ;

		         50	       08  D0 00069 2$:     MOVL    #8, R0						      ; 0419

					   04 0006C 	    RET     							      ;

				  04   A4  DD 0006D 3$:     PUSHL   4(DATA_DESC)					      ; 0421

		    8C   AF	       01  FB 00070 	    CALLS   #1, READ_RECORD					      ;

		         56	       50  D0 00074 	    MOVL    R0, R6						      ;

	      00010001   8F	       56  D1 00077 	    CMPL    R6, #65537						      ;

				       10  12 0007E 	    BNEQ    5$							      ;

				       55  D5 00080 	    TSTL    R5							      ; 0429

				       08  13 00082 	    BEQL    4$							      ;

      0C   BC	    10   BC	       55  29 00084 	    CMPC3   R5, @IMPURE_KEY, @PURE_KEY				      ; 0430

				       E1  12 0008A 	    BNEQ    3$							      ;

		         50	       01  D0 0008C 4$:     MOVL    #1, R0						      ; 0432

					   04 0008F 	    RET     							      ;

	      0001827A   8F	       56  D1 00090 5$:     CMPL    R6, #98938						      ; 0421

				       04  12 00097 	    BNEQ    6$							      ;

		         50	       02  D0 00099 	    MOVL    #2, R0						      ; 0439

					   04 0009C 	    RET     							      ;

		         50	       04  D0 0009D 6$:     MOVL    #4, R0						      ; 0445

					   04 000A0 	    RET     							      ; 0338



; Routine Size:  104 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 02:05:51	DBB3:[NCP.SRC]NCPSUB.B32;6					Page 9

; Digital Equipment Corporation

;

;	0448	    GLOBAL ROUTINE OPEN_FILE(FILE_INDEX)=

;	0449	

;	0450	!++

;	0451	! FUNCTIONAL DESCRIPTION:

;	0452	!

;	0453	!	OPEN_FILE PERFORMS AN RMS $OPEN AND $CONNECT ON

;	0454	!	THE FILE INDICATED BY THE FILE_INDEX PARAMETER

;	0455	!	    

;	0456	!

;	0457	! FORMAL PARAMETERS:

;	0458	!

;	0459	!	FILE_INDEX:A VALUE INDICATING WHICH OF THE FOUR OF

;	0460	!		NETWORK CONFIGURATION FILES IS TO BE OPENED

;	0461	!		AND CONNECTED TO, LEGAL VALUES ARE

;	0462	!		0:LOCAL NODE DATABASE

;	0463	!		1:REMOTE NODE DATA BASE

;	0464	!		2:LINE DATABASE

;	0465	!		3:OBJECT DATABASE

;	0466	!

;	0467	! IMPLICIT INPUTS:

;	0468	!

;	0469	!	NONE

;	0470	!

;	0471	! IMPLICIT OUTPUTS:

;	0472	!

;	0473	!	NONE

;	0474	!

;	0475	! ROUTINE VALUE:

;	0476	! COMPLETION CODES:

;	0477	!

;	0478	!	SHOULD EITHER THE $OPEN OR $CONNECT FAIL, THE RMS ERROR

;	0479	!	CODE IS RETURNED,OTHERWISE THE RMS SUCESS CODE IS 

;	0480	!	RETURNED

;	0481	!

;	0482	! SIDE EFFECTS:

;	0483	!

;	0484	!	OPEN_FILE SETS THE FAB$L_FNA AND FAB$B_FNS FIELDS

;	0485	!	FOR FUTURE ACCESS

;	0486	!

;	0487	!--

;	0488	

;	0489		BEGIN

;	0490		LOCAL

;	0491	  	    STATUS;

;	0492	!+

;	0493	!CHECK FOR INVALID FILE_INDEX

;	0494	

;	0495	IF

;	0496	    (.FILE_INDEX LSS 0 ) OR

;	0497	    (.FILE_INDEX GTR 3)

;	0498	THEN

;	0499	    RETURN 0;

;	0500		FILEFAB[FAB$L_FNA]=.FILETABLE[.FILE_INDEX,FILENAME];

;	0501		FILEFAB[FAB$B_FNS]=.FILETABLE[.FILE_INDEX,NAMESIZE];

;	0502		IF NOT (STATUS=$OPEN(FAB=FILEFAB))



; Bliss-32 7.352	Saturday 22-AUG-1978 02:05:51	DBB3:[NCP.SRC]NCPSUB.B32;6					Page 9-1

; Digital Equipment Corporation

;

;	0503		THEN

;	0504		    RETURN .STATUS;

;	0505		IF NOT (STATUS=$CONNECT(RAB=FILERAB))

;	0506		    THEN

;	0507			$CLOSE(FAB=FILEFAB);

;	0508		RETURN .STATUS

;	0509		END;







							    .GLOBL  SYS$OPEN, SYS$CONNECT, SYS$CLOSE



					 0804 000A1 	    .ENTRY  OPEN_FILE, Save R2,R11				      ; 0448

		         5B	0000'  CF  9E 000A3 	    MOVAB   FILEFAB, R11					      ;

		         51	  04   AC  D0 000A8 	    MOVL    FILE_INDEX, R1					      ; 0496

				       49  19 000AC 	    BLSS    2$							      ;

		         03	       51  D1 000AE 	    CMPL    R1, #3						      ; 0497

				       44  14 000B1 	    BGTR    2$							      ;

	   50	         51	       01  78 000B3 	    ASHL    #1, R1, R0						      ; 0500

		    2C   AB	0098 CB40  D0 000B7 	    MOVL    FILETABLE+4[R0], FILEFAB+44				      ;

	   50	         51	       01  78 000BE 	    ASHL    #1, R1, R0						      ; 0501

	   08	         00	0094 CB40  F0 000C2 	    INSV    FILETABLE[R0], #0, #8, FILEFAB+52			      ;

				  34   AB     000C9									      ;

				       5B  DD 000CB 	    PUSHL   R11							      ; 0502

	      00000000G  9F	       01  FB 000CD 	    CALLS   #1, @#SYS$OPEN					      ;

		         52	       50  D0 000D4 	    MOVL    R0, STATUS						      ;

		         19	       52  E9 000D7 	    BLBC    STATUS, 1$						      ;

				  50   AB  9F 000DA 	    PUSHAB  FILERAB						      ; 0505

	      00000000G  9F	       01  FB 000DD 	    CALLS   #1, @#SYS$CONNECT					      ;

		         52	       50  D0 000E4 	    MOVL    R0, STATUS						      ;

		         09	       52  E8 000E7 	    BLBS    STATUS, 1$						      ;

				       5B  DD 000EA 	    PUSHL   R11							      ; 0507

	      00000000G  9F	       01  FB 000EC 	    CALLS   #1, @#SYS$CLOSE					      ;

		         50	       52  D0 000F3 1$:     MOVL    STATUS, R0						      ; 0508

					   04 000F6 	    RET     							      ;

				       50  D4 000F7 2$:     CLRL    R0							      ; 0448

					   04 000F9 	    RET     							      ;



; Routine Size:  89 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 02:05:51	DBB3:[NCP.SRC]NCPSUB.B32;6					Page 10

; Digital Equipment Corporation

;

;	0510	GLOBAL ROUTINE CLOSE_FILE=

;	0511	

;	0512	!++

;	0513	! FUNCTIONAL DESCRIPTION:

;	0514	!

;	0515	!	CLOSE_FILE CLOSES THE CURRENTLY OPEN CONFIGURATION FILE

;	0516	!		VIA RMS $CLOSE

;	0517	!

;	0518	! FORMAL PARAMETERS:

;	0519	!

;	0520	!	NONE

;	0521	!

;	0522	! IMPLICIT INPUTS:

;	0523	!

;	0524	!	FILEFAB:THE FAB FOR THE OPEN FILE

;	0525	!

;	0526	! IMPLICIT OUTPUTS:

;	0527	!

;	0528	!	NONE

;	0529	!

;	0530	! ROUTINE VALUE:

;	0531	! COMPLETION CODES:

;	0532	!

;	0533	!	THE RMS CODE FOR THE $CLOSE OPERATION IS RETURNED

;	0534	!

;	0535	! SIDE EFFECTS:

;	0536	!

;	0537	!	NONE

;	0538	!

;	0539	!--

;	0540	

;	0541	BEGIN

;	0542	$CLOSE(FAB=FILEFAB)

;	0543	END;











					 0000 000FA 	    .ENTRY  CLOSE_FILE, Save nothing				      ; 0510

				0000'  CF  9F 000FC 	    PUSHAB  FILEFAB						      ; 0542

	      00000000G  9F	       01  FB 00100 	    CALLS   #1, @#SYS$CLOSE					      ;

					   04 00107 	    RET     							      ; 0510



; Routine Size:  14 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 02:05:51	DBB3:[NCP.SRC]NCPSUB.B32;6					Page 11

; Digital Equipment Corporation

;

;	0544	END

;	0545	ELUDOM













;				       PSECT SUMMARY

;

;	Name		 Bytes			       Attributes

;

;  $PLIT$         	    92  NOWRT,  RD ,NOEXE,NOSHR,  LCL,  REL,  CON,NOPIC,ALIGN(2)

;  $OWN$          	   180    WRT,  RD ,NOEXE,NOSHR,  LCL,  REL,  CON,NOPIC,ALIGN(2)

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









;				LIBRARY STATISTICS

;

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

;	File				     Total    Loaded   Percent      Read

;

;  DBA4:[SYSLIB]STARLET.L32;1		      2688        33         1       138











; Size:		264 code + 272 data bytes

; Run Time:	00:11.3

; Elapsed Time:	00:22.7

; Memory Used:	178 pages

; Compilation Complete

