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