Hi - Well your stack get filled, but that is not a problem, because it "operates as a circular buffer" (Read the MC 16F8x manual on page 18. section 4.4) But why not just call "return" when your cleanup thingy is done? (Call funtion, function 'goto' to cleanup, cleanup returns to main.) /holger > ---------- > > From: Steve Ridley > > To: PICLIST@MITVMA.MIT.EDU > > Subject: Using a goto to terminate a function. > > Date: Sunday, March 28, 1999 8:38 PM > > > > PIClisters > > > > I have a question regarding the use of a goto rather than a return to > > terminate a function call. In certain circumstances I could save a lot > of > > code if I could terminate functions by just going to a general clean up > area > > and then back to my main loop without ever returning to the place the > > function was called from. This means I am leaving the return address on > the > > stack. What if any are the implications of doing this ? Is there some > other > > way to achieve this ? Will the stack overflow or will it not matter > because > > the unused return addresses eventually get pushed off the end of the > stack? > > Does the PIC do anything when a stack overflow condition occurs ? > > > > Steve Ridley > > Blue Ocean Telecommunications > > Sydney, Australia >