(10-31-2020 06:03 PM)hth Wrote: I think that normally you want stack lift to be enabled when pressing R/S, as it allows two identical numbers to be entered on the stack like:
You expect this to be two numbers when starting the program and it should be allowed for the program to push a number the first thing it does without disrupting your two entered values. That is consistent with any built in function like PLUS.
I agree, this is how it works on the 41C. But I checked several HP calculators (physical ones or emulators) and I was surprised to find that on most of the calculators tested from the HP-65 to the HP-35S, R/S is neutral vs. stack lift, with two exceptions: HP 41C and WP 34S where R/S enables the stack lift.
I used the following program:
2
+
STOP
Before running the sequence with R/S, the stack was initialized with :
3
ENTER
CLx
So the stack is initialized with 0 in X, 3 in Y and stack lift is disabled.
If R/S is neutral vs stack lift, then when running the sequence 2 + STOP, the 2 will replace the 0 in X without lifting the stack, then it will be added to the 3 in Y for a result of 5
If R/S enables stack lift, then when running the sequence 2 + STOP, the 2 will be entered in X and lift the stack, pushing the 0 in Y, and the 3 in Z, then the 2 in X will be added to the 0 in Y for a result of 2
Here are the results with also what is mentioned (or not) in the manual for each calculator :
Code:
Result Stack Lift when Manual description Manual Section
starting a program
HP-65 5 Neutral Neutral (default)* General Operations : Stack Lift Enable/Disable
HP-55 5 Neutral Neutral operations Appendix B : Additional Operating Information
not described
HP-25 5 Neutral R/S not listed Appendix C : Stack Lift and LAST X
HP-29C 5 Neutral Neutral Appendix C : Stack Lift and LAST X
HP-67 5 Neutral Enable** Appendix D : Stack Lift and LAST X
HP-33E/C 5 Neutral Neutral Appendix D : Stack Lift and LAST X
HP-34C 5 Neutral Neutral Appendix E : Stack Lift and LAST X
HP-38E/C 5 Neutral - Stack lift not mentioned in the manual
HP-41C 2 Enable Enable (default) Appendix C : Stack Lift Conditions and Termination of Keyboard Entry
HP-10C 5 Neutral Neutral Appendix A : Stack Lift and LAST X
HP-11C 5 Neutral Neutral Appendix B : Stack Lift and LAST X
HP-12C 5 Neutral R/S not listed Appendix A : The Automatic Memory Stack
HP-15C 5 Neutral Neutral Appendix B : Stack Lift and the LAST X Register
HP-16C 5 Neutral Neutral Appendix B : Classes of Operations
HP-32S 5 Neutral Neutral Appendix B : User Memory and the Stack
HP-32SII 5 Neutral Neutral Appendix B : User Memory and the Stack
HP-42S 5 Neutral - No specific section
HP-33S 5 Neutral Neutral Appendix B : User Memory and the Stack
HP-35S 5 Neutral Neutral Appendix B : User Memory and the Stack
WP 34S 2 Enable - No specific section
* In the HP-65 manual R/S when executed in a program is not listed as an operation enabling or disabling stack lift,
so it is neutral by default
** There is a quirk in the HP 67 documentation, because on this calculator R/S is neutral when used to start a program but in the Appendix D
of the manual R/S is included in the instructions for which "A number keyed in following one of these operations lifts the stack"
and not in the instructions for which "A number keyed in following one of these keys does not affect the stack".