Post Reply 
HP 41CX/Swiss Micros DM41X and XROM
08-04-2021, 02:01 PM
Post: #2
RE: HP 41CX/Swiss Micros DM41X and XROM
(08-04-2021 01:26 PM)Eddie W. Shore Wrote:  To make sure that I am understanding correctly: is XROM a place holder, which allows programs to be transferred to calculators which do or do not have the Math ROM?

For example: to calculate tanh(x+1):

01 LBL^SAMPLE
02 1
03 +
04 XROM 1,35
05 END

I am to assume that a program like this would only work with calculators containing the Math ROM.

That's right. When you insert a ROM-based function into a program, it really only inserts the XROM instruction, in this case, it is the 35th function in a module with ROM ID=1. When the MATH ROM is installed, it provides the text name "TANH" for you to see in PRGM mode, but when it is not installed, you can only see the underlying XROM 1,35.

Also, note that the program does not care which ROM is installed, it will still use the 35th function in the first (lowest port/page) module that has ROM ID=1. So if you entered the above program with the MATH module installed (and line 04 would appear as TANHX), but then later removed that and installed EDDIE'S ROM, which had ROM ID=1 and that had functions in it named FN01, FN02...FN35, and you entered PRGM mode, line 4 would appear as FN35 (and would execute what that function did, and not execute TANH as that code is not installed)

As there are only a limited (00-31) number of ROM ID's, HP was careful to select IDs for the ROMs they made, using judgement of which applications were unlikely to be installed by the same user at the same time, so there would be no collision of ROM ID instructions.

HP did however create several ROMs with the same ROM ID, again making some informed guess of which would not be needed at the same time, and it labeled these modules with a trailing "X" in the name of the ROM, such as "AVIATION X" and "SECURITIES X" (which both use ROM ID=19), guessing that no users would ever need both of these modules inserted at the same time, nor would they write any single programs which needed functions from both modules.

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP 41CX/Swiss Micros DM41X and XROM - rprosperi - 08-04-2021 02:01 PM



User(s) browsing this thread: 1 Guest(s)