home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_122 / 1.ddi / CLIBSRC.ZIP / SETFTIME.CAS < prev    next >
Encoding:
Text File  |  1992-06-10  |  1.1 KB  |  48 lines

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