Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site reed.UUCP Path: utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!petrus!bellcore!decvax!tektronix!reed!kamath From: kamath@reed.UUCP (Sean Kamath) Newsgroups: net.micro.apple Subject: Re: Help with DOS 3.3 write end of file Message-ID: <2455@reed.UUCP> Date: Wed, 5-Feb-86 19:36:16 EST Article-I.D.: reed.2455 Posted: Wed Feb 5 19:36:16 1986 Date-Received: Fri, 7-Feb-86 20:44:21 EST References: <189@noscvax.UUCP> Reply-To: kamath@reed.UUCP (Sean Kamath) Organization: Reed College, Portland, Oregon Lines: 27 Here's an interesting tidbit. If anyone has dossource (Complete disassembly of dos 3.3) or is in the mood, take a look at where dos tries to read or write a file. I forget exactly where it is, but notice that it checks to see if the file is open. If it isn't then it opens it. Therefore, there is no real need to open a file before reading or writing it. try it sometime. Also, you may have noticed that Applewriter won't create a new file if you try to read one that isn't there. But when you try to open one that doesn't exist from your own programs, you're left with a one sectore file by that name. How does Applewriter do it? Take a look at Beneath Apple Dos. You'll notice that there is a marker in dos that tells it if a command can creat a new file. They are "open" "save" etc. Ones that cannot are "load" "delete" etc. In the case of open, if you stick a hex 22 in the right spot, no nasty on sector files. On the other hand, if you try to open a new file to write to, you must replace that 22 with a 23. If anyone's going crazy because they can't live with out the exact location(s), write me. Sean Kamath -- ________________________________________________________________________________ UUCP {ihnp4,decvax,ucbcad}!tektronix!reed!kamath And I looked again And the monster was me...