Post Reply 
(41) program/function label/name ROM pages "path"
03-01-2019, 11:25 PM
Post: #1
(41) program/function label/name ROM pages "path"
Just getting into my 41CL, and something I can't find mentioned in the 41 manuals, which I may have missed…

If a FOCAL program label or M-code function name is present in more than one ROM module's FAT, how does the 41 OS decide which one to execute?

Since ROM modules e.g. AMC OS/X are able to override OS functions like CAT, I assume that ROM modules in pages 6 and up override the OS ROM pages 0–2. But what's the search order? Is it just reversed, e.g. page 15 -> page 0? And where do FOCAL program labels in main memory fit into that sequence?

Does any utility ROM have a function to either show all memory/ROMs that provide a given name/label, or alternatively show where a name/label is found, like UNIX shells' which/whence commands?

thanks very much…

Cambridge, UK
41CL/DM41X 12/15C/16C DM15/16 17B/II/II+ 28S 42S/DM42 32SII 48GX 50g 35s WP34S PrimeG2 WP43S/pilot/C47
Casio, Rockwell 18R
Find all posts by this user
Quote this message in a reply
03-02-2019, 02:36 AM
Post: #2
RE: (41) program/function label/name ROM pages "path"
FOCAL programs don't store a ROM program/function's name, it stores the analogous XROM XX,NN for that program/function in the ROM.

User programs (CAT-1 and I believe CAT-2) are searched before CAT-3, so a user program can essentially 'take over' a built-in function (e.g. if you make a program with global label "MOD", later when you XEQ "MOD", your function is called, not the OS function).

That aside, I believe the system scans pages 4-F in increasing order looking for a global label to match if executed manually, or when entering a program.

But once XROM XX,NN is encoded in a program for some function, it will run the first one matching that value that it finds as it searches, even if it's not the same ROM that was present (or possibly in a lower age) when the program was stored.

This is why HP labeled many of their later ROMs with "X" - they all shared the same XROM "XX" of 19. The label X was to remind you to not have multiple inserted at the same time, and generally to be aware of the common XROM usage.

I can't comment on MCODE, though I'd guess it follows the same rules; otherwise I imagine things would get messy...

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
03-02-2019, 05:56 PM
Post: #3
RE: (41) program/function label/name ROM pages "path"
(03-02-2019 02:36 AM)rprosperi Wrote:  User programs (CAT-1 and I believe CAT-2) are searched before CAT-3, so a user program can essentially 'take over' a built-in function (e.g. if you make a program with global label "MOD", later when you XEQ "MOD", your function is called, not the OS function).

That aside, I believe the system scans pages 4-F in increasing order looking for a global label to match if executed manually, or when entering a program.

Thanks very much indeed Bob.

I was confused since I'd convinced myself that since AMC_OS/X (for example) appears to take over the CAT & XEQ commands, that meant the ROM modules' pages' FATs must be searched before the OS ROM pages 0–2. I now realise that it doesn't take over those commands, it instead appears to remap/intercept those keys, to call its own versions of those commands. Or something Smile



This all came up because of another problem I was having: I'd loaded OSX3, but I wasn't getting its versions of CAT/XEQ. It was definitely loaded: I could call its other functions directly, but I was getting the OS versions of CAT/XEQ when I pressed those keys.

This confused me for some time, before I stumbled over an older post of yours, for which many thanks.

I had the modules mapped in this order:

4 4LIB
6 YFNX
7 OSX3

since I installed YFNX first, of course, and so chose the first free port, then installed OSX3 after.

And that was indeed the problem: I started again, this time with OSX3 in page 6 and YFNX in page 7, and now the CAT & XEQ keys are getting me the OSX3 versions. So thank you again for that.

[I'm aware of the restrictions on pages 6 & 7, but I don't (yet) need either printer or HP-IL support, and both YFNX & OSX3 are officially page6-safe]

If Monte or Ángel are reading: would you please consider making a note of the OSX3/YFNX/PWRX page-ordering restrictions in one of the relevant manuals? Apologies if it is in there, but I don't remember any mention of OSX3 needing to be in a lower page than YFNX, for example. There may have been an example showing it that way, but not that it had to be that way.

All good now, thanks again.

Cambridge, UK
41CL/DM41X 12/15C/16C DM15/16 17B/II/II+ 28S 42S/DM42 32SII 48GX 50g 35s WP34S PrimeG2 WP43S/pilot/C47
Casio, Rockwell 18R
Find all posts by this user
Quote this message in a reply
Post Reply 




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