(41CX) Recall Stat Regs By Name
|
03-04-2016, 02:03 PM
(This post was last modified: 03-05-2016 06:03 PM by Dave Britten.)
Post: #1
|
|||
|
|||
(41CX) Recall Stat Regs By Name
Here's a really simple program for recalling the stat registers by name, independent of the currently defined ΣREGS. This requires the ΣREG? function present on the 41CX. To use, simply XEQ any of these labels:
ΣX ΣX^2 ΣY ΣY^2 ΣXY ΣN This program is notable in that it requires no storage registers, and only a single stack level, so it's as unintrusive as simply recalling the register directly*. There's a slight efficiency penalty to make this possible, so it's not really suitable for use in tight loops. Code: 01 LBL "ΣX" *Note that running this program enables stack lift, so whereas "CLX, RCL 11" would leave Y, Z, and T as-is, "CLX, XEQ ΣX" will lift X and discard T. EDIT: Saved a few bytes. EDIT Again: Saved a couple more bytes. |
|||
03-05-2016, 08:46 PM
Post: #2
|
|||
|
|||
RE: (41CX) Recall Stat Regs By Name
(03-04-2016 02:03 PM)Dave Britten Wrote: Here's a really simple program for recalling the stat registers by name, independent of the currently defined ΣREGS. This requires the ΣREG? function present on the 41CX. Yes, it does. I always wondered why the X-Functions module featured the missing SIZE? command, while OTOH there was no ΣREG?. Which leads to the question of an optimized, short and effective synthetic routine that does this job on a 41C/CV. Any suggestions? Dieter |
|||
03-05-2016, 09:23 PM
Post: #3
|
|||
|
|||
RE: (41CX) Recall Stat Regs By Name
The PPC ROM contains one..
and that's usually as good as it gets.. 41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE |
|||
03-05-2016, 10:28 PM
Post: #4
|
|||
|
|||
RE: (41CX) Recall Stat Regs By Name | |||
03-06-2016, 12:34 AM
Post: #5
|
|||
|
|||
RE: (41CX) Recall Stat Regs By Name
(03-05-2016 10:28 PM)Dieter Wrote:(03-05-2016 09:23 PM)Werner Wrote: The PPC ROM contains one.. By "source", if you mean author, the PPC ROM manual would reveal that. If OTOH you meant source code, you can see that in both the manual and the ROM itself. I think the manuals are part of the MoHPC USB drive, so you likely have it already, but holler if you need this portion of the manual. --Bob Prosperi |
|||
03-06-2016, 01:45 PM
(This post was last modified: 03-06-2016 02:03 PM by Dieter.)
Post: #6
|
|||
|
|||
RE: (41CX) Recall Stat Regs By Name
(03-06-2016 12:34 AM)rprosperi Wrote: By "source", if you mean author, the PPC ROM manual would reveal that. If OTOH you meant source code, you can see that in both the manual and the ROM itself. Actually I was looking for a source of the source code. ;-) Sorry, this must have been really bad English, maybe because in German there is a certain overlap in the meanings of "source" and "reference"... #-) (03-06-2016 12:34 AM)rprosperi Wrote: I think the manuals are part of the MoHPC USB drive, so you likely have it already, but holler if you need this portion of the manual. YES, THAT'S WHAT I AM LOOKING FOR. ;-) I was sure I got this routine somewhere but I simply could't find it. But wait... I got a PDF of this book by J.S. Dearing with useful HP41 routines. Et voilà: here it is. A 40-step routine where the PPC ROM is mentioned in the credits. But nevertheless maybe you can post what you got? Just for comparison. ;-) Dieter |
|||
03-06-2016, 02:41 PM
Post: #7
|
|||
|
|||
RE: (41CX) Recall Stat Regs By Name
Sigma Registers Finder
-> PPC ROM Manual P462-463 -> Calculators Tips & Routines P73 (19-4) The PPC rom routine is shorter but requires other routines from the ROM while CT&R does the same and is autonomous. |
|||
03-06-2016, 07:55 PM
(This post was last modified: 03-06-2016 07:55 PM by Dieter.)
Post: #8
|
|||
|
|||
RE: (41CX) Recall Stat Regs By Name
(03-06-2016 02:41 PM)Sylvain Cote Wrote: Sigma Registers Finder Obviously the latter is what I got here: a German version of this "CT&R" book. At least here "Σ?" is routine #19-4 as well. Dieter |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 5 Guest(s)