home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
simtel
/
sigm
/
vols000
/
vol089
/
syslib8.hlp
< prev
next >
Wrap
Text File
|
1985-02-09
|
5KB
|
140 lines
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
Thi≤ se⌠ oµ routine≤ i≤ specifiπ t∩ thσ ZCPR2-Specifiπ NameΣ ì
Director∙ Structure«á Thesσ routine≤ providσ thσ programme≥ witΦ ì
ßá se⌠á oµ routine≤ whicΦ resolvσ thσ nameΣ director∙á reference≤ ì
fo≥ him¼ translatinτ ß nameΣ director∙ int∩ thσ disk/use≥ areß i⌠ ì
refers to.
Four routines are included in this set:
o ZFNINIT -- Initialize Named Directory Buffers
o ZDNFIND -- Scan for Disk Directory Name
o ZDNAME -- Load All Disk Directory Name Data
o ZFNAME -- Named Directory File Name Scanner
:Initialize Named Directory FCB
Routine Name: ZFNINIT
Function║
ZFNINI╘á allow≤ thσ use≥ t∩ initializσ thσ namσ oµá thσ ì
nameΣá director∙á filσ (defaul⌠ namσ oµ NAMES.DIR⌐ t∩ somσá othe≥ ì
namσá anΣ t∩ changσ thσ numbe≥ oµ name≤ permitteΣ iε ßá director∙ ì
file (default of 64).
Inputs: DE pts to FCB containing the new file name
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
Outputs: None
Registers Affected: None
SYSLIB Routines Called: MOVEB
Specia∞á Erro≥ 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)
Registers Affected: HL, BC, PSW
SYSLIB Routines Called: INITFCB, ZPFIND, FI3$OPEN, F3$GET
Special Error Conditions: None
:DIR: Prefix Evaluator
Routine Name: ZDNFIND
Function║
ZDNFIN─ examine≤ thσ DIR║á prefi° fo≥ eithe≥ ß DU║ forφ ì
o≥ ß director∙ name« Iµ i⌠ i≤ determineΣ tha⌠ thσ DIR║ prefi° i≤ ì
no⌠ oµ thσ DU║á form¼ theε thσ NAMES.DI╥ filσ i≤ sough⌠ alonτ thσ ì
ZCPR▓á path¼á loaded¼á anΣ scanneΣ fo≥ ß correspondinτ name«á Iµ ì
found¼á thσ correspondinτ use≥ anΣ disδ value≤ arσá returned╗á iµ ì
not found, an error code is returned.
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
Registers Affected: BC, HL, PSW
SYSLIB Routines Called: INITFCB, ZPFIND, FI3$OPEN,
FI3$CLOSE, F3$GET
Specia∞ Erro≥ Conditions║ Notσ tha⌠ ZDNFIN─ use≤ Inpu⌠ Filσ ì
3¼á s∩á Inpu⌠á Filσ │ shoulΣ no⌠ bσ openeΣ wheε thi≤á routinσá i≤ ì
called«á Also¼á ZPFIN─ i≤ used¼ s∩ thσ programme≥ mus⌠ bσ surσ ß ì
proper external path is specified if needed by calling ZINIEXT.
:Extended File Name Scanner
Routine Name: ZFNAME
Function║
ZFNAM┼á i≤ ß filσ namσ scanner«á Pointinτ t∩ thσ firs⌠ ì
characte≥áá oµáá ßáá filσá namσáá specificatioεáá oµáá thσáá forφ ì
'DIR:FILENAME.TYP'¼á wherσá an∙á par⌠á oµ thi≤á specificatioεá i≤ ì
optional¼á thi≤á routinσ fill≤ iε aε FC┬á witΦá zeroes¼á properl∙ ì
initialize≤á thσá F╬ anΣ F╘ (Filσ Namσ anΣ Filσ Type⌐á field≤á iµ ì
'FILENAME.TYPºá o≥ an∙ par⌠ thereoµ i≤ present¼á anΣ return≤á thσ ì
valuσ oµ disδ anΣ use≥ iµ the∙ arσ specifieΣ (o≥ 0FF╚ iµ not).
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
Registers Affected: BC, HL, PSW
SYSLIB Routines Called: ZDNFIND
Specia∞áá Erro≥áá Conditions║áá Seσáá FNAM┼áá routinσáá fo≥ ì
similarities