HP Forums
Free42 OVER stack operation - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: Not HP Calculators (/forum-7.html)
+--- Forum: Not quite HP Calculators - but related (/forum-8.html)
+--- Thread: Free42 OVER stack operation (/thread-19218.html)



Free42 OVER stack operation - kostrse - 11-28-2022 05:20 AM

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.


RE: Free42 OVER stack operation - Garth Wilson - 11-28-2022 06:30 AM

I don't use either the 42 or the 50g; but could you do something like RCL Y ?


RE: Free42 OVER stack operation - Thomas Okken - 11-28-2022 06:46 AM

Yes, RCL ST Y has the same effect as OVER.


RE: Free42 OVER stack operation - Thomas Klemm - 11-28-2022 07:14 AM

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.


RE: Free42 OVER stack operation - Thomas Okken - 11-28-2022 07:19 AM

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


RE: Free42 OVER stack operation - Thomas Okken - 11-28-2022 01:11 PM

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



RE: Free42 OVER stack operation - kostrse - 11-29-2022 05:14 AM

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.


RE: Free42 OVER stack operation - SammysHP - 11-29-2022 05:21 AM

(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.


RE: Free42 OVER stack operation - kostrse - 11-29-2022 05:42 AM

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

Thanks!