piclist 2001\01\25\140450a >
Thread: Stack Overflows
www.piclist.com/techref/microchip/devices.htm?key=pic
face picon face BY : Olin Lathrop email (remove spam text)



> Is there a problem if my code overflows the stack?

No, a stack is just one of those silly frills Microchip puts in there to
justify a higer price.  Sorta like that ALU whatsit thingy.  Go ahead ignore
all this stuff and go merrily on your way.  Just stay away from pacemakers
and nuclear power plant control systems.  (By the way, does Mommy know
you're playing with the 'puter again?)

> like if in the delay i poll some lines and call a function if the
> lines are in a certain state.
>
> The delay wont matter.  it is trivial.
>
> but if the stack overflows (ie the delay poll call a function which
> does the same delay routine and call another, and on till the stack
> overflows.) what happens?

It starts forgetting how to return from the outer subroutines.

> does it reset the stack? (empty it like)

No, it starts loosing things off the end, like.

> would it matter?

Does it matter if your subroutines return from where they were called, or is
it OK if they return to after a more recent call?



*****************************************************************
Olin Lathrop, embedded systems consultant in Devens Massachusetts
(978) 772-3129, @spam@olinRemoveMEspamspamBeGoneembedinc.com, http://www.embedinc.com

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservKILLspamspamspamBeGonemitvma.mit.edu with SET PICList DIGEST in the body


<001f01c08700$80b3f140$260bf6cd@pc> 7bit

See also: www.piclist.com/techref/microchip/devices.htm?key=pic
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Stack Overflows

month overview.

new search...