FNDPG	MACRO M1110  22-AUG-78 01:42  PAGE 2





      1						.TITLE	FNDPG

      2						.IDENT	/02/                                                            ;**NEW**

      3					                                                                                ;**-1

      4					;

      5					; COPYRIGHT   1974,  DIGITAL  EQUIPMENT  CORP.,  MAYNARD,   MASS.

      6					;

      7					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE

      8					; ON A  SINGLE COMPUTER SYSTEM AND CAN BE  COPIED (WITH INCLUSION

      9					; OF DEC'S COPYRIGHT  NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT

     10					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.

     11					;

     12					; THE  INFORMATION  IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT

     13					; NOTICE  AND  SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL

     14					; EQUIPMENT CORPORATION.

     15					;

     16					; DEC  ASSUMES NO  RESPONSIBILITY  FOR  THE  USE  OR  RELIABILITY

     17					; OF  ITS  SOFTWARE ON  EQUIPMENT WHICH  IS  NOT SUPPLIED BY DEC.

     18					;

     19					; VERSION 02                                                                    ;**NEW**

     20					;                                                                               ;**-1

     21					; C. MONIA 22-FEB-74

     22					;

     23					; SCAN PAGE LIST FOR RESIDENT VIRTUAL ADDRESS

     24					;

     25					;+

     26					; **-$FNDPG-SEARCH PAGE BUFFERS FOR RESIDENT ADDRESS

     27					;

     28					; INPUTS:

     29					;

     30					;	R1=VIRTUAL ADDRESS

     31					;

     32					; OUTPUTS:

     33					;

     34					;	C-CLEAR: PAGE BUFFER RESIDENT

     35					;

     36					;		R0=ADDRESS OF BUFFER

     37					;

     38					;	C-SET:   PAGE NOT RESIDENT

     39					;

     40					; IN EITHER CASE R1 IS LEFT UNCHANGED.

     41					;

     42					; IF RESIDENT, PAGE BUFFER IS TIME-STAMPED AND RETURNED

     43					; TO CALLER

     44					;-

     45

     46	000000				$FNDPG::			;

     47	000000	005267 	000000G			INC	$TIME		; ADVANCE TIME

     48	000004	001012 				BNE	4$		; IF NE NO WRAP-AROUND                          ;**NEW**

     49	000006	005267 	000000G			INC	$TIME		; SET TIME TO 1                                 ;**NEW**

     50	000012	012700 	000000C			MOV	#<$PAGHD-P$GNXT>,R0 ; GET RESIDENT PAGE LIST                    ;**NEW**

     51	000016				2$:				;                                               ;**NEW**

     52	000016	016000 	000000G			MOV	P$GNXT(R0),R0	; GET ADDRESS OF NEXT RESIDENT PAGE             ;**NEW**

     53	000022	001403 				BEQ	4$		; IF EQ DONE                                    ;**NEW**

     54	000024	005060 	000000G			CLR	P$GTIM(R0)	; RESET TIME                                    ;**NEW**

     55	000030	000772 				BR	2$		; GO AGAIN                                      ;**NEW**

     56	000032				4$:				;                                               ;**NEW**

     57	000032	010102 				MOV	R1,R2		; COPY VIRTUAL ADDRESS

FNDPG	MACRO M1110  22-AUG-78 01:42  PAGE 2-1





     58	000034	105002 				CLRB	R2		; CLEAR DISPLACEMENT IN BLOCK                   ;**NEW**

     59	000036	000302 				SWAB	R2		; POSITION RELATIVE BLOCK TO LOW BYTE

     60	000040	016700 	000000G			MOV	$PAGLS,R0	; GET ADDRESS OF RESIDENT PAGE LIST             ;**NEW**

     61	000044	001407 				BEQ	8$		; IF EQ NONE                                    ;**NEW**

     62	000046	006302 				ASL	R2		; CONVERT BLOCK TO WORD OFFSET                  ;**NEW**

     63	000050	060200 				ADD	R2,R0		; COMPUTE LIST INDEX                            ;**NEW**

     64	000052	000261 				SEC			; ASSUME PAGE NOT RESIDENT                      ;**NEW**

     65	000054	011000 				MOV	(R0),R0		; GET PAGE ADDRESS                              ;**NEW**

     66	000056	001416 				BEQ	20$		; IF EQ PAGE NOT IN MEMORY                      ;**NEW**

     67	000060	000241 				CLC			; SET SUCCESS                                   ;**NEW**

     68	000062	000411 				BR	15$		; EXIT                                          ;**NEW**

     69	000064				8$:				;                                               ;**NEW**

     70	000064	012700 	000000C			MOV	#<$PAGHD-P$GNXT>,R0 ; GET LISTHEAD ADDRESS MINUS OFFSET

     71	000070				10$:				;

     72	000070	000261 				SEC			; ASSUME PAGE NOT RESIDENT

     73	000072	016000 	000000G			MOV	P$GNXT(R0),R0	; GET NEXT PAGE BUFFER

     74	000076	001406 				BEQ	20$		; IF EQ NO MORE

     75	000100	126002 	000000G			CMPB	P$GBLK(R0),R2	; CHECK RELATIVE BLOCK

     76	000104	001371 				BNE	10$		; IF NE NOT REQUESTED PAGE

     77	000106				15$:				;                                               ;**NEW**

     78	000106	016760 	000000G	000000G		MOV	$TIME,P$GTIM(R0) ; TIME-STAMP THIS PAGE

     79	000114				20$:				;

     80	000114					RETURN			;

     81

     82		000001 				.END

FNDPG	MACRO M1110  22-AUG-78 01:42  PAGE 2-2

SYMBOL TABLE



CR    = 000015   	LF    = 000012   	P$GTIM= ****** GX	VT    = 000013   	$PAGLS= ****** GX

FF    = 000014   	P$GBLK= ****** GX	R$$11M= 000000   	$FNDPG  000000RG 	$TIME = ****** GX

HT    = 000011   	P$GNXT= ****** GX	SPA   = 000040   	$PAGHD= ****** GX



. ABS.	000000	   000

      	000116	   001

ERRORS DETECTED:  0



VIRTUAL MEMORY USED:  600 WORDS  ( 3 PAGES)

DYNAMIC MEMORY:  2772 WORDS  ( 10 PAGES)

ELAPSED TIME:  00:00:04

OBJ$:FNDPG,LIS$:FNDPG/-SP=SRC$:MACFLM,FNDPG

