On Sat, 10 Mar 2007, David VanHorn wrote: >> What does the hardware stack depth have to do with C? C does not >> mysteriously consume hardware stack levels. > > Nothing "mysterious" about it, but C pushes a lot of things onto the stack > in function calls and ISRs. A C function call or ISR uses one level of the hardware stack, just like assembly language. I've never seen a PIC C compiler that used the hardware stack for any additional storage purposes. > In some of my ASM ISRs I don't push ANYTHING because it's not necessary. > When you only have a three word hardware stack, I don't even think it's > possible to use C, is it? I've done a C application on the 10F200, which has a two-deep hardware stack. The application used zero of those stack levels, because my code contained no function calls, and the 10F200 doesn't have interrupts. -- John W. Temples, III -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist