Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!mit-eddie!interlan!backman From: backman@interlan.UUCP (Larry Backman) Newsgroups: comp.sys.ibm.pc Subject: Re: DOS Function 42h (int 21h) Message-ID: <124@interlan.UUCP> Date: Mon, 16-Mar-87 09:10:04 EST Article-I.D.: interlan.124 Posted: Mon Mar 16 09:10:04 1987 Date-Received: Tue, 17-Mar-87 01:40:41 EST References: <1262@sphinx.UChicago.UUCP> Reply-To: backman@interlan.UUCP (1014-Larry Backman) Organization: MICOM-Interlan, Boxborough, MA Lines: 29 Keywords: FSEEK, INT 21, FUNCTION 42 In article <1262@sphinx.UChicago.UUCP> cjdb@sphinx.UChicago.UUCP (Charles Blair) writes: > >Simple question: has anyone used this function to move a file pointer >backwards? Peter Norton says "The byte offset in CX:DX is a 32-bit >unsigned long integer." >However, I've tried >moving the pointer a few bytes backwards with method 1, and although >the negative sign flag was on, DOS function 3Fh (read file) seems >never able to find any more data to read (that is, it's as if the file >pointer had been moved past the end of file). > >Any enlightenment as to how this really works would be welcome. > > > Through a glass darkly .... A few years ago I had reason to write a set of file system primitives that randomly accessed a file. I remember having problems moving the pointer backwards, getting disgusted with DOS, cursing , and resorting to brute force.. I ended up always moving the file pointer to byte 0 of the file and moving forwatd to the appropriate place within the file. This was under DOS 2.0 and 2.1, I too am curious.. you should be able to back up a file pointer! Larry Backman Micom - Interlan, Inc.