home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / c / library / bcfamily / source / doswrite.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-12  |  740 b   |  34 lines

  1. //
  2. //      *******************************************************************
  3. //        JdeBP C++ Library Routines          General Public Licence v1.00
  4. //            Copyright (c) 1991,1992     Jonathan de Boyne Pollard
  5. //      *******************************************************************
  6. //
  7. // Part of FamAPI.LIB
  8. //
  9.  
  10. #include "famapi.h"
  11. #include "dosdos.h"
  12.  
  13. //
  14. //    Write data to a file
  15. //
  16. USHORT _APICALL
  17. DosDosWrite    ( unsigned short fd,
  18.               const void far *base,
  19.               unsigned short bufsize,
  20.               unsigned short far *done)
  21. {
  22.     asm push ds ;
  23.     _DS = FP_SEG(base) ;
  24.     _DX = FP_OFF(base) ;
  25.     _CX = bufsize ;
  26.     _BX = fd ;
  27.     _AH = 0x40 ;
  28.     Dos3Call() ;
  29.     asm pop ds ;
  30.     if (_FLAGS & 0x0001) return _AX ;
  31.     *done = _AX ;
  32.     return NO_ERROR ;
  33. }
  34.