Post Reply 
How to implement 'RCL ST Y' and 'RCL / ST Y' for HP-15C CE
04-10-2024, 08:26 AM (This post was last modified: 04-10-2024 09:39 AM by tommi60.)
Post: #1
How to implement 'RCL ST Y' and 'RCL / ST Y' for HP-15C CE
In my free42 I have the following program snippets:

...
STO 00
2
CLA
1
RCL ST Y
XEQ 01
...

and

...
LBL 01
RCL 00
RCL / ST Y
X<Y?
GTO 03
...

I have this code working in my new HP-15C CE where I need an additional register, but wondering if there's a smarter way:

...
STO 0
2
ENTER
1
X<>Y
STO 1
X<>Y
RCL 1
GSB .2
...

and
...
LBL .2
RCL 0
X<>Y
STO 1
X<>Y
RCL / 1
TEST 8 (X<Y)
GTO .6
...

Thanks in advance.

Edit:
Ok, I could improve it somewhat already, but I still have to use an additional register:

...
STO 0
2
ENTER
STO 1
1
RCL 1
GSB .2
...

...
LBL .2
STO 1
RCL 0
RCL / 1
TEST 8
GTO .6
...
Find all posts by this user
Quote this message in a reply
04-10-2024, 06:10 PM (This post was last modified: 04-10-2024 06:11 PM by Dave Britten.)
Post: #2
RE: How to implement 'RCL ST Y' and 'RCL / ST Y' for HP-15C CE
Well, you can simulate RCL ST Y with this, but it won't respect stack lift being disabled:

x><y
ENTER
Rv
x><y
R^

And this will get you RCL/ ST Y (note that the value that ends up in LSTx won't be the same as with an actual RCL/ ST Y):

x><y
รท
LSTx
x><y
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




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