ZCPR2-Specific File Name String Parser (ZFNAME) and Support
Initialize Named Directory FCB
Directory Name File Loader
DIR: Prefix Evaluator
Extended File Name Scanner
:Introduction
Five routines are included in this set:
o ZFNINIT -- Initialize Named Directory Buffers
o ZCPRQ2 -- Status Return
o ZDNFIND -- Scan for Disk Directory Name
o ZDNAME -- Load All Disk Directory Name Data
o ZFNAME -- Named Directory File Name Scanner
Inputs: DE pts to FCB containing the new file name
HL contains the address of the memory-resident
disk names buffer
C is the new maximum number of directory names
A is a flag indicating values to set as follows:
Bit 7 -- Set to 1 to load default FCB fm DE
Bit 6 -- Set to 1 to load name count fm C
Bi� � -- Se� t� � t� loa� bu� addres� f� HL
Note��� I� thi� routin� i� no� called�� th� followin� �
assumptions are made:
o Name of Directory Names File -- NAMES.DIR
o Max Number of Directory Names -- 64
o No Memory-Resident Names Buffer Exists
:Status Return
Routine Name: ZCPRQ2
Function:
Return� � pointe� i� H� t� th� firs� byt� o� th� ZCPR� �
buffe� are� i� th� 2n� ZCPR� modul� i� SYSLIB�� Thi� buffe� i� �
structured as follows:
Byte 0: Max Number of Directory Names
Bytes 1-2: Address of Memory-Resident Names
Buffer or 0000H if none exists
Bytes 3-38: FCB of Directory Names File
Inputs: None
Outputs: HL pts to Byte 0 as described above
Registers Affected: HL
SYSLIB Routines Called: None
Special Error Conditions: None
:Directory Name File Loader
Routine Name: ZDNAME
Function:
ZDNAMŠ load� th� content� o� th� NAMES.DIҠ fil� int� �
th� memor� buffe� pointe� t� b� HL� Eac� entr� i� thi� buffe� i� �
structured as follows:
Byte 0: Disk Number (A=0)
Byte 1: User Number
Bytes 2-9: Directory Name, 8 Chars Max, Space
Fill at End
Inputs: HL pts to the memory buffer extending to the base
of the BDOS
Outputs: HL pts to the first entry in the buffer
C is the number of valid entries, B=0
A is the error flag (A=0 and Z if error)
Inputs: HL pts to first byte of DIR: prefix
A=� i� DU� for� NO� allowed
Outputs: B=Disk (B=1 if Disk A, B=0FFH if Current Disk),
C=User (C=0FFH if Current User), HL pts to colon,
Zer� Fla� Clea� (NZ� i� n� error� Zer� Fla� Se�
(Z) if error, and no valid values returned
Th� director� indicato� 'DIR:'�� i� specified� ma� b� o� on� �
of four forms:
DIRECT: -- A named directory, of up to 8 chars long
d: -- A disk drive letter
u: -- A user number
du: -- A disk drive letter and a user number
Th� du�� for� i� checke� first� s� unnecessar� dis� activit� �
in looking for the NAMES.DIR file is avoided.
Examples of valid input strings:
HELP:*.HLP A5:TEST.TXT C?:ABC.* PASCAL:*.COM
Inputs: DE pts to FCB to fill, HL pts to first byte of
targe� string; FCB is 36 bytes long
Outputs: B=Disk (B=1 for Disk A), C=User
B=0FFH if no disk specified (current disk)
C=0FFH if no user specified (current user)
C=? if all user areas specified
HL pts to terminating character
A=0 and Zero Flag Set (Z) if error in disk
or user numbers; A=0FFH and NZ if no error