From: Martin Str|mberg Message-Id: <200104151316.PAA07985@mother.ludd.luth.se> Subject: _creatnew() failing To: djgpp-workers AT delorie DOT com (DJGPP-WORKERS) Date: Sun, 15 Apr 2001 15:16:17 +0200 (MEST) X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com It has been hammered into me that unsupported INT21 functions do not set the carry flag and only set AL to 0. Well, if that is so _creatnew() is broken: int _creatnew(const char* filename, int attrib, int flags) { ... if (_osmajor > 3) r.x.ax = 0x6c00; else { r.h.ah = 0x5b; r.x.bx = 0; /* lose support for fancy flags in DOS 3.x */ r.x.dx = __tb_offset; r.x.si = 0; } } r.x.cx = attrib & 0xffff; r.x.ds = __tb_segment; __dpmi_int(0x21, &r); if(r.x.flags & 1) { errno = __doserr_to_errno(r.x.ax); return -1; } ... FreeDOS claims to be DOZE 5.0 but it does not support INT21, AX=0x6c00. So this _creatnew() happily thinks is has successfully opened/created the file in question. On the other hand it could be argued that a DOZE of version 5.0 must support INT21, AX=0x6c00... Right, MartinS