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)
http://www.piclist.com hint: To leave the PICList
See also: www.piclist.com/techref/microchip/devices.htm?key=pic
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the