[41CL] Rescue from 'Lost Y Functions'


I'm a little late to the -41CL party, so please excuse me if someone has posted this information before.

As we all know (from reading the manual, or making the mistake ourselves), if the MMU is enabled without one of the three Y function ROMs addressed in the MMU, the Y functions will be lost until the batteries are removed.

However, this is not exactly true.

If a Clonix (NoVRAM, NoV32, or NoV64) module is programmed with one of the Y function ROMs, then it may be used to regain 'control' of the Y functions.

After turning off the -41CL, inserting the properly programmed Clonix, and turning the -41CL back on, the MMUDIS function is available to set the -41CL to finding the YFNZ ROM at Page 7 again.

This saves the risk of Memory Lost (and reseting the Time/Date/Accuracy Faction) from removing the batteries to disable the MMU.


Nice tip Dan, thanks for sharing it.

I added one of those "recovery gates" in the PowerCL - function YFNZ? will disable the MMU in case the YFNS ROM isn't found. Naturally this requires the PowerCl to be present in the system (ie. configured in the MMU), thus a bit of a catch-22 - but there are instances where it's very useful.



Another 41CL user (Doug Fields) suggested adding a command to the Timer module that is identical to an MMUDIS so that one could always get back to a state where the YFNZ was available. I have actually done that, and the modified .rom file is available, but haven't loaded it into a CL to try it out yet. I am happy to send a copy to anyone with a board that supports the MAPEN function to try it out.


I tried out Monte's new Time ROM image that includes the 'YRES' function. The 'YRES' (Y functions restore) function disables the MMU, recovering from a 'Lost Y Functions' condition caused by not having one of the Y functions ROMs plugged into a port when enabling the MMU, or from unplugging it, or plugging something in over the top of it when the MMU is enabled.

Basic testing revealed that it worked well. So well in fact that it is possible to consider not having a Y functions ROM plugged in as a normal condition. However, without any Y functions ROM in a port, the ability to store the 'hidden bits' (ROM/RAM, Stack Enable, and Private) or the Turbo mode when the 41CL is turned off is disabled. So, the unit comes always comes back in in non-Turbo mode. To restore Turbo mode, The YRES function would be executed, the 41CL turned off and back on, and then the MMUEN would restore the previous configuration.


Did you replace the TIme Module image in the OS area or used a duplicate in another address?


I loaded it into RAM and used the MMU and MAPEN function to map it into page 5. I did not map any other pages, i.e. the MMU entries for all other pages were '0000'.


I forgot to mention, Monte's test version of the Time ROM has all of the 'slow down' instruction bits cleared. All functions in this test ROM run at full speed. The standard version of this ROM have all instructions running at 1X speed.

The functions that I tested (TIME, CLOCK, DATE, RCLAF, SETAF, XYZALM, ALMCAT, ADATE, ATIME) all seemed to work OK, however the catalog seemed to go by a little fast, and the alarm sequence of displays and beeps were sped up.


Monte gave me a new copy of the customized Time ROM. This version has the 'slow down' instruction bits set only where necessary, and still includes the new 'Y functions restore' (YRES) function.

My initial testing has verified that the Time functions that did not behave well when Turbo was enabled (ALMCAT [CAT 5], Notification Alarms, and Past Due Alarm notifications) now work fine. I've done the testing by using the MAPEN functionality to map the new Time rom image from RAM, and I am close to the point of flashing the Time Rom page in the protected sector at flash memory page 006 to complete my testing.

This new version of the Time ROM has two benefits over the original one shipped with the 41CL (the original was a duplicate of the HP-41CX Time functions page, with all instructions tagged to run at 1X speed).

1. Only those instructions that need to run at '1X' speed are flagged for 1X execution. This enables most of the Time functions to take advantage of the selected Turbo mode. I have not noticed any difference during keyboard execution, but in theory, programs with Time functions in them will benefit when Turbo is enabled.

2. The insertion of a new function 'YRES' that works just like 'MMUDIS', but is available even when no CL Extra Functions are currently mapped to memory. Normally, recovery from this state requires the batteries to be removed (for > 11 seconds on my unit) in order for the MMU enabled bit to be reset and YFNZ functions be made available in page 7 again. Now, as the Time functions are always available (assuming no advanced OS remapping) it is possible to recover from a 'lost Y functions' with a single command.

The Time functions headers are now '-TIME 3A' and '-CL TIME', which are visual clues that the adjusted Time Rom is installed.


sounds great!, thanks for the update. I'll definitely get to that as soon as I recover from the PC crash that has turned all my programming environment upside down for the last two weeks.


I have not done much testing, but I took the leap and burned the new TIME 3A rom into page 006 of flash memory. No issues yet.


It's really unfortunate that the Time ROM is pretty much completely full, because it has 26 precious FAT entries available. If it wasn't so dangerous (because the OS makes calls directly into Page 5) I might consider moving stuff around to make use of those FAT entries.

Along those same lines, the X-Functions in Page 3 has the FAT completely full, but about 180 words of code space available in the ROM. Right now I am considering using the space for a couple of routines that will implement on-demand paging, with a four-level stack for each MMU entry in memory. This will allow code to dynamically switch in pages temporarily, making almost unlimited code space available for a function.


Could you use the TIME rom FAT entries to jump to stubs that jump to page 3? It isn't like either of these pages are going to move or not be present.

- Pauli


The problem is that the FAT entry points to the name label, which has to be in the same page, and then it's two words for a jump. So even with a two-charater name it requires at least four words beyond the two words of the FAT entry. I think there might be room for one function with a two-character name. But I really want to use the available space in Page 3 for the demand paging routines... so I think we're out of luck.


I don't know if you have already done this for YRES but here's some ideas:

1. The "code" in addresses 0x504C to 0x505C is just the section headers. I think it'll be pretty safe to move that down (say for instance to 0x5D44). This will free eight FAT entries.

2. Doing a similar move in page#3 should be no problem - you can take the CLKEYS function down, just 10 bytes to move. This will free up one FAT entry in the XFNS as well.



That's exactly what I did in the Time module. But the XFNS FAT is already full.


I'm pretty sure there's still one free entry in the XFNS FAT... in fact I used that trick already in an alternate version of the OS I got installed on V41.


I've completed the testing of the new '-TIME 3A' Rom. I executed all standard and CX time functions, spending considerable time on alarms, and found no issues.

Good work Monte!


Dan, thank you for your testing. I'll probably start loading this image onto the remaining CL boards.


Hi there,

Thanks for sharing Dan, it's good to know of yet another useful procedure for the Clonix/NoV family... ;-)

All the best from Caribbean.


Possibly Related Threads...
Thread Author Replies Views Last Post
  HP-41CL setup troubleshooting Xavier A. (Brazil) 2 728 12-02-2013, 06:29 AM
Last Post: Xavier A. (Brazil)
  More Prime problems - lost Apps key again Michael de Estrada 10 1,209 11-16-2013, 12:46 PM
Last Post: Michael de Estrada
  [41CL] New Extra Functions version Monte Dalrymple 0 437 11-08-2013, 04:32 PM
Last Post: Monte Dalrymple
  HP Prime: in need of help with defining functions Alberto Candel 14 1,703 10-27-2013, 10:48 AM
Last Post: Alberto Candel
  HP Prime spreadsheet functions SanS 0 927 10-04-2013, 04:23 AM
Last Post: SanS
  Stats functions on the HP34S Nicholas van Stigt 5 799 09-24-2013, 02:45 AM
Last Post: Nick_S
  So, latest 41CL / Library 4 config is... Gene Wright 4 795 09-22-2013, 02:59 AM
Last Post: Ángel Martin
  Trig Functions Howard Owen 11 1,366 09-16-2013, 02:53 PM
Last Post: Fred Lusk
  50g piecewise functions Kurt Fankhauser 6 840 09-15-2013, 08:01 PM
Last Post: Kurt Fankhauser
  HP-41CL anyone? Matt Agajanian 8 1,112 08-31-2013, 12:27 AM
Last Post: Sylvain Cote

Forum Jump: