Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!ux1.cso.uiuc.edu!ux1.cso.uiuc.edu!cs290ac From: cs290ac@ux1.cso.uiuc.edu Newsgroups: comp.sys.mac.programmer Subject: C globals Message-ID: <18300014@ux1.cso.uiuc.edu> Date: 17 Jun 90 21:43:00 GMT Lines: 15 Nf-ID: #N:ux1.cso.uiuc.edu:18300014:000:727 Nf-From: ux1.cso.uiuc.edu!cs290ac Jun 17 16:43:00 1990 I'm writing a code resource using think C 3.0. I want to be able to pass a string constant to a function like this: call_function ("this is a string"); I disassembled and looked closely. When I do the above, think C stores the string in global area and accesses it via the A4 register. So, unless I use the macros provided by Think to restore the A4 after each call, the above doesn't work since we all know globals are a no-no in code resources. I don't really want to use the macros since the string stuff isn't really necessary (used for debugging). My question is whether there is a simple way to have C tag the string after the subroutine that uses it, and have the string be accessed locally via the A6? --Ron Smith