Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!agate!shelby!neon!kaufman From: kaufman@Neon.Stanford.EDU (Marc T. Kaufman) Newsgroups: comp.sys.mac.programmer Subject: Re: Help: return to Finder with programmer's switch? Message-ID: <1990Nov15.174005.14697@Neon.Stanford.EDU> Date: 15 Nov 90 17:40:05 GMT References: Distribution: usa Organization: Computer Science Department, Stanford University Lines: 25 In article vd09+@andrew.cmu.edu (Vincent M. Del Vecchio) writes: >Can anyone comment on the safeness of using address 0 as scratch space? >I've done this for a while--another alternative is to write into the >screen buffer if you're on a + or SE, but the address is longer and >harder to type. Is there anything important there that's being >overwritten? I don't think I've had any problems with doing this, so >I'd guess there's not, but that's just a guess. There are a number of programs, INITs, drivers, etc., that either deliberately or accidently dereference NIL handles. Now a NIL handle points to 0. After dereferencing you get the contents of 0 as a pointer. If this is non-zero, you could be in for lots of fun debugging. There are a number of debugging aids (Mr. Bus Error, the Debugger, etc.) that deliberately put an odd address into location 0 to catch such accidental derefs. If you try to run your program while any of the above are running, things will likely not work right. With all the memory on the mac, and the System heap, and resources, why do you want to write to 0? What if another programmer has the same idea? Marc Kaufman (kaufman@Neon.stanford.edu)