Ok, I figured out the problem.  Turns out it was a stack overflow in the HW stack.  The variable in question was the first variable on the SW stack (there were no local variables before this point), and the HW stack overflowed by exactly 2 bytes, thus clobbering that 1 variable.  And I thought a HW stack depth of 64 would be sufficient.  Turns out I needed 66.
<br><br>From the documentation:<br><br>&quot;The generated code uses two stacks: a hardware stack that is used by
the subroutine calls and interrupt handlers, and a software stack for
allocating stack frames for parameters, temporaries and local
variables. Although it may seem cumbersome, using two stacks instead of
one allows the most transparent use of the data RAM.&quot;<br><br>It&#39;s not clear to me how two stacks allows for &quot;the most transparent use of the data RAM.&quot;&nbsp; Is this because of the use of RAMPY as a frame pointer?&nbsp; But couldn&#39;t the function prologue save RAMPY to the stack, copy SP to RAMPY, then decrement RAMPY to establish the stack frame?&nbsp; And then just pop SP into RAMPY to clear the stack frame?&nbsp; This is still pretty transparent use.
<br><br>Just curious about why 2 stacks are used.<br><br>Thanks,<br>Pete<br>-- <br>--<br>&quot;To love for the sake of being loved is human;&nbsp;&nbsp;to love for the sake of loving is Angelic.&quot;&nbsp;&nbsp;-- Alphonse de Lamartine