> How?  Is there any documentation on this?

Not that I'm aware of, sorry.
I meant that if you were going to allocate a chunk of memory to use as your
globals, you might as well use A5 to point to it.
I had forgotten, however, about the SysAppInfoPtr at A5 which Michael just
reminded me of.  The problem here is that its tricky for you to duplicate the
globals chunk because apps probably shouldn't rely on knowledge about the
SysAppInfo ptr and its location in an app's A5 world.

However, if you were willing to be just a little bit incompatible, you could
probably call SysGetAppInfo() to obtain the AppInfoPtr and then store it at A5,
or alternatively set the sysAppLaunchFlagNewGlobals and then call
SysAppStartup().  If you know what you're doing though, using A4 for globals is
completely compatible... it just has some pitfalls for novice developers.  One
perfectly compatible thing you could try is sublaunching your app again with the
sysAppLaunchFlagNewGlobals flag set.  This would (probably - I haven't tried it)
work just fine, although it seems like a bit of a pain.


Jesse



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to