home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
simtel
/
sigm
/
vols000
/
vol098
/
syslib8.hlp
< prev
next >
Wrap
Text File
|
1985-02-09
|
7KB
|
173 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.
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
: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∙ ì
filσ (defaul⌠ oµ 64)«á I⌠ i≤ als∩ useΣ t∩ definσ wherσ iε memor∙ ì
the ZCPR2 disk names buffer resides.
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
Outputs: None
Registers Affected: None
SYSLIB Routines Called: MOVEB
Specia∞á Erro≥ Conditions║ None
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)
Registers Affected: HL, BC, PSW
SYSLIB Routines Called: INITFCB, ZPFIND, FI3$OPEN, F3$GET
Specia∞á Erro≥á Conditions║á A=░á ma∙á meaεá eithe≥á memor∙ ì
overflow or NAMES.DIR not found.
: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σ memory-residen⌠ name≤ buffer¼á iµ ì
any¼á i≤ scanneΣ fo≥ thσ name¼ and¼ iµ n∩ sucΦ buffe≥ o≥ namσ no⌠ ì
found¼ thσ NAMES.DI╥ filσ i≤ sough⌠ alonτ thσ ZCPR▓ path¼ loaded¼ ì
anΣ scanneΣ fo≥ ß correspondinτ name«á Iµ found¼ thσ correspond-ì
inτá use≥ anΣ disδ value≤ arσ returned╗á iµ no⌠ found¼á aεá erro≥ ì
codσ i≤ 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