71B: Overriding a HP-IL ROM 1A
|
04-13-2021, 03:45 PM
Post: #1
|
|||
|
|||
71B: Overriding a HP-IL ROM 1A
In another thread, Dave asked:
(04-12-2021 05:52 PM)Dave Frederickson Wrote: We know that the HP-IL ROM can't be upgraded by copying the version 1B LEX file to the 71, presumably because the HP-IL ROM is in Port 0.05 and has a higher "priority" than a LEX file in RAM or plug-in ROM. But then why does configuring the JPC ROM in a lower numbered port than a copy of the 1B HP-IL LEX file allow the ROM to be upgraded? Since the answer is long, I preferred to open a new thread. So, here we are: Each time the system is reconfigured (including every power-on), a list of LEX files is created by scanning the main memory and the ports. The order is : main memory, then ports in ascending order with file order inside main/ports. The built-in (mainframe) keywords are searched in the last place as they aren't in any "port". This list is saved in a system buffer and is used by the OS when searching for a keyword. So yes you can't override the HP-IL ROM simply by installing a copy of the HPIL LEX 1B, since you should put the new HPIL LEX before port 0.05 and built-in ports 0.00-0.003 are 4KB only, and is not possible to put the HPIL LEX in main RAM (don't try that!). The JPC ROM overrides the HPIL messages by using a short LEX of the same ID (#FF) with the new messages and no keyword. To take precedence relative to the HPIL ROM, this HPILMSG LEX includes a small piece of code that is run just after configuration to put itself before the HPIL ROM in the LEX list inside the system buffer. This is visible by looking at the VER$ result. For instance, starting with a 71B with a Math ROM in port 1 and the HP-IL, you get VER$ = "HP71:2CDCC HPIL:1B MATH:2B " HPIL is before Math because it is in port 0.05, before port 1. Plugging JPC ROM in port 5, you could expect to get: "HP71:2CDCC HPIL:1B MATH:2B JPC:F05 " Instead you get: "HP71:2CDCC MATH:2B JPC:F05 HPIL:1B" What happened? The JPC ROM is actually the merge of 3 LEXs, the main JPC LEX (that answers to VER$) PEEKLEX to override the built-in PEEK/POKE and HPILMSG. So the LEX list created after configuration is: HPIL MATH JPCLEX PEEKLEX HPILMSG (other LEX) What happened is that HPILMSG put itself before HPIL by swapping the two entries in the list, that became: HPILMSG MATH JPCLEX PEEKLEX HPIL (other LEX) This is the reason why you can override a HPIL:1A ROM with the FRAM71 or the Multimod by putting both JPC ROM and the new HPIL:1B LEX (before JPC ROM, in port order): The LEX list is created as: HPIL1A (some other LEX) HPIL1B (some other LEX) JPCLEX PEEKLEX HPILMSG (other LEX) but then HPILMSG swaps itself with the 1st HPIL instance (HPIL1A) to give: HPILMSG (some other LEX) HPIL1B (some other LEX) JPCLEX PEEKLEX HPIL1A (other LEX) Et voilĂ , HPIL1B is before HPIL1A and takes precedence, and the HPIL messages are still correctly replaced by the JPC ROM :-) J-F Sorry if it may seem a bit obscure, I'm afraid I can't explain better, at least it is now documented here. |
|||
04-13-2021, 04:28 PM
Post: #2
|
|||
|
|||
RE: 71B: Overriding a HP-IL ROM 1A
Very clever! Thanks for the explanation, J-F.
|
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)