Valentin Albillo's "Boldly Going... Going Back to the roots" now for the HP-41 !
|
04-20-2024, 10:43 AM
(This post was last modified: 04-20-2024 10:45 AM by Vincent Weber.)
Post: #21
|
|||
|
|||
RE: Valentin Albillo's "Boldly Going... Going Back to the roots" now for the...
Thanks Angel, very interesting!
Knowing that my "HEPAX trick" was not available back in the day, well at least until 1988 which is very late in the '41 life, I made a version using the Advantage pack complex routines. At least they were available in a ROM module (so you can use XROMs) by 1985. I got consternated by the results. As slow as with JMB routines when they reside in main memory, so with the global searches! These routines are terrible, using up to 4 registers, plenty of calls back and forth, not optimised the slightest bit, unsuitable for loops. JMB routines are also in user code, but at least he bothered to make them straightforward and reasonably fast. It is a really pity that the Advantage pack does not contain the full 15C functionality in MCODE. If HP could commission Firmware specialists to adapt the 15C SOLVE and INTEG routines for the '41, why not going all the way, and also adapt the complex stacks (improved with complex STO and RCL), hyperbolics, Gamma, combinations and permutations, and random numbers? The matrix routines on the Advantage pack are outstanding, more powerful than the 15C, but they were made by the CCD, not by HP. This Advantage ROM is a half-baked product, too little too late. Hp was already showing signs of decadence by 1985... |
|||
04-21-2024, 06:53 PM
Post: #22
|
|||
|
|||
RE: Valentin Albillo's "Boldly Going... Going Back to the roots" now for the...
Hi Vincent, I agree 101% with your assessment on the complex routines in the Advantage and with your comments. I know the 41Z wasn't there back then but hey, it is here right now... so I'll prepare a tweaked version replacing the calls to JMB's routines with the 41Z counterpart, stay tuned.
"To live or die by your own sword one must first learn to wield it aptly." |
|||
04-21-2024, 06:57 PM
Post: #23
|
|||
|
|||
RE: Valentin Albillo's "Boldly Going... Going Back to the roots" now for the...
(04-21-2024 06:53 PM)Ángel Martin Wrote: Hi Vincent, I agree 101% with your assessment on the complex routines in the Advantage and with your comments. I know the 41Z wasn't there back then but hey, it is here right now... so I'll prepare a tweaked version replacing the calls to JMB's routines with the 41Z counterpart, stay tuned. Great, Thanks Angel! Cheers |
|||
04-21-2024, 07:27 PM
(This post was last modified: 04-21-2024 07:31 PM by Ángel Martin.)
Post: #24
|
|||
|
|||
RE: Valentin Albillo's "Boldly Going... Going Back to the roots" now for the...
it's done, quite easy since it's almost a one-by-one replacement...
but the choice of those real data registers is very inefficient (it requires multiple ZENTER^ instructions sprinkled throughout the program). If I understand your description you used: R01 and R24 R02 and R25 R03 and R36 etc... for real and imaginary parts? Redoing that to use adjacent (contiguous) numbered registers will eliminate the need for all those ZENTER^, abd thus reduce the execution time even further... Code: 9:24PM 04/21 and: Code: 9:28PM 04/21 in the last part you see that ZRCL 4 is equivalent to {RCL 08, RCL 09, ZENTER^} Cheers, ÁM "To live or die by your own sword one must first learn to wield it aptly." |
|||
04-21-2024, 07:35 PM
Post: #25
|
|||
|
|||
RE: Valentin Albillo's "Boldly Going... Going Back to the roots" now for the...
(04-21-2024 07:27 PM)Ángel Martin Wrote: it's done, quite easy since it's almost a one-by-one replacement...Yes, when I adapted Valentin's program I wanted to reduce the risk of errors, so whenver he used variable X for instance, I used the corresponding letter number for the real part (here 24) and I used the registers as needed going forward for the imaginary parts (so here: 1), leaving 00 free to store the function's name. But please double check, I might not have gone in order 100% of the times. Best is to check the RCLs... When I did this I had not 41Z and consecutive registers in mind, it didn't matter How long does it take to solve with R=PI? Cheers |
|||
04-22-2024, 08:48 AM
(This post was last modified: 04-22-2024 09:00 AM by Ángel Martin.)
Post: #26
|
|||
|
|||
RE: Valentin Albillo's "Boldly Going... Going Back to the roots" now for the...
G'morning, with the register number changes done the execution takes just 40 seconds on V41 (using 41Z functions), or about 2 seconds in Turbo mode. Much better, saves about one minute.
Here's how the registers changed: Code: R25 -> R01 And here's the new program listing: Code: 01*LBL "RZVA" See attached the RAW file in case you want to try it on your V41 environment... It possibly can be further tweaked to squeeze a few more seconds off the timing, specially the final part - feel like taking a stab at it? That was fun , thanks for the cues. BTW this version will go into a new module I'm putting together, credits will state "Albillo-Weber-Martin" Cheers, ÁM PS. note that the "R" constant (pi in the example) now cannot be stored in R08, R09. I used PI facevalue since subtracting a real value from a complex number only involves its real part.: 01*LBL "ZZ" 02 ZRCL 01 04 ZENTER^ 05 W^Z 06 PI 07 - 08 END "To live or die by your own sword one must first learn to wield it aptly." |
|||
04-22-2024, 08:53 AM
Post: #27
|
|||
|
|||
RE: Valentin Albillo's "Boldly Going... Going Back to the roots" now for the...
Many thanks Angel ! Very interesting.
40s is twice is fast as the 15C version, which is consistent since the '41 is twice as fast as the 15C in general Just one question, I'm not familiar with 41Z, but do ZSTO/ZRCL work on complex registers ? So they need to be contiguous ? I'm intrigued because I see some ZSTO 03 and ZSTO 04 in your listing, how does it work ? I don't think I deserve to have my name next to Valentin's and yours for this module Kind of you, but I have done nothing much, just blind conversion ! Cheers |
|||
04-22-2024, 09:48 AM
(This post was last modified: 04-22-2024 09:52 AM by Ángel Martin.)
Post: #28
|
|||
|
|||
RE: Valentin Albillo's "Boldly Going... Going Back to the roots" now for the...
yes, the 41Z uses complex registers - which in turn are nothing more than pairs of contiguous real registers managed automatically by the STO/RCL/Z<>/VIEW/etc. functions.
You can peruse the HP-41Z Manual at your leisure if you're interested, it's available here Cheers "To live or die by your own sword one must first learn to wield it aptly." |
|||
04-22-2024, 09:51 AM
Post: #29
|
|||
|
|||
RE: Valentin Albillo's "Boldly Going... Going Back to the roots" now for the...
(04-22-2024 09:48 AM)Ángel Martin Wrote: yes, the 41Z uses complex registers p which in turn are nothing more than pairs of contiguous real registers managed by the STO/RCL/Z<>/VIEW/etc. functions automatically.Thanks ! I have no doubt that 41Z really shines. The problem is, it was not available in the 20th century, so you can't say that it beats the 15. Otherwise, Mathematica also does, but this is utterly unfair... There was a complex stack à la 15C developped in 1986 as part of the Toulouse "ROM". But this "ROM" was never more than an EPROM at the time, so I guess nobody could use it... Cheers |
|||
04-22-2024, 05:33 PM
(This post was last modified: 04-22-2024 05:34 PM by Ángel Martin.)
Post: #30
|
|||
|
|||
RE: Valentin Albillo's "Boldly Going... Going Back to the roots" now for the...
Actually I beg to disagree with your Mathematica comparison: consider that the 41Z uses exclusively coconut MCODE and calls to the 41-OS, therefore it properly and fairly is the very same machine and thus should be considered part of the same achievement, no matter when it got "released" ;-)
"To live or die by your own sword one must first learn to wield it aptly." |
|||
04-22-2024, 05:35 PM
Post: #31
|
|||
|
|||
RE: Valentin Albillo's "Boldly Going... Going Back to the roots" now for the...
(04-22-2024 05:33 PM)Ángel Martin Wrote: Actually I beg to disagree with your Mathematica comparison: consider that the 41Z uses exclusively coconut MCODE and calls to the 41-OS, therefore it properly and fairly is the very same machine and thus should be considered part of the same achievement ;-)Yeah, I see your point 41Z is what HP should have included in the advantage pack. If they could do something like that for the 15C in 1982, they should have been able to do it in 1985 for the '41! |
|||
07-15-2024, 04:57 AM
Post: #32
|
|||
|
|||
RE: Valentin Albillo's "Boldly Going... Going Back to the roots" now for the...
(04-19-2024 05:43 AM)Thomas Klemm Wrote: Using Help → Submit Issue (Web) allows to report it. Done: 15C: CHS after EEX #116 |
|||
08-12-2024, 08:45 PM
Post: #33
|
|||
|
|||
RE: Valentin Albillo's "Boldly Going... Going Back to the roots" now for the...
(07-15-2024 04:57 AM)Thomas Klemm Wrote: Done: 15C: CHS after EEX #116 Quote:Fixed and released in 2.1.15 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)