HP Forums
HP 50g stack depth - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: HP 50g stack depth (/thread-178024.html)



HP 50g stack depth - Jim Yohe - 01-30-2011

What is the stack depth of the HP 50g?


Re: HP 50g stack depth - Tim Wessman - 01-30-2011

Unlimited (within avail memory).

TW


Re: HP 50g stack depth - BruceH - 02-01-2011

Quote:
What is the stack depth of the HP 50g?

I reckon about 7 or 8.


That is, about 7 or 8 on top of one another before the pile becomes too unstable. ;-)
(A challenge for HHC2011 methinks?)


Re: HP 50g stack depth - Walter B - 02-01-2011

Bruce, you're talking about stack hight. HP did know why they baptized it "stack depth". Way back, in early IT, people here used to translate this stack as "Kellerspeicher". Avoiding instability as well d;-)


Re: HP 50g stack depth - Gerry Schultz - 02-01-2011

I just have to comment on this thread. When I first read it, I thought Jim was referring to return from subroutine stack depth, not data stack depth. It makes me wonder how my brain work.

Gerry


Re: HP 50g stack depth - Martin Pinckney - 02-01-2011

Your brain work in stacks. (On different levels).


Re: HP 50g stack depth - Jim Yohe - 02-01-2011

Sorry for the confusion. Perhaps I should have mentioned some numbers like a stack of 4 (X, Y, Z, T), or 8 (X, Y, Z, T, A, B, C, D) in the "34S" ;-), or more instead of being too general with my question.


Re: HP 50g stack depth - Tim Wessman - 02-02-2011

Will it blow your mind to hear that you can also have an essentially unlimited "stack" of stacks? :-P

This is what allows you to do things like evaluate expressions and programs for inputs in inform boxes. You couldn't do that on the 48. Essentially, these virtual stacks allow you to save the entire content of a stack very quickly and easily, allow anything to go on in the new stack, and then restore it just as easily.

TW


Re: HP 50g stack depth - Walter B - 02-02-2011

Quote:
... these virtual stacks allow you to save the entire content of a stack very quickly and easily, allow anything to go on in the new stack, and then restore it just as easily.

FYI, there are two commands included in v1.13 of wp34s for this purpose already.

Ceterum censeo: ...

Walter


Re: HP 50g stack depth - Paul Dale - 02-02-2011

Quote:
FYI, there are two commands included in v1.13 of wp34s for this purpose already.

They've been there longer, just not documented :-)


- Pauli


Re: HP 50g stack depth - Walter B - 02-02-2011

d:-)


Re: HP 50g stack depth - David Hayden - 02-02-2011

It looks like the original post was indeed referring to the data stack, but for any readers who are curious, the subroutine stack (also known as the "return stack") depth is also infinite on the 50g - which really means it's limited by memory.

If I recall correctly, objects are stored on one side of a memory pool, and the data stack is stored at the other. They grow towards the center, where the return stack is stored. If the data stack or object store bumps into the return stack, then the return stack is re-centered. This can result in a significant slowdown in processing if you have a VERY deep return stack but in practice, I think that's very rare.

Dave


Re: HP 50g stack depth - Jim Yohe - 02-02-2011

That's very interesting, to me at least. I hadn't thought about two different stacks with the one I was asking about being the data stack. Thank you for clarifying it.


Re: HP 50g stack depth - Gerry Schultz - 02-02-2011

Tim:

So that means my 49g, 49g+ and 50g are well-stacked machines? I know, that's pretty bad. What's really sad is that my boss here and a coworker do these groaners all day and I've heard them so many times, I know the scripts. Just kill me now...

Gerry

Edited: 2 Feb 2011, 1:37 p.m.