Is there any stack pointer in PIC ? I imagine this hardware stack as 8-byte array and pushing in and pulling out are some like this: typedef word _14_bit_value; word stack [8]; push (word return_addres) { int i; for (i = 6; i >= 0; i--) stack[i+1] = stack[i]; // and last value is overwritten (lost) stack[0] = return_address; } word pull () { int i; ret_address = stack[0]; for (i = 0; i < 6; i++) stack[i] = stack[i+1]; return ret_address; } Thus, no stack pointer but the stack contents is moving. On reset is important what the program is thinking about the stack. Am I correct, what you think ? Ivan Cenov okto7@botev.ttm.bg -----Original Message----- From: TONY NIXON 54964 To: PICLIST@MITVMA.MIT.EDU Date: ÐÅÔßË, 17 áÐÒÉÌ 1998 Ç. 02:32 Subject: Stack Pointer Anyone know what happens to the stack pointer on a reset. On a powerup reset, it is understandable that it would be set to point to the 1st stack position, but what about a WDT reset or a wake up from SLEEP. TIA Tony PicNPoke Multimedia 16F84 Beginners PIC Tools. **PLUS** - PicNPlay - PicNPlan - PicNPrep - PicNPost PicNPort - DT Type Saver - *new* PicNQuiz. Recent addition - DogBoneZ Component. http://www.dontronics.com/picnpoke.html