beard@ux1.lbl.gov (Patrick C Beard) (09/24/88)
Here's a suggestion: Try writing a routine which stores A5 in PC relative storage BEFORE you call the CODE resource. Then, when any of the routines defined as entry points are called, retrieve this value of A5. I'm not sure why A5 would get trashed, I thought that if any registers were used by C other than the scratch registers (A0-A2?), they would be saved. In fact, I don't think (THINK or otherwise) C uses any registers other than the scratch registers (but I could be wrong). This would both help diagnose the problem and fix it if it works. Patrick Beard Lawrence Berkeley Laboratory beard@ux1.lbl.gov p.s. I have received a few responses to my BitManager posting. Where should I send the XCMD and stack that demos it? Comp.binaries.mac?