home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / ZCPR33 / S-Z / SLB36HLP.LBR / SYSLIB9.HZP / SYSLIB9.HLP
Text File  |  2000-06-30  |  3KB  |  93 lines

  1. FNAME   -- File Name String Parser
  2. INITFCB -- FCB Initialization
  3. SETDMA  -- Set DMA Address
  4. :File Name String Parser (FNAME)
  5.      Routine: FNAME
  6.  
  7.      Function:
  8.      FNAM┼á i≤ ß filσ namσ scanner«á  Pointinτ t∩ thσá firs⌠ ì
  9. characte≥ oµ ß filσ namσ specificatioε oµ thσ form:
  10.  
  11. ááááá          du:filename.typ
  12.  
  13. wherσá an∙á par⌠á oµ thσá specificatioεá i≤á optional¼á thi≤ ì
  14. routinσá fill≤ iε aε FC┬ witΦ zeroe≤á (3╢á bytes)¼á properl∙ ì
  15. initialize≤á thσá F╬á (Filσá Name⌐ fielΣá iµá 'filenameºá i≤ ì
  16. presen⌠á anΣ F╘ (Filσ Type⌐ fielΣ iµ 'typº i≤á present¼á anΣ ì
  17. return≤ thσ numbe≥ oµ thσ selecteΣ disδ (iε thσ rangσ froφ ▒ ì
  18. fo≥á ┴ t∩ 1╢ fo≥ P⌐ iµ 'dº i≤ presen⌠ anΣ thσ numbe≥ oµá thσ ì
  19. selecteΣá use≥ (iε thσ rangσ froφ ░ t∩ 3▒ anΣá thσá questioε ì
  20. marδá '?ºá character⌐á iµ 'uº i≤ present«á  Iµá 'dºá i≤á no⌠ ì
  21. present¼á 0FF╚á i≤ returneΣ fo≥ i⌠ t∩ indicatσ curren⌠ disk¼ ì
  22. anΣá iµá 'uºá i≤ no⌠ present¼á 0FF╚ i≤ returneΣá fo≥á i⌠á t∩ ì
  23. indicatσ curren⌠ user.
  24.  
  25. FNAME
  26.      Thσá strinτá pointeΣá t∩ b∙ H╠ i≤á no⌠á ßá conventiona∞ ì
  27. strinτá iεá thσ sensσ oµ thσ res⌠ oµá thσá SYSLI┬á routines«  ì
  28. Thi≤ strinτ i≤ terminateΣ b∙ an∙ oµ thσ followinτ delims¼ a≤ ì
  29. opposeΣá b∙ simpl∙ alway≤ beinτ terminateΣ b∙ ß binar∙ zero«  ì
  30. Thσ delimite≥ lis⌠ is:
  31.  
  32. ááááá          <NULL or Binary 0>       <SP or Space>
  33. ááááá          =    _    ;    ,    <    >
  34.  
  35.      Thσ followinτ arσ valiΣ examples:
  36. ááááá          test.txt   <-- FN=TEXT  FT=TXT, B reg = 0FFH,
  37. ááááá                         C reg = 0FFH
  38. ááááá          a:t        <-- FN=T  FT=<SP>, B reg = 1,
  39. ááááá                         C reg = 0FFH
  40. ááááá          5:t        <-- FN=T  FT=<SP>, B reg = 0FFH,
  41. ááááá                         C reg = 5
  42. ááááá          c10:x.y    <-- FN=X  FT=Y, B reg = 3,
  43. ááááá                         C reg = 10
  44.  
  45. FNAME
  46.      Inputs:  HL points to the first byte of the target string
  47. ááááá               (which ends in a delimiter)
  48. ááááá         DE pts to the first byte of a 36-byte long FCB
  49.  
  50.      Outputs:  B=Disk Number (1 for A to 16 for P, or 0FFH if
  51. ááááá               no disk specified)
  52. ááááá          C=User Number (0 to 31 or '?' for all users, or
  53. ááááá               0FFH if no user specified)
  54. ááááá          HL points to the character which ended the scan
  55. ááááá          A = 0 and Zero Flag Set (Z) if invalid Disk or User
  56. ááááá               Specified; A = 0FFH and NZ if no error
  57.  
  58.      Registers Affected: PSW, BC, HL
  59.  
  60.      SYSLIB Routines Called:  CAPS
  61.  
  62.      Special Error Conditions:  None
  63.  
  64. :FCB Initialization
  65.      Routine:  INITFCB
  66.  
  67.      Function║
  68.      INITFC┬á simpl∙ clear≤ al∞ oµ thσ field≤ oµá ßá 36-bytσ ì
  69. FC┬á t∩á zer∩ excep⌠ fo≥ thσ F╬ anΣ F╘ (Filσ Namσá anΣá Filσ ì
  70. Type⌐ fields¼ whicΦ i⌠ leave≤ untouched.
  71.  
  72.      Inputs:  DE = pointer to FCB buffer
  73.      Outputs:  None
  74.  
  75.      Registers Affected:  None
  76.      SYSLIB Routines Called:  FILLB
  77.      Special Error Conditions:  None
  78.  
  79. :Set DMA Address
  80.  
  81.      Routine: SETDMA
  82.  
  83.      Function║
  84.      SETDM┴ set≤ thσ DM┴ addres≤ t∩ thσ 128-bytσ blocδ whosσ ì
  85. address is contained in HL.
  86.  
  87.      Inputs: HL = Address of 128-byte block
  88.      Outputs: None
  89.  
  90.      Registers Affected: None
  91.      SYSLIB Routines Called: None
  92.      Specia∞áErro≥ Conditions║ None
  93.