> Are there any ways to simulate a stack that is 40 bytes deep? See the PUSHREGS and POPREGS macros in STD.INS.ASPIC at http://www.embedinc.com/pic. These push or pop a set of "general registers" to/from a software stack. The stack can be as large as any available contiguous memory block. On the 18 family the FSR registers can do auto increment/decrement, so you don't need software to maintain a data stack. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.