The Museum of HP Calculators

HP Forum Archive 20

[ Return to Index | Top of Index ]

HP 50g stack depth
Message #1 Posted by Jim Yohe on 30 Jan 2011, 5:42 p.m.

What is the stack depth of the HP 50g?

      
Re: HP 50g stack depth
Message #2 Posted by Tim Wessman on 30 Jan 2011, 5:53 p.m.,
in response to message #1 by Jim Yohe

Unlimited (within avail memory).

TW

      
Re: HP 50g stack depth
Message #3 Posted by BruceH on 1 Feb 2011, 4:04 p.m.,
in response to message #1 by Jim Yohe

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
Message #4 Posted by Walter B on 1 Feb 2011, 4:28 p.m.,
in response to message #3 by BruceH

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
Message #5 Posted by Gerry Schultz on 1 Feb 2011, 9:30 p.m.,
in response to message #4 by Walter B

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
Message #6 Posted by Martin Pinckney on 1 Feb 2011, 10:09 p.m.,
in response to message #5 by Gerry Schultz

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

                        
Re: HP 50g stack depth
Message #7 Posted by Jim Yohe on 1 Feb 2011, 10:53 p.m.,
in response to message #5 by Gerry Schultz

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
Message #8 Posted by Tim Wessman on 2 Feb 2011, 1:21 a.m.,
in response to message #5 by Gerry Schultz

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
Message #9 Posted by Walter B on 2 Feb 2011, 2:27 a.m.,
in response to message #8 by Tim Wessman

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
Message #10 Posted by Paul Dale on 2 Feb 2011, 2:33 a.m.,
in response to message #9 by Walter B

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
Message #11 Posted by Walter B on 2 Feb 2011, 6:04 a.m.,
in response to message #10 by Paul Dale

d:-)

                              
Re: HP 50g stack depth
Message #12 Posted by Gerry Schultz on 2 Feb 2011, 1:20 p.m.,
in response to message #8 by Tim Wessman

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.

                        
Re: HP 50g stack depth
Message #13 Posted by David Hayden on 2 Feb 2011, 7:16 a.m.,
in response to message #5 by Gerry Schultz

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
Message #14 Posted by Jim Yohe on 2 Feb 2011, 12:51 p.m.,
in response to message #13 by David Hayden

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.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall