Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cuae2!ihnp4!inuxc!pur-ee!uiucdcs!uiucdcsm!krause From: krause@uiucdcsm.UUCP Newsgroups: comp.sys.ibm.pc Subject: Re: Truncating MS-DOS files Message-ID: <8000001@uiucdcsm> Date: Wed, 18-Feb-87 18:50:00 EST Article-I.D.: uiucdcsm.8000001 Posted: Wed Feb 18 18:50:00 1987 Date-Received: Fri, 20-Feb-87 22:36:30 EST References: <123004@<1987Feb15> Lines: 33 Nf-ID: #R:<1987Feb15:123004:uiucdcsm:8000001:000:1479 Nf-From: uiucdcsm.cs.uiuc.edu!krause Feb 18 17:50:00 1987 > Well, quite some time ago I also heard that CX=0 on a write would truncate > the file. When I became curious about it recently, I looked in the IBM > PC-DOS Technical reference manuals for DOS 2.1 and 3.0 (the only ones I > had available). I looked in the function documentation distributed to > OEM's by Microsoft for MS-DOS 2.0. I also looked in the book > "Advanced MS-DOS" by Ray Duncan. > > None of these sources mentioned a thing about CX=0 being a legal value or > not, much less saying that it allows you to truncate a file. > ... > Perhaps you could give us some clue about WHERE you saw it stated, instead > of simply yelling at us for being so ignorant as to overlook the > documentation. Thanks for your time. > -- > Roy J. Mongiovi > ...!{akgua, allegra, amd, hplabs, ihnp4, masscomp, ut-ngp}!gatech!gitpyr!roy I checked two of the three sources mentioned and found the CX=0 behavior documented (Advanced MS-DOS, p. 320, and IBM DOS Tech. Ref. Ver. 2.10, p. 5-28) under function call 28H, as specified in the posting to which you are referring. I didn't check the DOS 3.0 manual because I don't have one. Perhaps you could give us some clue about WHERE you looked?? :-) What I would like to know is, does this work with the handle file calls? (i.e. function call 40H, Write to file or device, after a lseek) James Krause krause@uicsrd.CSRD.UIUC.EDU P.S. It took me a while to realize what "RTFM" meant and then I, too, was offended a bit....