Article View: comp.sys.ibm.pc
Article #15606Re: Major bug in all(?) versions of MS-DOS.
From: rap
Date: Sat, 07 Feb 1987 20:23
Date: Sat, 07 Feb 1987 20:23
33 lines
1564 bytes
1564 bytes
In article <4274@utah-cs.UUCP> b-davis@utah-cs.UUCP (Brad Davis) writes:
>; POINT A
|; If these three lines are included then all works well.
|; mov bx, fd1
|; mov ah, 3eh
|; int 21h
| ; open the file a second time
| ; fd2 = open("xxx", O_RDWR | O_BINARY, 0);
| mov dx, offset xxx
| mov al, 2
| mov ah, 3dh
| int 21h
| mov fd2, ax
|; POINT B
|; If these three lines are included then the read still fails.
|; mov bx, fd1
|; mov ah, 3eh
|; int 21h
| ; read the data from the second file
Not a bug. You just didn't account for DOS buffers. The
file may be writen to at POINT A, but the disk isn't. When
you issue the function 3eh call at POINT A the buffers are
flushed and the file closed. When the buffers are flushed
is when the disk gets writen.
I think that if you look at your example now you can see why
POINT A behaves differently from POINT B.
--
Robert A. Pease
{hplabs|fortune|idi|ihnp4|tolerant|allegra|glacier|olhqma}!oliveb!olivej!rap
Technical Details
Message-ID:
<495@oliveb.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!ames!oliveb!rapReferences:
<4274@utah-cs.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!ames!oliveb!rap From: rap@oliveb.UUCP Newsgroups: comp.sys.ibm.pc Subject: Re: Major bug in all(?) versions of MS-DOS. Message-ID: <495@oliveb.UUCP> Date: Sat, 7-Feb-87 15:23:34 EST Article-I.D.: oliveb.495 Posted: Sat Feb 7 15:23:34 1987 Date-Received: Sun, 8-Feb-87 07:47:36 EST References: <4274@utah-cs.UUCP> Reply-To: rap@olivej.UUCP (Robert A. Pease) Organization: Olivetti ATC; Cupertino, Ca Lines: 33 Keywords: bug Summary: No bug, just buffered.