[net.micro.mac] Sacredness of -nnnn

burnard@lll-lcc.UUcp (David Burnard) (06/23/86)

While working on a program recently I encountered the following unusual
behavior...

   My program kept losing track of one of its windows, as if it had gotten
confused about one of its grafports. However if the window was manipulated
with the mouse everything worked fine (ie. WindowPtr obtained from a call
to FindWindow). So I went about saving and restoring grafports all over
creation, but still the bug persisted. Now for the interesting part...

   This bug only appeared with the D. Dunham's DiskInfo v1.41, I tried all
sorts of heap scrambling, etc. but to no avail. Finally I followed the
advice of Tech Note #7 and did a memory checksum to see what was happening
to the global variable containing my WindowPtr...  Guess what, somewhere
inside DiskInfo's driver code my global was being set to NIL! Now comes the 
real question...

   The global variable in question was the last one encountered by my linker,
so it was located at $FFFC(A5), one long word below A5. If I put a dummy
global there, things work fine (DiskInfo still zeros the location, but now
my application doesn't depend on it). Is there something magic about this
location? Is my development system supposed to leave it alone? Or, as I
suspect, is this some sort of bug in DiskInfo. (Yes, I realize I am risking
being flamed by the acid tongue of D. Dunham - but I'm stumped.)

   Any suggestions/comments are welcome...

						Dave Burnard
						burnard@lll-lcc.ARPA