

; Bliss-32 10.1-416	Monday 21-AUG-1978 23:03:19	DBB3:[F11A.SRC]RETDIR.B32;7					Page 1

;

;	0001	MODULE RETDIR (

;	0002			LANGUAGE (BLISS32),

;	0003			IDENT = 'A0002'

;	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:  F11ACP Structure Level 1

;	0029	!

;	0030	! ABSTRACT:

;	0031	!

;	0032	!	This routine returns the resulting data from a directory

;	0033	!	operation to the user's buffer packet.

;	0034	!

;	0035	! ENVIRONMENT:

;	0036	!

;	0037	!	STARLET operating system, including privileged system services

;	0038	!	and internal exec routines. This routine must be called

;	0039	!	in kernel mode.

;	0040	!

;	0041	!--

;	0042	!

;	0043	!

;	0044	! AUTHOR:  Andrew C. Goldstein,	 CREATION DATE:  3-Jan-1977  15:07

;	0045	!

;	0046	! REVISION HISTORY:

;	0047	!

;	0048	!   Andrew C. Goldstein, 30-Mar-1977  17:44

;	0049	!   X0002 - Remove returning of FIB components

;	0050	!

;	0051	!**

;	0052	

;	0053	

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

;	0055	REQUIRE 'SRC$:FCPDEF.B32';



; Bliss-32 10.1-416	Monday 21-AUG-1978 23:03:19	DBB3:[F11A.SRC]RETDIR.B32;7					Page 1-1

;



; Bliss-32 10.1-416	Monday 21-AUG-1978 23:03:19	DBB3:[F11A.SRC]RETDIR.B32;7					Page 2

;

;	0374	GLOBAL ROUTINE RETURN_DIR (COUNT, STRING, ABD) : NOVALUE =

;	0375	

;	0376	!++

;	0377	!

;	0378	! FUNCTIONAL DESCRIPTION:

;	0379	!

;	0380	!	This routine returns the resulting data from a directory

;	0381	!	operation to the user's buffer packet.

;	0382	!

;	0383	! CALLING SEQUENCE:

;	0384	!	RETURN_DIR (ARG1, ARG2, ARG3)

;	0385	!

;	0386	! INPUT PARAMETERS:

;	0387	!	ARG1: byte count of result string

;	0388	!	ARG2: address of result string

;	0389	!	ARG3: address of buffer descriptors

;	0390	!

;	0391	! IMPLICIT INPUTS:

;	0392	!	NONE

;	0393	!

;	0394	! OUTPUT PARAMETERS:

;	0395	!	NONE

;	0396	!

;	0397	! IMPLICIT OUTPUTS:

;	0398	!	NONE

;	0399	!

;	0400	! ROUTINE VALUE:

;	0401	!	NONE

;	0402	!

;	0403	! SIDE EFFECTS:

;	0404	!	result data written into buffer packet

;	0405	!

;	0406	!--

;	0407	

;	0408	BEGIN

;	0409	

;	0410	MAP

;	0411		STRING		: REF VECTOR [,BYTE], ! file string arg

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

;	0413						! descriptor arg

;	0414	

;	0415	

;	0416	! If the user provided a result length buffer, give him the length

;	0417	! of the result string.

;	0418	!

;	0419	

;	0420	IF .ABD[ABD$C_RESL, ABD$W_COUNT] GEQ 2

;	0421	THEN

;	0422	    BEGIN

;	0423	    (.ABD[ABD$C_RESL, ABD$W_TEXT] + ABD[ABD$C_RESL, ABD$W_TEXT] + 1)<0,16> = .COUNT;

;	0424	    END;

;	0425	

;	0426	! If the user provided a result string buffer, return as much of the

;	0427	! result string as will fit (zero filling the buffer).

;	0428	!



; Bliss-32 10.1-416	Monday 21-AUG-1978 23:03:19	DBB3:[F11A.SRC]RETDIR.B32;7					Page 2-1

;

;	0429	

;	0430	CH$COPY (.COUNT, .STRING, 0,

;	0431	    .ABD[ABD$C_RES, ABD$W_COUNT],

;	0432	    .ABD[ABD$C_RES, ABD$W_TEXT] + ABD[ABD$C_RES, ABD$W_TEXT] + 1);

;	0433	

;	0434	END;					! end of routine RETURN_DIR





							    .TITLE  RETDIR

							    .IDENT  \A0002\







							    .PSECT  $CODE$,NOWRT,2



					 003C 00000 	    .ENTRY  RETURN_DIR, Save R2,R3,R4,R5			      ; 0374

		         52 	  0C   AC  D0 00002 	    MOVL    ABD, R2						      ; 0420

		         02 	  1A   A2  B1 00006 	    CMPW    26(R2), #2						      ;

				       0F  1F 0000A 	    BLSSU   1$							      ;

		         51 	  18   A2  9E 0000C 	    MOVAB   24(R2), R1						      ; 0423

		         50 	       61  3C 00010 	    MOVZWL  (R1), R0						      ;

				  01 A140  9F 00013 	    PUSHAB  1(R1)[R0]						      ;

		         9E 	  04   AC  B0 00017 	    MOVW    COUNT, @(SP)+					      ;

		         51 	  20   A2  9E 0001B 1$:     MOVAB   32(R2), R1						      ; 0432

		         50 	       61  3C 0001F 	    MOVZWL  (R1), R0						      ;

	   00 	    08   BC	  04   AC  2C 00022 	    MOVC5   COUNT, @STRING, #0, 34(R2), 1(R1)[R0]		      ; 0430

		    01 A140	  22   A2     00028									      ;

					   04 0002D 	    RET     							      ; 0374



; Routine Size:  46 bytes





;	0435	

;	0436	END

;	0437	ELUDOM













;				       PSECT SUMMARY

;

;	Name		 Bytes			       Attributes

;

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









;				LIBRARY STATISTICS

;

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

;	File				     Total    Loaded   Percent      Read

;



; Bliss-32 10.1-416	Monday 21-AUG-1978 23:03:19	DBB3:[F11A.SRC]RETDIR.B32;7					Page 2-2

;

;  DBA4:[SYSLIB]LIB.L32;1		      5582         6         0       223











; Size:		46 code + 0 data bytes

; Run Time:	00:03.8

; Elapsed Time:	00:11.4

; Memory Used:	251 pages

; Compilation Complete

