home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / simtel / sigm / vols000 / vol098 / syslib8.hlp < prev    next >
Text File  |  1985-02-09  |  7KB  |  173 lines

  1. ZCPR2-Specific File Name String Parser (ZFNAME) and Support
  2. Initialize Named Directory FCB
  3. Directory Name File Loader
  4. DIR: Prefix Evaluator
  5. Extended File Name Scanner
  6. :Introduction
  7.  
  8.      Thi≤ se⌠ oµ routine≤ i≤ specifiπ t∩ thσ ZCPR2-Specifiπ NameΣ ì
  9. Director∙ Structure«á  Thesσ routine≤ providσ thσ programme≥ witΦ ì
  10. ßá se⌠á oµ routine≤ whicΦ resolvσ thσ nameΣ director∙á reference≤ ì
  11. fo≥ him¼ translatinτ ß nameΣ director∙ int∩ thσ disk/use≥ areß i⌠ ì
  12. refers to.
  13.  
  14.      Five routines are included in this set:
  15.           o ZFNINIT -- Initialize Named Directory Buffers
  16.           o ZCPRQ2  -- Status Return
  17.           o ZDNFIND -- Scan for Disk Directory Name
  18.           o ZDNAME  -- Load All Disk Directory Name Data
  19.           o ZFNAME  -- Named Directory File Name Scanner
  20.  
  21. :Initialize Named Directory FCB
  22.  
  23.      Routine Name:  ZFNINIT
  24.      Function║
  25.           ZFNINI╘á allow≤ thσ use≥ t∩ initializσ thσ namσ oµá thσ ì
  26. nameΣá director∙á filσ (defaul⌠ namσ oµ NAMES.DIR⌐ t∩ somσá othe≥ ì
  27. namσá anΣ t∩ changσ thσ numbe≥ oµ name≤ permitteΣ iε ßá director∙ ì
  28. filσ (defaul⌠ oµ 64)«á  I⌠ i≤ als∩ useΣ t∩ definσ wherσ iε memor∙ ì
  29. the ZCPR2 disk names buffer resides.
  30.  
  31.      Inputs:  DE pts to FCB containing the new file name
  32.               HL contains the address of the memory-resident
  33.                     disk names buffer
  34.               C is the new maximum number of directory names
  35.               A is a flag indicating values to set as follows:
  36.                     Bit 7 -- Set to 1 to load default FCB fm DE
  37.                     Bit 6 -- Set to 1 to load name count fm C
  38.                     Bi⌠ ╡ -- Se⌠ t∩ ▒ t∩ loaΣ buµ addres≤ fφ HL
  39.  
  40.      Outputs:  None
  41.      Registers Affected:  None
  42.      SYSLIB Routines Called:  MOVEB
  43.      Specia∞á Erro≥ Conditions║  None
  44.  
  45.      Note║áá  Iµá thi≤á routinσá i≤á no⌠á called¼á thσá followinτ ì
  46. assumptions are made:
  47.           o Name of Directory Names File -- NAMES.DIR
  48.           o Max Number of Directory Names -- 64
  49.           o No Memory-Resident Names Buffer Exists
  50.  
  51. :Status Return
  52.  
  53.      Routine Name:  ZCPRQ2
  54.      Function:
  55.           Return≤á ß pointe≥ iε H╠ t∩ thσ firs⌠ bytσ oµ thσ ZCPR▓ ì
  56. buffe≥á areß iε thσ 2nΣ ZCPR▓ modulσ iε SYSLIB«á  Thi≤ buffe≥á i≤ ì
  57. structured as follows:
  58.                Byte 0:  Max Number of Directory Names
  59.                Bytes 1-2:  Address of Memory-Resident Names
  60.                     Buffer or 0000H if none exists
  61.                Bytes 3-38:  FCB of Directory Names File
  62.  
  63.      Inputs:  None
  64.      Outputs:  HL pts to Byte 0 as described above
  65.      Registers Affected:  HL 
  66.      SYSLIB Routines Called:  None
  67.      Special Error Conditions:  None
  68.  
  69. :Directory Name File Loader
  70.  
  71.      Routine Name:  ZDNAME
  72.      Function:
  73.           ZDNAM┼á load≤ thσ content≤ oµ thσ NAMES.DI╥á filσá int∩ ì
  74. thσ memor∙ buffe≥ pointeΣ t∩ b∙ HL«  EacΦ entr∙ iε thi≤ buffe≥ i≤ ì
  75. structured as follows:
  76.                Byte 0:  Disk Number (A=0)
  77.                Byte 1:  User Number
  78.                Bytes 2-9:  Directory Name, 8 Chars Max, Space
  79.                     Fill at End
  80.  
  81.      Inputs:  HL pts to the memory buffer extending to the base
  82.                of the BDOS
  83.  
  84.      Outputs:  HL pts to the first entry in the buffer
  85.                C is the number of valid entries, B=0
  86.                A is the error flag (A=0 and Z if error)
  87.  
  88.  
  89.      Registers Affected:  HL, BC, PSW
  90.  
  91.      SYSLIB Routines Called:  INITFCB, ZPFIND, FI3$OPEN, F3$GET
  92.  
  93.      Specia∞á Erro≥á Conditions║á  A=░á ma∙á meaεá eithe≥á memor∙ ì
  94. overflow or NAMES.DIR not found.
  95.  
  96.  
  97. :DIR: Prefix Evaluator
  98.  
  99.      Routine Name:  ZDNFIND
  100.      Function║
  101.           ZDNFIN─ examine≤ thσ DIR║á prefi° fo≥ eithe≥ ß DU║ forφ ì
  102. o≥ ß director∙ name«  Iµ i⌠ i≤ determineΣ tha⌠ thσ DIR║ prefi° i≤ ì
  103. no⌠ oµ thσ DU║á form¼á theε thσ memory-residen⌠ name≤ buffer¼á iµ ì
  104. any¼á i≤ scanneΣ fo≥ thσ name¼ and¼ iµ n∩ sucΦ buffe≥ o≥ namσ no⌠ ì
  105. found¼ thσ NAMES.DI╥ filσ i≤ sough⌠ alonτ thσ ZCPR▓ path¼ loaded¼ ì
  106. anΣ scanneΣ fo≥ ß correspondinτ name«á  Iµ found¼ thσ correspond-ì
  107. inτá use≥ anΣ disδ value≤ arσ returned╗á iµ no⌠ found¼á aεá erro≥ ì
  108. codσ i≤ returned.
  109.  
  110.      Inputs:  HL pts to first byte of DIR: prefix
  111.               A=░ iµ DU║ forφ NO╘ allowed
  112.  
  113.      Outputs:  B=Disk (B=1 if Disk A, B=0FFH if Current Disk),
  114.                C=User (C=0FFH if Current User), HL pts to colon,
  115.                Zer∩ Flaτ Clea≥ (NZ⌐ iµ n∩ error╗ Zer∩ Flaτ Se⌠ 
  116.                (Z) if error, and no valid values returned
  117.  
  118.  
  119.      Registers Affected:  BC, HL, PSW
  120.  
  121.      SYSLIB Routines Called:  INITFCB, ZPFIND, FI3$OPEN,
  122.                               FI3$CLOSE, F3$GET
  123.  
  124.      Specia∞ Erro≥ Conditions║  Notσ tha⌠ ZDNFIN─ use≤ Inpu⌠ Filσ ì
  125. 3¼á s∩á Inpu⌠á Filσ │ shoulΣ no⌠ bσ openeΣ wheε thi≤á routinσá i≤ ì
  126. called«á  Also¼á ZPFIN─ i≤ used¼ s∩ thσ programme≥ mus⌠ bσ surσ ß ì
  127. proper external path is specified if needed by calling ZINIEXT.
  128.  
  129. :Extended File Name Scanner
  130.  
  131.      Routine Name:  ZFNAME
  132.      Function║
  133.           ZFNAM┼á i≤ ß filσ namσ scanner«á  Pointinτ t∩ thσ firs⌠ ì
  134. characte≥áá oµáá ßáá filσá namσáá specificatioεáá oµáá thσáá forφ ì
  135. 'DIR:FILENAME.TYP'¼á wherσá an∙á par⌠á oµ thi≤á specificatioεá i≤ ì
  136. optional¼á thi≤á routinσ fill≤ iε aε FC┬á witΦá zeroes¼á properl∙ ì
  137. initialize≤á thσá F╬ anΣ F╘ (Filσ Namσ anΣ Filσ Type⌐á field≤á iµ ì
  138. 'FILENAME.TYPºá o≥ an∙ par⌠ thereoµ i≤ present¼á anΣ return≤á thσ ì
  139. valuσ oµ disδ anΣ use≥ iµ the∙ arσ specifieΣ (o≥ 0FF╚ iµ not).
  140.  
  141.      Thσ director∙ indicato≥ 'DIR:'¼á iµ specified¼ ma∙ bσ oµ onσ ì
  142. of four forms:
  143.           DIRECT: -- A named directory, of up to 8 chars long
  144.           d:      -- A disk drive letter
  145.           u:      -- A user number
  146.           du:     -- A disk drive letter and a user number
  147.  
  148.      Thσ du║á forφ i≤ checkeΣ first¼ s∩ unnecessar∙ disδ activit∙ ì
  149. in looking for the NAMES.DIR file is avoided.
  150.  
  151.      Examples of valid input strings:
  152.           HELP:*.HLP     A5:TEST.TXT    C?:ABC.*  PASCAL:*.COM
  153.  
  154.      Inputs:  DE pts to FCB to fill, HL pts to first byte of
  155.                targe⌠ string; FCB is 36 bytes long
  156.  
  157.      Outputs:  B=Disk (B=1 for Disk A), C=User
  158.                B=0FFH if no disk specified (current disk)
  159.                C=0FFH if no user specified (current user)
  160.                C=? if all user areas specified
  161.                HL pts to terminating character
  162.                A=0 and Zero Flag Set (Z) if error in disk
  163.                     or user numbers; A=0FFH and NZ if no error
  164.  
  165.      Registers Affected:  BC, HL, PSW
  166.  
  167.  
  168.      SYSLIB Routines Called:  ZDNFIND
  169.  
  170.      Specia∞áá Erro≥áá Conditions║áá  Seσáá FNAM┼áá routinσáá fo≥ ì
  171. similarities
  172.  
  173.