Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!softart!ashok From: ashok@softart.UUCP Newsgroups: comp.sys.ibm.pc Subject: Re: Truncating MS-DOS files Message-ID: <24@softart.UUCP> Date: Mon, 16-Feb-87 20:45:14 EST Article-I.D.: softart.24 Posted: Mon Feb 16 20:45:14 1987 Date-Received: Tue, 17-Feb-87 19:17:55 EST References: <1987Feb15.123004.21019@gpu.utcs.toronto.edu> Organization: Softart Microsystems Inc., Waterloo Ont. Canada Lines: 11 > There is a truncate procedure in Turbo Pascal, so there must be a way > of doing it--but how do I do it in an ASM program using INT 21H? The way to do it is to issue the Int 21H write data call with the byte count set to zero bytes (ie write zero bytes) AFTER you have done the lseek call. This will truncate the file for you. NOT documented in every DOS Tech. Ref. Manual I came across but it is documented in the Norton book. ------------------------------ Ashok C. Patel Softart Microsystems Inc.