HP-41CX w/ XF-Module - just curious
07-24-2019, 07:38 PM
Post: #1
 JurgenRo Member Posts: 176 Joined: Jul 2015
HP-41CX w/ XF-Module - just curious
I am aware that it makes no sense to run the X-Functions module in the HP-41CX as the CX has implemented a superset of the XF module. Still, I was wondering if the CX can address the memory registers of the XF module? I can't try it because I don't have an XF module ...
Greetings,
Jürgen
07-25-2019, 01:04 AM
Post: #2
 Sylvain Cote Senior Member Posts: 1,784 Joined: Dec 2013
RE: HP-41CX w/ XF-Module - just curious

1. The TIME ROM is built-in in the HP-41CX and available as a plug-in module for the HP-41C/CV
-> 4K Word ROM, hardwired to page 5
2. The Extended Functions/Memory ROM+RAM is built-in in the HP-41CX and available as a plug-in module for the HP-41C/CV
-> 4K Word ROM, hardwired to page 3 in the HP-41CX or plug-in port low page in the HP-41C/CV (page 8, 10, 12, or 14)
-> 128 RAM registers are hardwired from 64 (0x040) to 191 (0x0BF)
3. The CX Time & CX Extended Functions ROM (4K Word ROM) is built-in in the HP-41CX and not available as a plug-in module for the HP-41C/CV
-> 4K Word ROM, hardwired to page 5 bank 1 in the HP-41CX

If you plug a X-F/M module in a CX machine, it will work but it will give nothing more than what you already have and you will loose a 4K page address. (see point 2)
Also, since the internal module is in a lower page than the plug-in module the 41OS will always used the internal mcode and never the plug-in mcode.
As for the RAM, I have observed the same behaviour as the ROM, internal RAM is used instead of the external RAM, although I do not remember how the chip select works at the electronic level to make this append. (I will have to check the schematics)

Sylvain
07-25-2019, 10:36 AM
Post: #3
 Thott Member Posts: 53 Joined: Jul 2019
RE: HP-41CX w/ XF-Module - just curious
(07-25-2019 01:04 AM)Sylvain Cote Wrote:  [list=1]
[*]The TIME ROM is built-in in the HP-41CX and available as a plug-in module for the HP-41C/CV
[......]
[.....]

Sylvain

It helps me also.....

http://www.dg8fbv.de
41CX, Card R., Barcode R., X-Function, X-Memory, Advntg-Modul,
HP41 Printer, 82200A Touchpad, 48GX black LCD, 50g, Prime G2
07-25-2019, 12:44 PM
Post: #4
 burkhard Senior Member Posts: 369 Joined: Nov 2017
RE: HP-41CX w/ XF-Module - just curious
Sylvain's reply had a lot of really good information that went even beyond Jürgen's original question.
I'm still a little fuzzy on the answer to the narrow scope of his original question, though.

Just to be sure I understand, please allow me to rephrase it, as I understood it.

I think Jürgen was stating this:
•The CX with no plug-in modules added has 124 Extended Memory registers.
•There is an Extended Functions / Memory Module that is intended for the C and CV, not the CX.
•This module supplies Extended functions + 124 Ext. Mem registers when added to the C & CV for which it is intended.
•While a "naked" CX wouldn't need a second copy of the Extended functions, it *could* use more Extended Memory (it can hold 600 registers and only 124 are provided fromt he factory).

Which brings us to to the narrow question:
→So... Would the Extended Functions / Memory Module plugged into a CX add any Extended Memory? Would the user now have 248 (=2×124) extended registers?
07-25-2019, 01:00 PM (This post was last modified: 07-25-2019 05:01 PM by rprosperi.)
Post: #5
 rprosperi Super Moderator Posts: 5,290 Joined: Dec 2013
RE: HP-41CX w/ XF-Module - just curious
(07-25-2019 12:44 PM)burkhard Wrote:  Which brings us to to the narrow question:
→So... Would the Extended Functions / Memory Module plugged into a CX add any Extended Memory? Would the user now have 248 (=2×124) extended registers?

The following is theory and has not been tested.

The extra RAM is there of course, but cannot be accessed. The storage RAM in the CX is managed (initialized, read, written, etc.) by the code in the CX ROM, the storage RAM in the XFM (in a C/CV) is managed by the code in the XFM ROM, which is port-addressed.

Since the CX ROM is always in a lower port than the XFM ROM, this code will always be accessed first and will only manage the RAM it is aware of; the RAM in the XFM has never been initialized so cannot be recognized.

To be verified...

UPDATE: The above theory is NOT fully correct, but it does not change the basic answer.

With programs in CX XMEM, I installed an XFM. Doing a CAT-4 shows a corrupted file chain with jibberish characters in filenames and the catalog repeats the same files, but upon exiting, shows no increase in available XMEM (i.e. same amount free as before adding the XFM).

What is also interesting is with the XFM module installed, the EMROOM command is not found (EMROOM is one of the CX's added Extended Mem commands), so the above discussion of ROM addressing seems to not be fully correct either, so something more subtle is going on...

Bottom line is no, adding an XFM module to a CX does not provide additional Ext RAM for storage.

--Bob Prosperi
07-25-2019, 03:50 PM (This post was last modified: 07-25-2019 03:56 PM by Sylvain Cote.)
Post: #6
 Sylvain Cote Senior Member Posts: 1,784 Joined: Dec 2013
RE: HP-41CX w/ XF-Module - just curious
Just to set the information baseline ...

• CPU is able to directly address 64K word (10 bits) ROM or RAM
• the 64K address space is divided into 16 pages of 4K
• each 4K page can be bank switched (4 banked pages max, for a theoretical total memory memory of 256K)
• CPU native instruction is machine code (MCode) [not RPN]
• CPU native memory is 10 bits word [not registers]
List of system peripherals:
• RAM Registers (internal and/or plug in modules, including main and extended memory)
• Display (internal)
• Wand (82153A)
• Thermal Printer (82143A)
• HP-IL (82160A)
• Timer (82182A)
• Infra-Red (82242A)
About HP-41 Operating System (limited enumeration)
• 41OS C/CV size is 12K and is hardwired to pages 0, 1, 2
• 41OS CX size is 24K and is hardwired to pages 0, 1, 2, 3, 5 (Bank 0 & 1)
• 41OS implement an RPN language interpreter (aka FOCAL)
• 41OS store RPN data and programs into RAM registers (peripheral)
• 1 x RAM register has 56 bits (or 7 bytes, that size was directed by the CPU ALU register size of 56 bits)
• 1 x RAM register chip has 16 x RAM registers (or 112 bytes)
• 1 x Memory Module (82106A) has 4 x RAM register chips (64 registers or 448 bytes) [mapped to main memory space]
• 1 x Quad Memory Module (82710A) has 16 x RAM register chips (256 registers or 1792 bytes) [mapped to main memory space]
• 1 x X-Functions/Memory module (82180A) has 8 x RAM register chips (128 registers or 896 bytes, 4 registers are used for memory management) [mapped to extended memory spaces]
• 1 x X-Memory module (82181A) has 16 x RAM register chips (256 registers or 1792 bytes but only 239 registers are usable) [mapped to extended memory spaces]
About 41 Models (SM = Status Memory, MM = Main Memory, XM = eXtended Memory)
• HP-41C has 5 x RAM registers chip inside (1 for status and 4 mapped to main memory) [SM: 16 registers / MM:64 registers / XM: 0 registers]
• HP-41CV has 17 x RAM registers chip inside (1 for status and 20 mapped to main memory) [SM: 16 registers / MM:320 registers / XM: 0 registers]
• HP-41CX has 25 x RAM registers chip inside (1 for status, 20 mapped to main memory and 8 mapped to extended memory) [SM: 16 registers / MM:320 registers / XM: 128 registers]

See: HP-41 Memory Map

Sylvain
07-25-2019, 04:16 PM
Post: #7
 Sylvain Cote Senior Member Posts: 1,784 Joined: Dec 2013
RE: HP-41CX w/ XF-Module - just curious
(07-25-2019 12:44 PM)burkhard Wrote:  •The CX with no plug-in modules added has 124 Extended Memory registers.
Correct

(07-25-2019 12:44 PM)burkhard Wrote:  •There is an Extended Functions / Memory Module that is intended for the C and CV, not the CX.
Correct

(07-25-2019 12:44 PM)burkhard Wrote:  •This module supplies Extended functions + 124 Ext. Mem registers when added to the C & CV for which it is intended.
Correct

(07-25-2019 12:44 PM)burkhard Wrote:  •While a "naked" CX wouldn't need a second copy of the Extended functions, it *could* use more Extended Memory (it can hold 600 registers and only 124 are provided fromt he factory).
In a CX, you natively have 124 registers usable and you can insert 2 x Extended Memory module to bring it to 600 registers usable.
In a C or CV, you have to insert a X-F/M module first to get the first 124 registers usable and you can plug 2 x Extended Memory module to bring it to 600 registers usable.

(07-25-2019 12:44 PM)burkhard Wrote:  →So... Would the Extended Functions / Memory Module plugged into a CX add any Extended Memory? Would the user now have 248 (=2×124) extended registers?
Incorrect, the RAM part of the X-Function/Memory (inside the CX or in the plug-in module) is hardwired to memory address 0x040 to 0x0BF.
So when you plug a X-F/M module into a HP-41CX you create a bus contention because the internal module and the plug-in module actually fight to put their memory into the same address space.
I have tried it and observed that the internal module always wins, like I said before, I will have to check the electronic schematics to really know why that is the case.

Sylvain
07-25-2019, 05:11 PM
Post: #8
 rprosperi Super Moderator Posts: 5,290 Joined: Dec 2013
RE: HP-41CX w/ XF-Module - just curious
(07-25-2019 04:16 PM)Sylvain Cote Wrote:  [snip]
Incorrect, the RAM part of the X-Function/Memory (inside the CX or in the plug-in module) is hardwired to memory address 0x040 to 0x0BF.
So when you plug a X-F/M module into a HP-41CX you create a bus contention because the internal module and the plug-in module actually fight to put their memory into the same address space.
I have tried it and observed that the internal module always wins, like I said before, I will have to check the electronic schematics to really know why that is the case.

Sylvain

When I inserted an XFM into a CX with multiple files stored, CAT-4 showed the first file (in the CX XMEM) and then jibberish characters, apparently confused by the bus contention Sylvain mentions. Though I wonder why the first file was intact. Upon removing the XFM module, the file chain in the CX XMEM was still intact, and I restored a file to verify the contents were also intact.

But I am curious why the CX's extra XFM ROM functions were not visible? If the internal ROM wins (due to lower page address) why would the extra CX XF Fns be hidden?

--Bob Prosperi
07-25-2019, 05:29 PM (This post was last modified: 07-25-2019 05:33 PM by Sylvain Cote.)
Post: #9
 Sylvain Cote Senior Member Posts: 1,784 Joined: Dec 2013
RE: HP-41CX w/ XF-Module - just curious
(07-25-2019 05:11 PM)rprosperi Wrote:  But I am curious why the CX's extra XFM ROM functions were not visible? If the internal ROM wins (due to lower page address) why would the extra CX XF Fns be hidden?

CAT 2 should show all ROMs, internal and external, in my case I get:
Code:
-TIME  2C    (cx internal module, page 5 bank 0) -CX TIME     (cx internal module, page 5 bank 1) -EXT FNC 1B  (plug-in module, page 8 -> module inserted into slot 1) -EXT FNC 2D  (cx internal module, page 3) -CX EXT FNC  (cx internal module, page 5 bank 1)

If I remember correctly, in a C/CV, CAT 2 start its scan at page 5 while in a CX CAT 2 start its scan at page 3 but skip page 4.
When you execute a ROM function or a ROM FOCAL routine the 41OS follow the same search pattern as CAT 2.
07-25-2019, 05:42 PM (This post was last modified: 07-25-2019 05:43 PM by Sylvain Cote.)
Post: #10
 Sylvain Cote Senior Member Posts: 1,784 Joined: Dec 2013
RE: HP-41CX w/ XF-Module - just curious
(07-25-2019 05:11 PM)rprosperi Wrote:  When I inserted an XFM into a CX with multiple files stored, CAT-4 showed the first file (in the CX XMEM) and then jibberish characters, apparently confused by the bus contention Sylvain mentions. Though I wonder why the first file was intact. Upon removing the XFM module, the file chain in the CX XMEM was still intact, and I restored a file to verify the contents were also intact.
In a system that is not build to handle bus-contention, when a bus-contention event append, it either create a bus/system lock-up or cause the system to be unpredictable.
I have not made extensive tests with the extended memory content when a X-F/M in inserted in a 41CX, so my basic result could not be taken as a reference, it could be that I was just lucky.
07-25-2019, 07:00 PM
Post: #11
 JurgenRo Member Posts: 176 Joined: Jul 2015
RE: HP-41CX w/ XF-Module - just curious
(07-25-2019 12:44 PM)burkhard Wrote:  Sylvain's reply had a lot of really good information that went even beyond Jürgen's original question.
I'm still a little fuzzy on the answer to the narrow scope of his original question, though.

Just to be sure I understand, please allow me to rephrase it, as I understood it.

I think Jürgen was stating this:
•The CX with no plug-in modules added has 124 Extended Memory registers.
•There is an Extended Functions / Memory Module that is intended for the C and CV, not the CX.
•This module supplies Extended functions + 124 Ext. Mem registers when added to the C & CV for which it is intended.
•While a "naked" CX wouldn't need a second copy of the Extended functions, it *could* use more Extended Memory (it can hold 600 registers and only 124 are provided fromt he factory).

Which brings us to to the narrow question:
→So... Would the Extended Functions / Memory Module plugged into a CX add any Extended Memory? Would the user now have 248 (=2×124) extended registers?

Exactly!
07-25-2019, 07:06 PM (This post was last modified: 07-25-2019 07:06 PM by Sylvain Cote.)
Post: #12
 Sylvain Cote Senior Member Posts: 1,784 Joined: Dec 2013
RE: HP-41CX w/ XF-Module - just curious
(07-25-2019 07:00 PM)JurgenRo Wrote:
(07-25-2019 04:16 PM)Sylvain Cote Wrote:
(07-25-2019 12:44 PM)burkhard Wrote:  →So... Would the Extended Functions / Memory Module plugged into a CX add any Extended Memory? Would the user now have 248 (=2×124) extended registers?
Incorrect, the RAM part of the X-Function/Memory (inside the CX or in the plug-in module) is hardwired to memory address 0x040 to 0x0BF.
So when you plug a X-F/M module into a HP-41CX you create a bus contention because the internal module and the plug-in module actually fight to put their memory into the same address space.
Exactly!
It would seems that I was too technical and thus not clear enough, the simple answer is no, even if you plug a X-F/M into a CX you still only have 124 registers available.
07-25-2019, 08:13 PM
Post: #13
 burkhard Senior Member Posts: 369 Joined: Nov 2017
RE: HP-41CX w/ XF-Module - just curious
(07-25-2019 07:06 PM)Sylvain Cote Wrote:  It would seems that I was too technical and thus not clear enough, the simple answer is no, even if you plug a X-F/M into a CX you still only have 124 registers available.

Crystal clear!
Thanks Sylvain (and Bob as well) for the good information!
07-25-2019, 08:38 PM
Post: #14
 JurgenRo Member Posts: 176 Joined: Jul 2015
RE: HP-41CX w/ XF-Module - just curious
(07-25-2019 07:06 PM)Sylvain Cote Wrote:
(07-25-2019 07:00 PM)JurgenRo Wrote:  Exactly!
It would seems that I was too technical and thus not clear enough, the simple answer is no, even if you plug a X-F/M into a CX you still only have 124 registers available.

That is the answer I was after! Thanks a lot, Sylvain, and the others who contributed to the discussion!
07-26-2019, 01:10 AM
Post: #15
 rprosperi Super Moderator Posts: 5,290 Joined: Dec 2013
RE: HP-41CX w/ XF-Module - just curious
(07-25-2019 05:29 PM)Sylvain Cote Wrote:
(07-25-2019 05:11 PM)rprosperi Wrote:  But I am curious why the CX's extra XFM ROM functions were not visible? If the internal ROM wins (due to lower page address) why would the extra CX XF Fns be hidden?

CAT 2 should show all ROMs, internal and external, in my case I get:
Code:
-TIME  2C    (cx internal module, page 5 bank 0) -CX TIME     (cx internal module, page 5 bank 1) -EXT FNC 1B  (plug-in module, page 8 -> module inserted into slot 1) -EXT FNC 2D  (cx internal module, page 3) -CX EXT FNC  (cx internal module, page 5 bank 1)

If I remember correctly, in a C/CV, CAT 2 start its scan at page 5 while in a CX CAT 2 start its scan at page 3 but skip page 4.
When you execute a ROM function or a ROM FOCAL routine the 41OS follow the same search pattern as CAT 2.

Those CAT-2 results imply XEQ-ing EMROOM should work, since it is in "-CX EXT FNC", which is seen in your results, but when I tested this, it is not found. Did you try to [XEQ] "EMROOM" with the XFM installed in a CX?

--Bob Prosperi
07-26-2019, 02:46 AM
Post: #16
 Sylvain Cote Senior Member Posts: 1,784 Joined: Dec 2013
RE: HP-41CX w/ XF-Module - just curious
(07-26-2019 01:10 AM)rprosperi Wrote:
(07-25-2019 05:29 PM)Sylvain Cote Wrote:  If I remember correctly, in a C/CV, CAT 2 start its scan at page 5 while in a CX CAT 2 start its scan at page 3 but skip page 4.
When you execute a ROM function or a ROM FOCAL routine the 41OS follow the same search pattern as CAT 2.
Those CAT-2 results imply XEQ-ing EMROOM should work, since it is in "-CX EXT FNC", which is seen in your results, but when I tested this, it is not found. Did you try to [XEQ] "EMROOM" with the XFM installed in a CX?
Robert,
You are right, I tried it and the plug-in module hide the internal module for both X-F/M and TIME modules.
As a test, without any plug-in modules, I have switched to program mode and entered all the CX X-Fncs and CX Time functions.
Without the modules I can see the functions name (ex: EMROOM) but when I plug the X-F/M and the TIME modules I see the XROM's instead (ex: XROM 25,53)
I wonder if the same behaviour apply to the hardwired printer ROM (page 6, XROM 29,XX) and HP-IL (page 7, XROM 28,XX).
So, right now we can assume that the 41OS CX version behave like the 41OS C/CV version for page priority.
Also, we can say that the 41OS in general start searching at least from page 6 before looking at the lower pages.
The remaining question is does the search start at page 6 or at page 8.
I will do a test setup this weekend that will clarify this point and will come back with the result.
Sylvain
07-26-2019, 04:36 AM
Post: #17
 Ángel Martin Senior Member Posts: 1,341 Joined: Dec 2013
RE: HP-41CX w/ XF-Module - just curious
The BUS search order is dictated by the mainframe MCODE. It always starts at page 5, moving up until page F. When the CX was released HP added a new page at the END of the search, page #3 - that's why 3 in the CAT 2 is shows the last.

So when you XEQ EMROOM, the OS finds the XROM #26 first corresponding to the external X-Funct module. It scans that FAT and notices that the id# in question is not there, so it puts out NONEXISTENT - without continuing the search along the BUS and threfore never reaching page #3 (the "last" one).

The same happens if you plug two different modules with the same XROM id#, and the first one has fewer functions than the second: only functions from the first one are found.

It's all in the MCODE ;-)

Cheers,
ÁM
07-26-2019, 01:07 PM
Post: #18
 rprosperi Super Moderator Posts: 5,290 Joined: Dec 2013
RE: HP-41CX w/ XF-Module - just curious
(07-26-2019 04:36 AM)Ángel Martin Wrote:  The BUS search order is dictated by the mainframe MCODE. It always starts at page 5, moving up until page F. When the CX was released HP added a new page at the END of the search, page #3 - that's why 3 in the CAT 2 is shows the last.

So when you XEQ EMROOM, the OS finds the XROM #26 first corresponding to the external X-Funct module. It scans that FAT and notices that the id# in question is not there, so it puts out NONEXISTENT - without continuing the search along the BUS and threfore never reaching page #3 (the "last" one).

The same happens if you plug two different modules with the same XROM id#, and the first one has fewer functions than the second: only functions from the first one are found.

It's all in the MCODE ;-)

Cheers,
ÁM

Thanks very much Angel for the explanation. Like so many things, it makes perfect sense once someone has explained it to you! I did not consider that the XROM search halts when reaching the end of the first ROM with matching XROM number, but as you say it makes sense, since one is not supposed to install more than 1 ROM module at a time with the same XROM # (as in all the "X" modules HP released).

And I suppose HP added Page-3 at the end of the existing C/CV CAT-2 search, as it was simply easier to just add this onto the end of the existing code. I have always wondered why the CX shows XFM and CX XFM at the end of the CAT-2 listing.

Thanks for clearing up these mysteries!

My view is slightly different than yours - It's all in Angel's head!

--Bob Prosperi
07-26-2019, 01:09 PM (This post was last modified: 07-26-2019 01:10 PM by Sylvain Cote.)
Post: #19
 Sylvain Cote Senior Member Posts: 1,784 Joined: Dec 2013
RE: HP-41CX w/ XF-Module - just curious
(07-26-2019 04:36 AM)Ángel Martin Wrote:  The BUS search order is dictated by the mainframe MCODE.
A post from the hp-41 master itself

(07-26-2019 04:36 AM)Ángel Martin Wrote:  It always starts at page 5, moving up until page F.
That was what I thought I knew.

(07-26-2019 04:36 AM)Ángel Martin Wrote:  When the CX was released HP added a new page at the END of the search, page #3 - that's why 3 in the CAT 2 is shows the last.
Make sense.

(07-26-2019 04:36 AM)Ángel Martin Wrote:  So when you XEQ EMROOM, the OS finds the XROM #26 first corresponding to the external X-Funct module.
It scans that FAT and notices that the id# in question is not there, so it puts out NONEXISTENT - without continuing the search along the BUS and threfore never reaching page #3 (the "last" one).
The same happens if you plug two different modules with the same XROM id#, and the first one has fewer functions than the second: only functions from the first one are found.
Again, that was what I thought I knew.

Then how do you explain the internal time module at page 5 case:
1. OFF
2. remove all the plug-in modules
3. ON
4. PRGM
5. XEQ "RCLALM" (CX TIME function)
6. OFF
7. insert TIME plug-in module
8. ON
9. PRGM
10. XROM 26,34 (CX TIME function not understood by TIME plug-in module)

(07-26-2019 04:36 AM)Ángel Martin Wrote:  It's all in the MCODE ;-)
Yeah, yeah, I tried several months ago to go back into the game but I failed, I simply do not have the free time to do so.

Sylvain
07-26-2019, 01:23 PM
Post: #20
 Ángel Martin Senior Member Posts: 1,341 Joined: Dec 2013
RE: HP-41CX w/ XF-Module - just curious
(07-26-2019 01:09 PM)Sylvain Cote Wrote:  Then how do you explain the internal time module at page 5 case:
1. OFF
2. remove all the plug-in modules
3. ON
4. PRGM
5. XEQ "RCLALM" (CX TIME function)
6. OFF
7. insert TIME plug-in module
8. ON
9. PRGM
10. XROM 26,34 (CX TIME function not understood by TIME plug-in module)

The time module is a tad more complicated than the XF or others, because the page address is hard-wired. This means that both the internal CX Time and another TIME module plugged into the CX will both be configured "simultaneously" so to speak, regardless of the physical address used by that external TIME module..

It's only when you try to execute it (either manually or in a running program) then the OS kicks in, via the [GTRMAD] or [ARSCH] routines depending on the cases). Somehow the external one prevails over the built-in counterpart...

BTW this may also be taken advantage of by the CL, which comes with the Time ROM loaded but there's no TIME circuitry: when you plug an external physical TIME module to it that's the one that gets the deal, so to speak. Not sure it's the same mechanism but it'd make sense...

ÁM
 « Next Oldest | Next Newest »

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