I’ve had this simple program on my HP-41 for years, “CLR”. It clears the registers, stack and Alpha as well as setting the correct flags and time/date formats. It also checked to see if the clock had been reset (as it does when the battery runs out) and prompts for Time and Date if it has.
On my trip to the US, I met with Joseph Horn and Garth Wilson. And it was from Garth I got the idea to extend my CLR program to include a simple status line with the current week number, the current moon phase (percentage of illumination of the moon) as well as the time remaining to the next upcoming alarm, if any.
The program is simply run by XEQ “CLR”. This clears all register, stack and Alpha as well as setting the right combinations of flags. It returns with zero in the display. If you press R/S it will prompt for “DATE^TIME” if the clock has been reset (DATE, Enter, TIME) and then display a status line: (ALARM) WEEK# MOON% – Example: “01:32 27 -35%” which shows it is 1 hour and 32 minutes till the next alarm goes off (no such number if there are no future alarms), it is week #27 and the moon is illuminated 35% and it is waning (a positive number means the phase is waxing/growing). Pressing R/S again shows the running clock (the CLOCK command). You can also access the status line (and then the clock by pressing R/S) by XEQ “STATUS” without having to clear registers, stack and Alpha first (thanks Anette).
Here’s the program listing.
Hope this is of use to someone 🙂