[comp.sys.mac.programmer] Globals in MPW C code resources

dierks@ndcvb.cc.nd.edu (Timothy Dierks) (03/19/90)

  Is there any equivalent to the SetUpA4() / RestoreA4() mechanism in MPW?
Where globals within code resources can be maintained merely by declaring them
and bracketing their use with some setup code?  At the moment I'm storing a
pointer to a block with my globals in it within my code, using assembly
language and PC-relative addressing to stuff the pointer in and pull it back
out.  Is there a better/more approved way to do this?  I realize storing
variables inside code could be risky with respect to protected code space
in future System versions.  What other problems are there?

Thanks for your help-
Tim Dierks
Go Irish