Keystroke Programming and Stacks



#2

I'm about to add keystroke programming to my new calculator design and am wondering whether or not to keep the traditional 4 level RPN stack I have now, or go with an "unlimited" size RPL style stack instead.

Note that the RPL style stack would not include algebraic expression and all that fancy stuff as on the 28/48 etc, it would simply be a large stack with the usual DROP/SWAP etc.

Advantages and disadvantages, comments and insights, and religious flame wars invited :->

Thanks
Dave.


#3

Just dont forget lastx you will do good :-) When I have had to use non rpn it is that I often has missed...

#4

The KISS principle would do good.


#5

Keep it simple would be a no arbitary limit stack with nothing special happening to value in at top of stack and no strange duplicating from bottom (well we are unlimited).... Nae, I take the complicated classic rpn stack...


#6

Quote:
Keep it simple would be a no arbitary limit stack with nothing special happening to value in at top of stack and no strange duplicating from bottom (well we are unlimited).... Nae, I take the complicated classic rpn stack...

I think perhaps the complicated classic RPN stack it is then, as I've already written it, unless someone can convince me otherwise...

It will have Algebraic keystroke programming too, just to keep everyone happy :)

Thanks
Dave.

#7

Let the user decide.

E.g., some programs efficiently take advantage of the T register copies on roll down. You'd loose that with unlimited stack.

E.g., some of us want to do complex calculations from start to end without thinking about a 4 level stack limit.

I'd have a programmable function that sets the stack depth.


#8

I'd second Egan: Let it have a settable fixed stack depth, .GE. 4.

#9

Quote:
I'd have a programmable function that sets the stack depth.

How about two settings which would be programmable, one that sets stack depth, and one that enables or disables replication of the top level.

Edited: 10 Sept 2007, 12:18 p.m.


#10

Quote:

How about two settings which would be programmable, one that sets stack depth, and one that enables or disables replication of the top level.


The only problem with having adjustable stacks like that is then it's possible for some keystroke programs to only work properly in a certain stack mode. To overcome that I would have to ensure the "stack mode" is stored with each program and have the calc automatically switch to that mode when before the program runs, and also return mode when it's finished.

But I guess I already have this sort of problem by having both RPN and Algebraic keystroke programming support.

Thanks
Dave.

#11

If you're just going with basic RPN keystroke programming I say stick with a 4-level stack. You honestly won't go wrong either way.

-Hugh


#12

Quote:
If you're just going with basic RPN keystroke programming I say stick with a 4-level stack. You honestly won't go wrong either way.

-Hugh


Thanks.

What happened to the case you were working on Hugh?

Dave.


#13

I have enough free time to finish that up if you need it.

#14

The 4-level stack came from a time before calculators were programmable. The assumption was that if there were any more levels, you wouldn't remember what you had on the the stack. That becomes irrelevant however when you use the stack for parameter-passing and intermediate results for multiple nested levels of routines. Even if no routine needs more than four levels itself and, at programming time, you're only concerned with the ones that particular routine uses, at run time it should still be permissible to have many levels underneath from other pending routines. Their presence is harmless regardless of how many there are. I would like to have a lot more than four levels available.


#15

Quote:
The 4-level stack came from a time before calculators were programmable.

While it's true that the first RPN-type calculator, the Friden EC-130, did have 4-levels and wasn't programmable. The first HP calculator had just 3 levels and was programmable, the HP9100A. In the interviewing years (1963-1968) there were just a few other RPN-type calculators made.

Quote:
The assumption was that if there were any more levels, you wouldn't remember what you had on the the stack.

Remembering the stack on any of these calculators was not an issue since they displayed the entire stack. The HP-35 was the first to require the user to "remember" what was on the stack. I think that the major issue in choosing stack depth on the 35 was the cost in silicon to store the data as well as making sure that reasonable complexity expressions could be evaluated without resorting to paper and pencil.


#16

Katie,

Cost was indeed a factor. I remember the HP-35 pointing out that the machine has one memory register and a stack of four dynamic registers to store temporary numbers. So in a way, it was like HP's manual was hinting that the machine had 5 registers .. in the era when single-memory registers in non-HP calculators was typical. That's why my first HP calculator was the HP-55 since it had 20 memory registers.

Namir


Edited: 10 Sept 2007, 2:59 p.m.


Possibly Related Threads...
Thread Author Replies Views Last Post
  Most usable keystroke calculator? Sid Cave 32 2,224 01-07-2012, 03:49 PM
Last Post: Lutz Jacob
  Ren, you asked for keystroke calculations designnut 0 238 03-07-2009, 12:24 PM
Last Post: designnut
  HP 35s ENTER and keystroke skipping Luis Moreno 12 766 11-01-2008, 03:40 PM
Last Post: Brian Healy
  Keystroke Intensive Casio Hal Bitton in Boise 2 363 03-25-2008, 04:14 AM
Last Post: DaveJ
  Again about limted stacks (and other limitations) Nick 14 1,167 01-06-2008, 07:56 AM
Last Post: Nick
  Keystroke programming worksheet Martin Pinckney 5 551 11-15-2007, 12:24 AM
Last Post: Forrest Switzer
  Keystroke recording on 50G (quite long...) Giancarlo (Italy) 0 218 02-27-2007, 09:53 AM
Last Post: Giancarlo (Italy)
  HP 50g Delayed Keystroke Paul 3 425 11-29-2006, 12:51 AM
Last Post: Tim Wessman
  HP-33s keystroke encoding and checksums [long] Ivan Nejgebauer 12 946 06-19-2006, 10:00 AM
Last Post: Eric Smith
  Ease/Dis-ease of Keystroke Programming Howard Owen 14 1,089 12-31-2005, 12:09 AM
Last Post: Howard Owen

Forum Jump: