home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_144 / 5.ddi / CLIBSRC2.ZIP / GETVERF.CAS < prev    next >
Encoding:
Text File  |  1992-06-10  |  2.2 KB  |  76 lines

  1. /*---------------------------------------------------------------------------
  2.  * filename - getverf.cas
  3.  *
  4.  * function(s)
  5.  *        getverify - gets verify state
  6.  *        setverify - sets verify state
  7.  *--------------------------------------------------------------------------*/
  8.  
  9. /*
  10.  *      C/C++ Run Time Library - Version 5.0
  11.  *
  12.  *      Copyright (c) 1987, 1992 by Borland International
  13.  *      All Rights Reserved.
  14.  *
  15.  */
  16.  
  17.  
  18. #pragma inline
  19. #include <dos.h>
  20.  
  21. /*--------------------------------------------------------------------------*
  22.  
  23. Name            getverify - gets verify state
  24.  
  25. Usage           int getverify(void);
  26.  
  27. Prototype in    dos.h
  28.  
  29. Description     getverify gets the current state of the verify flag.
  30.  
  31.                 The verify flag controls output to the disk. When verify is
  32.                 off, writes are not verified; when verify is on, all disk
  33.                 writes are verified to insure proper writing of the data.
  34.  
  35. Return value    getverify returns the current state of the verify
  36.                 flag, either 0 or 1.
  37.  
  38.                         A return of     0       =       verify flag off.
  39.                         A return of     1       =       verify flag on.
  40.  
  41. *---------------------------------------------------------------------------*/
  42. int getverify(void)
  43. {
  44. asm     mov     ax, 05400h
  45. asm     cwd
  46. asm     int     021h
  47. asm     cbw
  48.         return _AX;
  49. }
  50.  
  51.  
  52. /*--------------------------------------------------------------------------*
  53.  
  54. Name            setverify - sets verify state
  55.  
  56. Usage           void setverify(int value);
  57.  
  58. Prototype in    dos.h
  59.  
  60. Description     setverify sets the current state of the verify flag to value.
  61.  
  62.                         A value of      0       =       verify flag off.
  63.                         A value of      1       =       verify flag on.
  64.  
  65.                 The verify flag controls output to the disk. When verify is
  66.                 off, writes are not verified; when verify is on, all disk
  67.                 writes are verified to insure proper writing of the data.
  68.  
  69. *---------------------------------------------------------------------------*/
  70. void setverify(int value)
  71. {
  72. asm     mov     ah, 02Eh
  73. asm     mov     al, value
  74. asm     int     021h
  75. }
  76.