KF0SCAN         KNOWN FILE SCANNER                               21-AUG-1978 21:14:07   VAX-11 MACRO X0.3-11               Page   0

TABLE OF CONTENTS   



   (2)     100  DECLARATIONS

   (3)     100  RM$KFISCN - SCAN FOR A KNOWN FILE ENTRY

KF0SCAN         KNOWN FILE SCANNER                               21-AUG-1978 21:14:07   VAX-11 MACRO X0.3-11               Page   1

001                                                                                                                              (1)



                                     0000   100 	$BEGIN	KF0SCAN,001,F$RMSOPEN0,<KNOWN FILE SCANNER>

                                     0000   200 ;

                                     0000   300 ;			  COPYRIGHT (c) 1978 BY

                                     0000   400 ;	      DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

                                     0000   500 ;

                                     0000   600 ; THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND  COPIED

                                     0000   700 ; ONLY  IN  ACCORDANCE  WITH  THE  TERMS  OF  SUCH  LICENSE AND WITH THE

                                     0000   800 ; INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR  ANY  OTHER

                                     0000   900 ; COPIES  THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY

                                     0000  1000 ; OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE  IS  HEREBY

                                     0000  1100 ; TRANSFERRED.

                                     0000  1200 ;

                                     0000  1300 ; THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT  NOTICE

                                     0000  1400 ; AND  SHOULD  NOT  BE  CONSTRUED  AS  A COMMITMENT BY DIGITAL EQUIPMENT

                                     0000  1500 ; CORPORATION.

                                     0000  1600 ;

                                     0000  1700 ; DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR  RELIABILITY  OF  ITS

                                     0000  1800 ; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.

                                     0000  1900 ;

                                     0000  2000 

                                     0000  2100 ;++

                                     0000  2200 ; FACILITY:

                                     0000  2300 ;

                                     0000  2400 ; ABSTRACT:

                                     0000  2500 ;

                                     0000  2600 ;

                                     0000  2700 ; ENVIRONMENT:

                                     0000  2800 ;	KERNEL MODE RMS SUBROUTINE - KNOWN FILE MUTEX LOCKED FOR AT LEAST READING

                                     0000  2900 ;

                                     0000  3000 ; AUTHOR: PETER H. LIPMAN, CREATION DATE: 15-JUN-1978

                                     0000  3100 ;

                                     0000  3200 ; MODIFIED BY:

                                     0000  3300 ;

                                     0000  3500 ; 01	- 

                                     0000  3600 ;--

KF0SCAN         KNOWN FILE SCANNER                               21-AUG-1978 21:14:07   VAX-11 MACRO X0.3-11               Page   2

001             DECLARATIONS                                                                                                     (2)



                                     0000   100 	.SBTTL	DECLARATIONS

                                     0000   200 ;

                                     0000   300 ; INCLUDE FILES:

                                     0000   400 ;

                                     0000  1000 	$KFIDEF				;KNOWN FILE ENTRY DEFINITIONS

                                     0000  1050 	$KFPDEF				;KNOWN FILE POINTER BLOCK DEFINITIONS

                                     0000  1500 ;

                                     0000  1600 ; MACROS:

                                     0000  1700 ;

                                     0000  1800 ;

                                     0000  1900 ; EQUATED SYMBOLS:

                                     0000  2000 ;

                                     0000  4000 ;

                                     0000  4100 ; OWN STORAGE:

                                     0000  4200 ;

KF0SCAN         KNOWN FILE SCANNER                               21-AUG-1978 21:14:07   VAX-11 MACRO X0.3-11               Page   3

001             RM$KFISCN - SCAN FOR A KNOWN FILE ENTRY                                                                          (3)



                                     0000   100 	.SBTTL	RM$KFISCN - SCAN FOR A KNOWN FILE ENTRY

                                     0000   200 ;

                                     0000   300 ; CALLING SEQUENCE:

                                     0000   400 ;

                                     0000   500 ;	BSBW	RM$KFISCN

                                     0000   600 ;

                                     0000   700 ; INPUTS:

                                     0000   800 ;

                                     0000   900 ;	R8 = ADDRESS OF ARRAY OF ADDRESSES OF COUNTED STRINGS

                                     0000  1000 ;		0(R8) = ADDRESS OF DEVICE (UCB) STRING

                                     0000  1100 ;		4(R8) = ADDRESS OF DIRECTORY STRING

                                     0000  1200 ;		8(R8) = ADDRESS OF FILE NAME STRING

                                     0000  1300 ;	       12(R8) = ADDRESS OF FILE TYPE STRING

                                     0000  1350 ;	       16(R8) = 0 - STOPPER FOR VECTOR OF STRING ADDRESSES

                                     0000  1400 ;	KNOWN FILE MUTEX LOCKED AT LEAST FOR READING

                                     0000  1500 ;

                                     0000  1600 ; OUTPUTS:

                                     0000  1700 ;

                                     0000  1800 ;	R7 = ADDRESS OF KNOWN FILE ENTRY IF FOUND

                                     0000  1900 ;	   = 0 IF NOT FOUND

                                     0000  2000 ;	R10 = ADDRESS OF KNOWN FILE LIST HEAD IF ONE MATCHED

                                     0000  2100 ;	    = 0 IF THERE WAS NO MATCHING KNOWN FILE LIST HEAD

                                     0000  2200 ;	R4,R5,R6,R7,R8,R9,R10 ALTERED

                                     0000  2300 RM$KFISCN::

                                     0000  2400 ;

                                     0000  2500 ; NOW SET UP TO SCAN THE KNOWN FILE TABLE

                                     0000  2600 ;

            59   00000000'GF     D0  0000  2700 	MOVL	G^EXE$GL_KNOWNFIL,R9	;ADR OF ARRAY OF KNOWN FILE QUEUE ADDRESSES

                          4B     13  0007  2800 	BEQL	NO_KFIHD		;BRANCH IF NO TABLE

            56         F4 A9     9A  0009  2900 	MOVZBL	<KFP$B_QUECOUNT-KFP$L_QUE0>(R9),R6 ;NUMBER OF QUEUES TO SCAN

                          45     13  000D  3000 	BEQL	NO_KFIHD		;BRANCH IF NONE

                                     000F  3100 CHECKLIST:

            5A            89     D0  000F  3200 	MOVL	(R9)+,R10		;ADR OF NEXT KNOWN FILE QUEUE HEAD

                          3B     13  0012  3250 	BEQL	NEXTLIST		;BRANCH IF THIS LIST IS EMPTY

            57            5A     D0  0014  3300 	MOVL	R10,R7			;SET INITIAL "NEXT KFI ENTRY"

                          2E     11  0017  3400 	BRB	NEXTENTRY		;GO PROCESS THE NEXT ENTRY

                                     0019  3500 CHECKENTRY:

            54            58     D0  0019  3600 	MOVL	R8,R4			;ADR OF VECTOR OF ADDRESSES

            55         0C A7     9E  001C  3700 	MOVAB	KFI$B_DEVNAM(R7),R5	;ADR OF VECTOR OF BYTE OFFSETS

                                     0020  3800 					;TO COUNTED STRINGS, 0 IF NOT PRESENT

                          50     D4  0020  3900 	CLRL	R0			;INIT HIGH 24 BITS TO 0

                          10     11  0022  4000 	BRB	20$

                                     0024  4100 ;

                                     0024  4200 ; R0<9:31>=0 AT THIS POINT AND MUST REMAIN 0 DURING THIS LOOP

                                     0024  4300 ;

            51            85     9A  0024  4500 10$:	MOVZBL	(R5)+,R1		;OFFSET TO CORRESPONDING STRING IN KFI ENTRY

                          0B     13  0027  4600 	BEQL	20$			;NOT PRESENT IS A MATCH

            62            01     81  0029  4700 	ADDB3	#1,(R2),R0		;STRING SIZE INCLUDING COUNT BYTE

                          50         002C       

            62            50     29  002D  4800 	CMPC3	R0,(R2),(R7)[R1]	;DOES THIS STRING MATCH?

                          6741       0030       

                          0E     12  0032  4900 	BNEQ	NOMATCH			;BRANCH IF NOT

            52            84     D0  0034  5000 20$:	MOVL	(R4)+,R2		;NEXT STRING ADDRESS

                          EB     12  0037  5010 	BNEQ	10$			;BRANCH IF NOT AT THE END

                                     0039  5100 ;

                                     0039  5200 ; ALL STRINGS SPECIFIED IN THE KFI ENTRY MATCH

                                     0039  5300 ; IF THIS IS THE KFI HEADER, THEN SCAN FOR AN ENTRY THAT MATCHES

KF0SCAN         KNOWN FILE SCANNER                               21-AUG-1978 21:14:07   VAX-11 MACRO X0.3-11               Page   4

001             RM$KFISCN - SCAN FOR A KNOWN FILE ENTRY                                                                          (3)



                                     0039  5400 ; OTHERWISE THIS IS THE DESIRED ENTRY.

                                     0039  5500 ;

         0B A7            00     E1  0039  5700 	BBC	#KFI$V_KFIHD,KFI$B_KFICTL(R7),MATCH ;IF NOT HDR ENTRY, MATCH

                          1A         003D       

                          56     D4  003E  5800 	CLRL	R6			;DO NOT SCAN ANOTHER KNOWN FILE LIST

                          05     11  0040  5900 	BRB	NEXTENTRY

                                     0042  6000 

                                     0042  6300 NOMATCH:

                          00     E0  0042  6400 	BBS	#KFI$V_KFIHD,KFI$B_KFICTL(R7),- ;NOT A KNOWN FILE

            08         0B A7         0044  6500 		NEXTLIST		;IF NO MATCH FOR HEADER

                                     0047  6600 NEXTENTRY:

            57            67     D0  0047  6700 	MOVL	(R7),R7			;GET NEXT KFI ENTRY

            5A            57     D1  004A  6800 	CMPL	R7,R10			;END OF LIST?

                          CA     12  004D  6900 	BNEQ	CHECKENTRY		;BRANCH IF NOT

                                     004F  7000 NEXTLIST:

            BD            56     F5  004F  7100 	SOBGTR	R6,CHECKLIST		;CHECK THE NEXT KNOWN FILE LIST IF ANY

                          02     19  0052  7200 	BLSS	NO_KFIENTRY		;BRANCH IF END OF CORRECT KNOWN FILE LIST

                                     0054  7250 NO_KFIHD:

                          5A     D4  0054  7300 	CLRL	R10			;NO KNOWN FILE LIST HEAD

                                     0056  7400 NO_KFIENTRY:

                          57     D4  0056  7500 	CLRL	R7			;NO KNOWN FILE ENTRY FOUND

                                     0058  7600 MATCH:

                                 05  0058  7700 	RSB

                                     0059  7800 

                                     0059  7900 

                                     0059  8000 	.END

KF0SCAN         KNOWN FILE SCANNER                               21-AUG-1978 21:14:07   VAX-11 MACRO X0.3-11               Page   5

SYMBOL TABLE                                                                                                                     (3)



$$.PSECT_EP    = 00000000            KFI$V_MARKDEL  = 00000007            

$$RMSTEST      = 0000001A            KFI$V_NOREPLACE= 00000006            

$$RMS_PBUGCHK  = 00000010            KFI$V_PROCPRIV = 00000007            

$$RMS_TBUGCHK  = 00000008            KFI$W_FID        0000001C            

$$RMS_UMODE    = 00000004            KFI$W_FID_NUM    0000001C            

BIT...         = 00000010            KFI$W_FID_RVN    00000020            

CHECKENTRY       00000019 R     02   KFI$W_FID_SEQ    0000001E            

CHECKLIST        0000000F R     02   KFI$W_FLAGS      00000014            

EXE$GL_KNOWNFIL  ********   X   02   KFI$W_GBLSECCNT  00000016            

GBL...         = 00000000            KFI$W_REFCNT     00000010            

KFI$B_DEVNAM     0000000C            KFI$W_SIZE       00000008            

KFI$B_DEVUCB     0000000C            KFP$B_QUECOUNT   00000000            

KFI$B_DIRNAM     0000000D            KFP$B_TYPE       0000000A            

KFI$B_FILNAM     0000000E            KFP$B_TYPE1      0000000B            

KFI$B_KFICTL     0000000B            KFP$L_QUE0       0000000C            

KFI$B_KFIQNUM    00000012            KFP$W_SIZE       00000008            

KFI$B_KFISEQ     00000013            MATCH            00000058 R     02   

KFI$B_MATCHCTL   0000002C            NEXTENTRY        00000047 R     02   

KFI$B_TYPE       0000000A            NEXTLIST         0000004F R     02   

KFI$B_TYPNAM     0000000F            NOMATCH          00000042 R     02   

KFI$C_KFIHDLEN   00000014            NO_KFIENTRY      00000056 R     02   

KFI$C_LENGTH     00000034            NO_KFIHD         00000054 R     02   

KFI$K_KFIHDLEN   00000014            RM$KFISCN        00000000 RG    02   

KFI$K_LENGTH     00000034            

KFI$L_IDENT      00000030            

KFI$L_IMGHDR     00000020            

KFI$L_KFIQBL     00000004            

KFI$L_KFIQFL     00000000            

KFI$L_USECNT     00000018            

KFI$L_WINDOW     0000001C            

KFI$M_COMPATMOD= 00008000            

KFI$M_DONOTOPEN= 00000004            

KFI$M_FILIDOPEN= 00000002            

KFI$M_IS_RESHDR= 00000100            

KFI$M_IS_SHARED= 00000200            

KFI$M_KFIHD    = 00000001            

KFI$M_KFISEQ   = 00000003            

KFI$M_KP_OPEN  = 00000001            

KFI$M_KP_RESHDR= 00000002            

KFI$M_KP_SHARED= 00000004            

KFI$M_LIM      = 00000040            

KFI$M_MARKDEL  = 00000080            

KFI$M_NOREPLACE= 00000040            

KFI$M_PROCPRIV = 00000080            

KFI$Q_PROCPRIV   00000024            

KFI$S_KFISEQ   = 00000002            

KFI$V_COMPATMOD= 0000000F            

KFI$V_DONOTOPEN= 00000002            

KFI$V_FILIDOPEN= 00000001            

KFI$V_IS_RESHDR= 00000008            

KFI$V_IS_SHARED= 00000009            

KFI$V_KFIHD    = 00000000            

KFI$V_KFISEQ   = 00000000            

KFI$V_KP_OPEN  = 00000000            

KFI$V_KP_RESHDR= 00000001            

KFI$V_KP_SHARED= 00000002            

KFI$V_LIM      = 00000006            

KF0SCAN         KNOWN FILE SCANNER                               21-AUG-1978 21:14:07   VAX-11 MACRO X0.3-11               Page   6

PROGRAM SECTION SYNOPSIS                                                                                                         (3)







PROGRAM SECTION SYNOPSIS



.  ABS  .        00000000      00     NOPIC   USR   CON   ABS   LCL NOSHR NOEXE NORD  NOWRT BYTE  

. BLANK .        00000000      01     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT BYTE  

F$RMSOPEN0       00000059      02     NOPIC   USR   CON   REL   GBL NOSHR   EXE   RD  NOWRT BYTE  

$ABS$            00000034      03     NOPIC   USR   CON   ABS   LCL NOSHR   EXE   RD    WRT BYTE  





THERE WERE NO ERRORS OR WARNINGS.

23676. BYTES LEFT IN FREE MEMORY POOL.

1304. BYTES OF RECLAIMED MEMORY.

OBJ$:KF0SCAN,LIS$:KF0SCAN/-SP=EXECML$/ML,LIB$:R/ML,SRC$:KF0SCAN

20 MLB DIR RDS - 183 GETS TO DEFINE 10 MACROS. 9 INTER. FILE WRITES. 

