Favorite HP-41 programs and techniques
|
01-28-2021, 03:55 PM
Post: #1
|
|||
|
|||
Favorite HP-41 programs and techniques
Hello,
After many years of inactivity using the HP-41, I'm getting back into RPN FOCAL programming on the DM41X. To brush up on my skills, I'd like to look at good programming examples. What are your favorite well-crafted FOCAL programs? Thanks, Steve |
|||
01-28-2021, 04:49 PM
Post: #2
|
|||
|
|||
RE: Favorite HP-41 programs and techniques | |||
01-28-2021, 04:51 PM
Post: #3
|
|||
|
|||
RE: Favorite HP-41 programs and techniques
Bill Duncan's Time Manager is quite nice:
https://www.hpmuseum.org/software/41/41tmgr15.htm Requires a CX or Time Module. |
|||
01-28-2021, 06:31 PM
Post: #4
|
|||
|
|||
RE: Favorite HP-41 programs and techniques
(01-28-2021 03:55 PM)smartin Wrote: What are your favorite well-crafted FOCAL programs? The Greatest Common Divisor & Lowest Common Multiple routine that computes GCD(a,b) & LCM(a,b) and calculates a' = a/GCD(a,b) & b' = b/GCD(a,b) without the use of any flag, registre, subroutine or specific module in no more than sixteen steps. Code:
Code: STACK INPUTS OUTPUTS |
|||
01-28-2021, 11:15 PM
Post: #5
|
|||
|
|||
RE: Favorite HP-41 programs and techniques
Read through the PPC ROM User Manual. There is almost certainly no better single source for clever and well-crafted and extremely well-documented FOCAL programs. These days, lots of people assume the PPC ROM must have been written in MCODE, especially to accomplish many of the advanced functions included, but the PPC ROM created before MCODE was available.
A copy of the complete manual (500+ 8.5x11 pages) is included in the MoHPC Document set, so you may very well already own this; if not, you should get it. Anyone with your interest should have this, it's full of hundreds of great manuals, guides, books, etc. --Bob Prosperi |
|||
01-28-2021, 11:37 PM
(This post was last modified: 01-28-2021 11:38 PM by Valentin Albillo.)
Post: #6
|
|||
|
|||
RE: Favorite HP-41 programs and techniques
(01-28-2021 03:55 PM)smartin Wrote: To brush up on my skills, I'd like to look at good programming examples. What are your favorite well-crafted FOCAL programs? Congratulations on your rekindled interest in the HP-41, if you're after non-trivial programs for it you might be interested in some of the ones I wrote for it, namely these 11: pdf HP Program VA411 - HP-41C Finding Roots of Equations
pdf HP Program VA412 - HP-41C Finding Extrema of Functions
pdf HP Program VA413 - HP-41C 3-point Gaussian Integration
pdf HP Program VA414 - HP-41C Dice Rolling with Graphics
pdf HP Program VA416 - HP-41C Mate w King Bishop Knight Practice
Two worked examples included, one of them against the world-class chess engine Stockfish 9 (released in 2018 and rated at more than 3,300 ELO), the other against a human user. pdf HP Program VA417 - HP-41C Systems of Linear Equations - Gauss-Seidel
A system of up to 15 equations can be solved if using all 4 memory modules (HP-41C) and the input matrix is left unchanged by the procedure so it can be reused for further processing. Also, full details are given to modify it to use synthetic instructions to save registers, if desired. Two worked examples included. pdf HP Program VA418 - HP-41C Memory Game and Trainer
pdf HP Program VA419 - HP-41C ESP Tester
pdf HP Program VA420 - HP-41C Eigenvalues of Symmetric Matrices - Jacobi
pdf HP Program VA421 - HP-41C NxN Matrix Inversion
V. All My Articles & other Materials here: Valentin Albillo's HP Collection |
|||
01-29-2021, 12:35 AM
Post: #7
|
|||
|
|||
RE: Favorite HP-41 programs and techniques
(01-28-2021 04:51 PM)Dave Britten Wrote: Bill Duncan's Time Manager is quite nice: Thank you Dave! Nice to get some feedback on that as it took a little bit of sweat and, gosh, it was about 2 decades ago.. lol. I did a similar program a few years ago. https://www.hpmuseum.org/forum/thread-9831.html Cheers. |
|||
01-29-2021, 12:49 AM
Post: #8
|
|||
|
|||
RE: Favorite HP-41 programs and techniques
(01-28-2021 11:15 PM)rprosperi Wrote: Read through the PPC ROM User Manual. There is almost certainly no better single source for clever and well-crafted and extremely well-documented FOCAL programs. These days, lots of people assume the PPC ROM must have been written in MCODE, especially to accomplish many of the advanced functions included, but the PPC ROM created before MCODE was available. Even with the DM41X and easy access to the PPC ROM, I haven't dug into it yet and as you correctly pointed out my assumption was that it was heavy MCODE. I have the manual on the MoHPC doc set. Thanks for the suggestion! Steve |
|||
01-29-2021, 12:54 AM
Post: #9
|
|||
|
|||
RE: Favorite HP-41 programs and techniques
(01-28-2021 04:49 PM)JMBaillard Wrote: Hi, I like the understatement at the top of your web site: "This website contains several programs that I've written for this wonderful pocket-calculator: the HP-41C/CV/CX ". All I can say is Wow! Lots to look through. Much appreciated! Steve |
|||
01-29-2021, 01:03 AM
Post: #10
|
|||
|
|||
RE: Favorite HP-41 programs and techniques
Thanks everyone else for your suggestions:
C.Ret for the short and sweet GCD, Bill Duncan's time manager (beautifully documented code, don't see that much), V. Albillo's targeted list of math solvers (can't wait to see how fast these run on a DM41X). Steve |
|||
01-29-2021, 07:04 AM
(This post was last modified: 01-29-2021 07:11 AM by C.Ret.)
Post: #11
|
|||
|
|||
RE: Favorite HP-41 programs and techniques
Thanks,
But just to be clear, I am not the author of the GCD program, I found it a while ago on the http://hp41programs.yolasite.com site. We all have to congratulate Jean Marc Baillard for sharing all his collection of great HP-41C codes ! |
|||
01-29-2021, 07:34 AM
Post: #12
|
|||
|
|||
RE: Favorite HP-41 programs and techniques
(01-28-2021 06:31 PM)C.Ret Wrote:(01-28-2021 03:55 PM)smartin Wrote: What are your favorite well-crafted FOCAL programs? Wow, that’s a neat one. Thanks. |
|||
01-29-2021, 08:11 AM
(This post was last modified: 01-29-2021 08:23 AM by Peet.)
Post: #13
|
|||
|
|||
RE: Favorite HP-41 programs and techniques
I think it's important consider the level of your own knowledge when choosing programs to (re)learn FOCAL.
Unless you have a clue about astronomy or industrial engineering, programs in these areas are certainly not easy to understand and not a good place to start. Beginners should start with less tricky programs and without or less synthetics, you also should be interested in the topic of the programs. When I bought the HP-41CV about 40 years ago, the included standard application collection was a very good source and help for me to start with programming the HP41. HP made an excellent choice of the programs in the collection. All programs were well documented and interesting for most users (no special interest). At that time I did not only entered them all in, but also modified them to my taste (e.g. I don't like global labels if they don't make sense outside the program). After I bought the DM41X, I first looked at my old programm collection (I had printed out a lot of the old listings). I tried to understand the usage again (unfortunately I hadn't documented the programs at all at the time) and then even added new subroutines or optimized some of them for the DM41X. So after a long break I got back to a little FOCAL programming. My advice is to start with programs that interest you on the topic, with easily comprehensible code (e.g. the HP41 Standard Applications) or which you wrote yourself back then. My calculators - former: CBM PR100, HP41CV, HP11C, HP28S - current: HP48G, HP35S, Prime, DM41X, DM42, HP12C |
|||
01-30-2021, 04:59 PM
Post: #14
|
|||
|
|||
RE: Favorite HP-41 programs and techniques
Thank you very much for your so positive comments about my website.
I create most of these programs by myself, but there are a few exceptions: For example, "GCD" is a small modification of a program created by Philippe Descamps & Jean-Jacques Dhenin in "Programmer HP-41" Best wishes, JM. |
|||
02-02-2021, 09:11 PM
Post: #15
|
|||
|
|||
RE: Favorite HP-41 programs and techniques
(01-28-2021 03:55 PM)smartin Wrote: look at good programming Not sure if it is such good programming but I was impressed the other day with a line in the HP41C Math Pac - page 31 Example 1 LBL FX program - it solves for a differential equation which has both arctan(y/x) and root of x^2 +y^2 with a R-P keystroke. |
|||
02-02-2021, 09:48 PM
Post: #16
|
|||
|
|||
RE: Favorite HP-41 programs and techniques
HP Key Notes, also in the museum files, has lots of interesting RPN routines.
|
|||
02-05-2021, 06:03 AM
Post: #17
|
|||
|
|||
RE: Favorite HP-41 programs and techniques
(01-28-2021 11:37 PM)Valentin Albillo Wrote:(01-28-2021 03:55 PM)smartin Wrote: To brush up on my skills, I'd like to look at good programming examples. What are your favorite well-crafted FOCAL programs? Such a collection is claiming for a dedicated ROM image ;-) "To live or die by your own sword one must first learn to wield it aptly." |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 6 Guest(s)