Page 1 of 1

any way to disable stack frame recycling?

Posted: Mon Jun 01, 2009 5:23 pm
by Jerry Messina
I'm trying to fine-tune some interrupt handling code, and have been playing around with the (undocumented) ACCESS modifier.
This seems to work great, as it places the locals and temp variables of a subroutine in a new separate stack frame in the access bank.

The problem that I have is that when I have multiple subs declared this way, they seem to share this new stack frame using the
frame recycling mechanism used in the normal stack, and that causes issues when I try to use the high and low interrupt priority scheme.

Is there any compiler control/switch that I can use to turn off the frame recycling around a particular subroutine so that each sub gets
it's own static set of locals/temps and they aren't shared, similar to what's done with events and interrupt routines?

Jerry