home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c065 / 2.ddi / CLIB2.ZIP / SETFTIME.CAS < prev    next >
Encoding:
Text File  |  1990-06-07  |  1.5 KB  |  49 lines

  1. /*-----------------------------------------------------------------------*
  2.  * filename - setftime.cas
  3.  *
  4.  * function(s)
  5.  *        setftime - gets file date and time
  6.  *-----------------------------------------------------------------------*/
  7.  
  8. /*[]------------------------------------------------------------[]*/
  9. /*|                                                              |*/
  10. /*|     Turbo C Run Time Library - Version 3.0                   |*/
  11. /*|                                                              |*/
  12. /*|                                                              |*/
  13. /*|     Copyright (c) 1987,1988,1990 by Borland International    |*/
  14. /*|     All Rights Reserved.                                     |*/
  15. /*|                                                              |*/
  16. /*[]------------------------------------------------------------[]*/
  17.  
  18. #pragma inline
  19. #include <asmrules.h>
  20. #include <io.h>
  21. #include <_io.h>
  22.  
  23. /*-----------------------------------------------------------------------*
  24.  
  25. Name            setftime - gets file date and time
  26.  
  27. Usage           #include <io.h>
  28.                 int setftime(int handle, struct ftime *ftimep);
  29.  
  30. Prototype in    io.h
  31.  
  32. Description     see getftime
  33.  
  34. *------------------------------------------------------------------------*/
  35. int setftime(int handle, struct ftime *ftimep)
  36. {
  37. asm    mov    ax, 05701h
  38. asm    mov    bx, handle
  39. asm    LES_    di, ftimep
  40. asm    mov    cx, ES_[di]
  41. asm    mov    dx, ES_[di+2]
  42. asm    int    021h
  43. asm    jc    setftimeFailed
  44.     return (0);
  45.  
  46. setftimeFailed:
  47.     return __IOerror (_AX);
  48. }
  49.