home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / progc / fixed300.arj / LIB04.C < prev    next >
Encoding:
C/C++ Source or Header  |  1991-04-28  |  698 b   |  26 lines

  1. #if 0
  2. From: Miles Bradley <miles@zortech.com>
  3. Subject: Reported bug in io.asm
  4. Date: Thu, 18 Apr 91 10:14:34 EDT
  5. Status: Fixed in 3.0
  6. #endif
  7.  
  8. opens:
  9. // Shared mode file opening fixup
  10. // Replace line way below with three below - Taken from gotfile below
  11.     mov    AL,-2[BP]        ;AL = rwmode (0,1,2)
  12.     and    AL,0F3h            ;clear reserved bits
  13.     mov    AH,3Dh            ;open file
  14.     
  15. //    mov    AX,3D00h        ;see if file exists
  16.     call    _bdos
  17.     jc    nofile            ;maybe doesn't exist
  18.     mov    BX,AX            ;opened file checking existance,
  19.     bdos    3Eh            ; now close it
  20.     mov    BX,-2[BP]        ;check for O_EXCL && O_CREAT
  21.     and    BX,O_EXCL+O_CREAT
  22.     cmp    BX,O_EXCL+O_CREAT
  23.     jne    gotfile            ;all's OK - continue
  24.     mov    AX,EEXIST        ;return EEXIST error
  25.  
  26.