How to implement 'RCL ST Y' and 'RCL / ST Y' for HP-15C CE - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: General Forum (/forum-4.html) +--- Thread: How to implement 'RCL ST Y' and 'RCL / ST Y' for HP-15C CE (/thread-21582.html) |
How to implement 'RCL ST Y' and 'RCL / ST Y' for HP-15C CE - tommi60 - 04-10-2024 08:26 AM 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 ... RE: How to implement 'RCL ST Y' and 'RCL / ST Y' for HP-15C CE - Dave Britten - 04-10-2024 06:10 PM 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 |