HP Forums

Full Version: Free42 OVER stack operation
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi Thomas,

Would you consider adding OVER stack operation from the HP 50g?
Existence of such operation makes big difference between having to use a temporary variable/register and just using pure stack.

There're are other extended stack operations in HP 50g which would be nice to have but OVER is the first which would be great having.
I don't use either the 42 or the 50g; but could you do something like RCL Y ?
Yes, RCL ST Y has the same effect as OVER.
Here are some others:

SWAP:  X<>Y
DUP:   RCL ST X | ENTER
DROP:  R↓ | CLX  +
OVER:  RCL ST Y
ROT:   X<>Y  X<> ST Z
UNROT: X<> ST Z  X<>Y
NIP:   X<>Y  R↓
TUCK:  X<>Y  RCL ST Y
2DUP:  RCL ST Y  RCL ST Y
2DROP: R↓  R↓
2SWAP: R↓  R↓

Not all of them do exactly what they do on the HP-50g.
I couldn't come up with a simple DROP that saves X in LASTX and duplicates T.
But often that is not needed.
Free42 and Plus42 have a set of stack operations, which I believe covers all the stack functions in the 48 series. See https://thomasokken.com/free42/#big-stack
SWAP:  X<>Y
DUP:   DUP
DUP2:  DUPN 2
DUPN:  DUPN n
DROP:  DROP
DROP2: DROPN 2
DROPN: DROPN n
OVER:  RCL ST Y
ROT:   R↑N 3
UNROT: R↓N 3
ROLL:  R↑N n
ROLLD: R↓N n
Thank you for explanation!

I could not figure out how to enter RCL ST Y from the calculator keyboard but I found that PICK 2 is basically the same thing as OVER.
(11-29-2022 05:14 AM)kostrse Wrote: [ -> ]I could not figure out how to enter RCL ST Y from the calculator keyboard

Press RCL, then . and select ST Y from the soft menu.
(11-29-2022 05:21 AM)SammysHP Wrote: [ -> ]Press RCL, then . and select ST Y from the soft menu.

Thanks!
Reference URL's