FF (Find File) Version 2.2 01/12/90 FF finds all files matching a list of file specs on all drives, a specific drive, or a list of drives. All file specs are automatically made wild (that is, "A.B" becomes "A*.B*"). ================================================================= U S A G E ================================================================= FF [D: or DIR:]afn[,afn]... [d...][/o...] Options (d) before the slash: List of drives to scan Options (o) after the slash: E Exact matches only (no auto wildcarding). P No Paging of output. S Toggle inclusion of System files based on default configuration (see below). System files are never included unless the Wheel byte is set. The program error flag set to 0ffh if no matching files are found, or to 1 if the program is aborted by the user. The number of matching files found is put in a register. (By default register 0 is used, but the register to be used can be configured. See below.) If a drive or drive list is not included on the command line, the drives set in the drive vector are automatically scanned. (For an explanation of the drive vector see DRVTBL configuration below.) ================================================================= C O N F I G U R A T I O N ================================================================= In the first record of the COM file are three ASCII labels for configuration of FF. The labels can be easily seen using a patching utility, such as ZPATCH to configure the bytes immediately following each label. DRVTBL Two bytes follow this label with each bit corresponding to a drive (A-P) to be automatically scanned if no drives are given on the command line. Drives are scanned if the corresponding bit is set (1). REG# This byte sets the register number where the number of matching files found is recorded. The default is 0, but you can patch in any register number 0-9. A number greater than 9 will disable this feature. SYSF System files will be included by default if this byte is non-zero, provided the Wheel byte is set. If this byte or the Wheel byte are zero, system files are excluded. The "S" option reverses the meaning of this byte. ================================================================= * * * I M P O R T A N T N O T E * * * ================================================================= This program is copyright 1987 by NAOG/ZSIG. It may be copied and modified freely for personal use but may not be sold or distributed for a fee. Modified versions must be submitted to and approved by NAOG/ZSIG before they may be distributed. See the file ZSIGPOL1.DOC on Z-Nodes for the ZSIG policy on signing out and modifying programs. ================================================================= R E V I S I O N H I S T O R Y ================================================================= FF was derived from FINDF version 26. FINDF was originally created by Richard Conn. See the history in FINDF for a chronology of contributions by others, including Howard Goldstein, Joe Wright, Al Hawley, Rick Peterson, and Bruce Morgen. I have given this program the new name FF so that it can develop in different directions without interfering with Echelon's need to support the utilities it provides with its commercial versions of Z-System. Version 2.2 -- Howard Goldstein, January 12, 1990 Modified exit logic so that the number of files found is placed in the regiter even when the program is aborted by the user. The error flag is set to 1 on user abort. Rewrote Gene Pizzetta's fixes from version 2.1 to get the COM file back down to 3k. Fixed logic to allow one more line on first screen of paged output. Version 2.1 -- Gene Pizzetta, December 30, 1989 Added configuration byte (SYSF label in first record) to include or exclude SYStem files as the default. A non-zero value causes system files to be included, but the byte will be ignored if the wheel byte is off. "S" option now toggles current default. Help screen modified to reflect default setting. Created quick and dirty doc file from source code header and history (mainly so source code would fit into memory under ZDE). Version 2.0 -- Howard Goldstein, November 26, 1989 Fixed a bug which caused duplicate listing of files larger than 32 extents. Version 1.9 -- Carson Wilson, March 18, 1989 Release version. Cleaned up code. Carson Wilson may be reached at Antelope Freeway RAS, 312-764-5162, Chicago, where he is SYSOP. Version 1.8 -- Carson Wilson, March 9, 1989 Corrected check against the MAXDRV byte in the environment descriptor. Previous code allowed one drive beyond MAXDRV. Extracted new MASK routine from INIT so that it can be called after any drive options are processed. This enforces the valid drive vector from the environment descriptor regardless of the setting of the MAXDRV byte. Thanks to Howard Goldstein for discovering both of these faults. Version 1.7 -- Carson Wilson, March 4, 1989 Fixed up bug created in version 1.6 which caused "FF /" command to list all files. Also made help command more restrictive: only "FF" or "FF//" (exactly) now give help - other commands (e.g., "FF /" or "FF // ") are interpreted as filespecs. Planned enhancements: Make the drive vector into a word for easier coding. Create a .CFG file to allow use of Al Hawley's ZCNFG menu-driven installer with FF. Version 1.6 -- Carson Wilson, March 2, 1989 Following Bridger Mitchell's suggestion, Help is no longer generated by a single slash as a parameter, allowing files beginning with the slash character to be searched for. Also changed page prompt to reflect multiple abort keys (says "RETURN=page" instead of "OTHER=page"). Version 1.5 -- Carson Wilson, February 26, 1989 Added "REG#" ASCII pointer to the patch byte controlling which register is used to store the number of matches found. The default is register zero. Change the register by substituting a BINARY value from 1 to 9 at this storage location. Following Howard's suggestion, FF now allows all abort characters for all abort tests, instead of just the interpage abort test. Version 1.4 -- Carson Wilson, February 23, 1989 Now allows abort with ^C, c, C, ^K, k, K, ^X, x, or X between pages of paged output. Version 1.41x -- Howard Goldstein, February 18, 1989 Fixed use of system valid drive vector. It is now logically ANDed with the table in the program. Version 1.3 -- Bridger Mitchell, July 4, 1988 Exit with BIOS, then BDOS drive-select. Version 1.2 -- Bridger Mitchell, February 29, 1988 Added extended environment valid-drive vector. Version 1.1 -- Bridger Mitchell, November 14, 1987 Added CP/M 3 compatibility. Converted directory searches to BDOS calls, for compatibility with DosDisk and other BDOS emulators. Removed IX register use, for compatibility with BIOS/DOS systems that mistakenly fail to preserve z80 registers. Added check for presence of external environment. Uses full TPA if CCP is protected. Search every valid BIOS drives whose bit is set in the DRVTBL; previous versions aborted on the first invalid drive. Version 1.0 -- Jay Sage, March 14, 1987 Added the DRVTBL configuration word at the beginning of the code. This word contains a bit for each possible drive in a system. When the user has not indicated a specific drive to scan, each drive is checked against this table and skipped if the bit is not set. This allows FF to work in systems with holes (e.g., drives A, B, and F) in which the BIOS hangs when a drive is accessed that does not exist or has no disk in it. As distributed, FF has FFFFH in this word so that all drives up to the max drive specified in the environment will be scanned. Added more flexibility to output paging. The output can be paged a line at a time by hitting the space bar or can be aborted at a page break by hitting control-C. Enhanced syntax to allow specifying a list of drives to be scanned in the option field. Added code to set program error flag if no files found and to clear the flag if files were found. The number of files found is stored in a configurable user register. If the number is more than 255, the value 255 is stored. As distrubuted, register 0 is used. Added code to treat all file specs as ambiguous. Thus, "FF A" is equivalent to "FF A*.*" and "FF A.B" is equivalent to "FF A*.B*". This feature can be disabled with the E option.