home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / simtel / sigm / vols000 / vol089 / syslib8.hlp < prev    next >
Text File  |  1985-02-09  |  5KB  |  140 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.      Four routines are included in this set:
  15.           o ZFNINIT -- Initialize Named Directory Buffers
  16.           o ZDNFIND -- Scan for Disk Directory Name
  17.           o ZDNAME  -- Load All Disk Directory Name Data
  18.           o ZFNAME  -- Named Directory File Name Scanner
  19.  
  20. :Initialize Named Directory FCB
  21.  
  22.      Routine Name:  ZFNINIT
  23.      Function║
  24.           ZFNINI╘á allow≤ thσ use≥ t∩ initializσ thσ namσ oµá thσ ì
  25. nameΣá director∙á filσ (defaul⌠ namσ oµ NAMES.DIR⌐ t∩ somσá othe≥ ì
  26. namσá anΣ t∩ changσ thσ numbe≥ oµ name≤ permitteΣ iε ßá director∙ ì
  27. file (default of 64).
  28.  
  29.      Inputs:  DE pts to FCB containing the new file name
  30.               C is the new maximum number of directory names
  31.               A is a flag indicating values to set as follows:
  32.                     Bit 7 -- Set to 1 to load default FCB fm DE
  33.                     Bit 6 -- Set to 1 to load name count fm C
  34.  
  35.      Outputs:  None
  36.      Registers Affected:  None
  37.      SYSLIB Routines Called:  MOVEB
  38.      Specia∞á Erro≥ Conditions║  None
  39.  
  40. :Directory Name File Loader
  41.  
  42.      Routine Name:  ZDNAME
  43.      Function:
  44.           ZDNAM┼á load≤ thσ content≤ oµ thσ NAMES.DI╥á filσá int∩ ì
  45. thσ memor∙ buffe≥ pointeΣ t∩ b∙ HL«  EacΦ entr∙ iε thi≤ buffe≥ i≤ ì
  46. structured as follows:
  47.                Byte 0:  Disk Number (A=0)
  48.                Byte 1:  User Number
  49.                Bytes 2-9:  Directory Name, 8 Chars Max, Space
  50.                     Fill at End
  51.  
  52.      Inputs:  HL pts to the memory buffer extending to the base
  53.                of the BDOS
  54.  
  55.      Outputs:  HL pts to the first entry in the bufferè               C is the number of valid entries, B=0
  56.                A is the error flag (A=0 and Z if error)
  57.  
  58.  
  59.      Registers Affected:  HL, BC, PSW
  60.  
  61.      SYSLIB Routines Called:  INITFCB, ZPFIND, FI3$OPEN, F3$GET
  62.  
  63.      Special Error Conditions:  None
  64.  
  65.  
  66. :DIR: Prefix Evaluator
  67.  
  68.      Routine Name:  ZDNFIND
  69.      Function║
  70.           ZDNFIN─ examine≤ thσ DIR║á prefi° fo≥ eithe≥ ß DU║ forφ ì
  71. o≥ ß director∙ name«  Iµ i⌠ i≤ determineΣ tha⌠ thσ DIR║ prefi° i≤ ì
  72. no⌠ oµ thσ DU║á form¼ theε thσ NAMES.DI╥ filσ i≤ sough⌠ alonτ thσ ì
  73. ZCPR▓á path¼á loaded¼á anΣ scanneΣ fo≥ ß correspondinτ name«á  Iµ ì
  74. found¼á thσ correspondinτ use≥ anΣ disδ value≤ arσá returned╗á iµ ì
  75. not found, an error code is returned.
  76.  
  77.      Inputs:  HL pts to first byte of DIR: prefix
  78.               A=░ iµ DU║ forφ NO╘ allowed
  79.  
  80.      Outputs:  B=Disk (B=1 if Disk A, B=0FFH if Current Disk),
  81.                C=User (C=0FFH if Current User), HL pts to colon,
  82.                Zer∩ Flaτ Clea≥ (NZ⌐ iµ n∩ error╗ Zer∩ Flaτ Se⌠ 
  83.                (Z) if error, and no valid values returned
  84.  
  85.  
  86.      Registers Affected:  BC, HL, PSW
  87.  
  88.      SYSLIB Routines Called:  INITFCB, ZPFIND, FI3$OPEN,
  89.                               FI3$CLOSE, F3$GET
  90.  
  91.      Specia∞ Erro≥ Conditions║  Notσ tha⌠ ZDNFIN─ use≤ Inpu⌠ Filσ ì
  92. 3¼á s∩á Inpu⌠á Filσ │ shoulΣ no⌠ bσ openeΣ wheε thi≤á routinσá i≤ ì
  93. called«á  Also¼á ZPFIN─ i≤ used¼ s∩ thσ programme≥ mus⌠ bσ surσ ß ì
  94. proper external path is specified if needed by calling ZINIEXT.
  95.  
  96. :Extended File Name Scanner
  97.  
  98.      Routine Name:  ZFNAME
  99.      Function║
  100.           ZFNAM┼á i≤ ß filσ namσ scanner«á  Pointinτ t∩ thσ firs⌠ ì
  101. characte≥áá oµáá ßáá filσá namσáá specificatioεáá oµáá thσáá forφ ì
  102. 'DIR:FILENAME.TYP'¼á wherσá an∙á par⌠á oµ thi≤á specificatioεá i≤ ì
  103. optional¼á thi≤á routinσ fill≤ iε aε FC┬á witΦá zeroes¼á properl∙ ì
  104. initialize≤á thσá F╬ anΣ F╘ (Filσ Namσ anΣ Filσ Type⌐á field≤á iµ ì
  105. 'FILENAME.TYPºá o≥ an∙ par⌠ thereoµ i≤ present¼á anΣ return≤á thσ ì
  106. valuσ oµ disδ anΣ use≥ iµ the∙ arσ specifieΣ (o≥ 0FF╚ iµ not).
  107.  
  108.      Thσ director∙ indicato≥ 'DIR:'¼á iµ specified¼ ma∙ bσ oµ onσ ì
  109. of four forms:
  110.           DIRECT: -- A named directory, of up to 8 chars long
  111.           d:      -- A disk drive letter
  112.           u:      -- A user number
  113.           du:     -- A disk drive letter and a user number
  114.  
  115.      Thσ du║á forφ i≤ checkeΣ first¼ s∩ unnecessar∙ disδ activit∙ ì
  116. in looking for the NAMES.DIR file is avoided.
  117.  
  118.      Examples of valid input strings:
  119.           HELP:*.HLP     A5:TEST.TXT    C?:ABC.*  PASCAL:*.COM
  120.  
  121.      Inputs:  DE pts to FCB to fill, HL pts to first byte of
  122.                targe⌠ string; FCB is 36 bytes long
  123.  
  124.      Outputs:  B=Disk (B=1 for Disk A), C=User
  125.                B=0FFH if no disk specified (current disk)
  126.                C=0FFH if no user specified (current user)
  127.                C=? if all user areas specified
  128.                HL pts to terminating character
  129.                A=0 and Zero Flag Set (Z) if error in disk
  130.                     or user numbers; A=0FFH and NZ if no error
  131.  
  132.      Registers Affected:  BC, HL, PSW
  133.  
  134.  
  135.      SYSLIB Routines Called:  ZDNFIND
  136.  
  137.      Specia∞áá Erro≥áá Conditions║áá  Seσáá FNAM┼áá routinσáá fo≥ ì
  138. similarities
  139.  
  140.