> Unfortunately, for the PIC16f886, the only access to the stack happens wi= th the call, interrupt and return instructions. There is no other access. That is what I assumed from what had been said. At startup it would be easy [tm] to fill the stack with return addresses that all went to the same place. When max stack depth is to be determined, as long as the stack has never overrun, the current depth is known and can be would back to zero. NOW another pop rolls the stack back to the top and subsequent pops produce returns to defined locations as long as the contents have not been destroyed. When you strike the first "used" location the return will not go to where you expect. A timer can haul the system back into control and note can be made of how many locations returned OK. R --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .