home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / jsage / znode3 / z3lib / libhl45a.lbr / DSLIB.LBR / DSLIB2.HZP / DSLIB2.HLP
Encoding:
Text File  |  1993-06-07  |  2.9 KB  |  76 lines

  1. :OPENTD - Open DateStamper(tm) Time & Date file for Read/Write
  2.  
  3.   ENTER: A = 0 for Read, A = 0FFH for Write
  4.   EXIT : A <> 0, Zero Flag Clear (NZ) if OK
  5.        A = 0, Zero Flag Set (Z) if Open Error
  6.   USES : AF,BC,DE,HL
  7.   REQUIREMENTS: You must select the drive before calling
  8.  
  9.  Usage: This DateStamper-specific routine is used to access
  10.   large numbers of stamps, or where performance penalties in
  11.   per-file stamp accesses are undesireable.  This routine Opens
  12.   the TIME&DAT file in User 0 on the current drive.  If opened
  13.   for writing, the R/O attribute is cleared.  The User Number
  14.   is restored on exit.
  15.  
  16. CLOSTD - Close DateStamper(tm) Time & Date file
  17.  
  18.   ENTER: None
  19.   EXIT : A <> 0, Zero Flag Clear (NZ) if OK
  20.        A = 0, Zero flag Set (Z) if Error
  21.   USES : AF,BC,DE,HL
  22.  
  23.  Usage: This DateStamper-specific routine closes the TIME&DAT
  24.   file in user 0 of current drive, and sets the R/O bit.  It is
  25.   used in conjunction with OPENTD above.
  26.  
  27. FSTNXT - File search returning DateStamper(tm) Indices
  28.  
  29.   ENTER:  C - Search First (17) or Search Next (18) DOS command
  30.      DE - Points to FCB containg the target Filename.type
  31.   EXIT :  A = Dir Index (0..3), Carry Flag Clear (NC) If Found
  32.         A indeterminate, Carry Flag Set (C) If NOT Found
  33.      DE - Contains random Sector number in !!!TIME&.DAT
  34.       B - Index into T&D sector (0..7)
  35.   USES : AF,BC,DE,HL
  36.   REQUIREMENTS: User must log Drive and User before calling
  37.  
  38.  Usage: This routine is used in DateStamper-specific systems to
  39.   perform File searches and return indices into the Time & Date
  40.   file.  Use this call for Function 17 and 18 Search calls in
  41.   lieu of a direct call to the BDOS vector at location 5.
  42.  
  43. Example:
  44.     EXT    FSTNXT        ; Declare the routine
  45.     ...            ; Log Drive/User & Set FCB
  46.     LD    C,17        ; Set for Search First command
  47.     LD    DE,FCB        ; ..addr FCB for desired name
  48.     CALL    FSTNXT        ; Search for the desired file
  49.     JR    NC,FOUND    ; ..jump if file found
  50.     ...            ; Else do not found things
  51.  
  52. RWTD - Read or write to Time & Date file on current drive.
  53.  
  54.   ENTER:  A = 0 to Read, A = 0FFH to Write
  55.      DE - Contains Random Record to Read or Write
  56.   EXIT : HL - Addresses the start of T&D sector Read/Written
  57.       A <> 0, Zero Flag Clear (NZ) if OK
  58.         A = 0, Zero Flag Set (Z) if Error
  59.   USES : AF,BC,DE,HL and BDOS DMA Address
  60.  
  61.  Usage: DateStamper(tm)-specific routine normally used only for
  62.   Directory list, Catalog or Archive programs where access to
  63.   blocks of Date Stamps is desired.
  64.   NOTE: You must reset DMA address after call if needed.
  65.  
  66. Example:
  67.     EXT    RWTD        ; Declare the routine
  68.     ...            ; Log drive, Set DMA addr
  69.     LD    DE,(RECNUM)    ; Get T&D Rec # from FSTNXT or
  70.                 ; ..specified Random rec number
  71.     LD    A,MODE        ; A=0 for read, A=FF for write
  72.     CALL    RWTD        ; Perform the action
  73.     JR    NZ,RWOK        ; ..jump if OK
  74.     ...            ; Else perform error activity
  75.  RWOK:    ...            ; Sector has been read/written
  76.