piclist 2001\01\26\063248a >
Thread: Stack Overflows
www.piclist.com/techref/microchip/devices.htm?key=pic
flavicon
face BY : Roman Black email (remove spam text)



Bob Ammerman wrote:
>
> How the stack behaves on underflow/overflow depends on the particular flavor
> of PIC.
>
> See your datasheet.
>
> Here are a couple examples:
>
> for the 16F87x (which has an 8 slot stack) the datasheet says:
>
> "The stack operates as a circular buffer. This means that
> after the stack has been PUSHed eight times, the ninth
> push overwrites the value that was stored from the first
> push. The tenth push overwrites the second push (and
> so on)."


Yep, I knew it was a circular stack, but when I read
your post a funny thought occured to me. Since the stack
is circular, you could call a function ANY amount of times,
and return the same amount of times, provided:
* It was originally called from the top level
* no ints or other functions were called.

This would give an option to do a recursive activity
a very large number of times??

Any opinions?? :o)
-Roman

--
http://www.piclist.com hint: To leave the PICList
spamBeGonepiclist-unsubscribe-requestspamBeGonespam@spam@mitvma.mit.edu


<3A715FBD.4ABB@ezy.net.au> 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...