Post Reply 
Free42 OVER stack operation
11-28-2022, 05:20 AM (This post was last modified: 11-28-2022 05:23 AM by kostrse.)
Post: #1
Free42 OVER stack operation
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.
Find all posts by this user
Quote this message in a reply
11-28-2022, 06:30 AM
Post: #2
RE: Free42 OVER stack operation
I don't use either the 42 or the 50g; but could you do something like RCL Y ?

http://WilsonMinesCo.com (Lots of HP-41 links at the bottom of the links page, http://wilsonminesco.com/links.html )
Visit this user's website Find all posts by this user
Quote this message in a reply
11-28-2022, 06:46 AM
Post: #3
RE: Free42 OVER stack operation
Yes, RCL ST Y has the same effect as OVER.
Visit this user's website Find all posts by this user
Quote this message in a reply
11-28-2022, 07:14 AM (This post was last modified: 11-28-2022 07:22 AM by Thomas Klemm.)
Post: #4
RE: Free42 OVER stack operation
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.
Find all posts by this user
Quote this message in a reply
11-28-2022, 07:19 AM
Post: #5
RE: Free42 OVER stack operation
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
Visit this user's website Find all posts by this user
Quote this message in a reply
11-28-2022, 01:11 PM (This post was last modified: 11-28-2022 01:38 PM by Thomas Okken.)
Post: #6
RE: Free42 OVER stack operation
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
Visit this user's website Find all posts by this user
Quote this message in a reply
11-29-2022, 05:14 AM
Post: #7
RE: Free42 OVER stack operation
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.
Find all posts by this user
Quote this message in a reply
11-29-2022, 05:21 AM
Post: #8
RE: Free42 OVER stack operation
(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.
Visit this user's website Find all posts by this user
Quote this message in a reply
11-29-2022, 05:42 AM
Post: #9
RE: Free42 OVER stack operation
(11-29-2022 05:21 AM)SammysHP Wrote:  Press RCL, then . and select ST Y from the soft menu.

Thanks!
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)