The Museum of HP Calculators

HP Articles Forum

[Return to the Index ]
[ Previous | Next ]


41-MCODE: Breaking the FAT Barrier

Posted by Ángel Martin on 3 Sept 2012, 6:16 a.m.

Breaking the 64-Entries FAT barrier: Multi-function groups.

The following article describes the most important considerations about the Multi-Functions implementation, highlighting their advantages and few shortcomings. The author has used the excellent HEPAX implementation as starting basis, adding functionality to the original design to improve usability and ease of use – while adapting it to the POWERCL structure.

Definition: A multi-function group consists of a set of sub-functions not included in the main FAT, but that nevertheless can be called individually using dedicated launchers by their own name or index within the group. Furthermore, they can also be used in a program using the same method – thus those launchers shall be “programmable” and have the necessary logic to invoke the appropriate sub-function upon request.

Examples in the HEPAX are the XF/XFA group and the HEPAX/HEPAXA group.

Benefits of the Multi-Function groups.

1. Unlimited number of sub-functions within each group.
2. Sub-functions can be grouped in separate FATs
3. Sub-functions can be called by Name and by index
4. They are all programmable, using the non-merged scheme.

Limitations of the original HEPAX implementation:

1. Two main functions (per each Multi-Function group) are required in order to access them by name and by index. On the HEPAX the examples were XF/XFA, as well as HEPAX/HEPAXA.
2. No CATALOG was available to list/enumerate the sub-functions included under each group.
3. Individual sub-functions can’t be assigned to a key.
4. Sub-functions can’t be prompting functions.
5. Since they’re usually allocated on secondary banks, they can’t use the Partial Data Entry technique (light sleep re-activates bank-1).

Naturally the goal in was to overcome as much as possible many if not all of the limitations, which with the exception of them being assignable has been accomplished – plus a couple of extras have been thrown in to round up the functionality:-

Improving on such a masterpiece has been possible thanks to the initial implementation being so well structured and designed: wonderful programming to beging with!

With a little effort and more available space (thanks to the Library#4 assistance!),here are the main changes and additions made.  

Enhancements to the HEPAX original added in the POWERCL.

1. Two Multi-Function groups are implemented (FAT1 and FAT2), with a total of 154 functions distributed in two FATs as follows:
a. FAT1 for the replaced YFNS, plus extra functions - with 68 entries
b. FAT2 for ALPHA/Buffer/XXM functionality, with 86 entries.

2. A Catalog function is available under each of the MF groups. It can be invoked by its name (“FCAT”) or its index (00). Same name, same index (in fact same code) for the two FATs.
a. CATalogs can be stopped and single-stepped (using R/S, then SST/BST).
b. Direct execution of the sub-function is available pressing the XEQ key in manual mode.
c. Section headers (function names starting with “-“) are also supported pressing “ENTER^” while in SST mode.
d. The listing will be printed if TRACE/NORM is set.

3. The Numeric launchers have been merged into a single function (“XFAT _ _, _ _”) with two-parameter prompts. The first one refers to the FAT group, and the second to the index within it. So only ONE entry is used in the ROM’s main FAT.
a. Using “03” or higher will be ignored during the data entry (not as after-execution error).
b. Additionally, using “00” in the first prompt will invoke the “XROM _ _ ,_ _” function.

4. The ALPHA launchers “XEQ1” and “XEQ2” will search for sub-functions within their own FAT.
a. “XEQ2” will also search within FAT1 if the function name wasn’t found in FAT2
b. If it’s still not found, the search will continue in the main FAT (FAT0), and even through all modules currently present on the system. “XEQ2” can be used as “universal launcher” for XROM functions and sub-functions – but not for mainframe or programs.

5. A global XEQ launcher is also available for convenient grouping of all options. This would be the ideal one to assign to a key, or can be called upon the main CL launcher by pressing the [SHIFT] key.
Its choices are prompted as follows: XXEQ 0:1:2:F:R:M

• “0” will default to the mainframe “XEQ” function. At this point the execution is transferred to the OS, with all the same functionality available (IND, Alpha, top rows).
• “1” will call “XEQ1”, the Alpha launcher for FAT1
• “2” will call “XEQ2”, the Alpha launcher for FAT2, FAT1, and all main FATS present.
• “F” will call “XFAT”, followed by the two prompts for FAT# and Fnc index.
• “R” will call “XROM”, followed by the two prompts for XROM id# and Fnc. Id#
• “M” will call “XQXM”, to execute a program file in XMEM which name is in ALPHA.

That's all folks, hope this is interesting readign to you all. For a real life application, just download the POWERCL to your system and take it for a spin.

To end this article, once again my unabashed thanks and acknowledgment to Steen Petersen and the original programmers of the HEPAX module - they set a new standard above and beyond the 41 OS!

Edited: 3 Sept 2012, 7:22 a.m.

Password:

[ Return to the Message Index ]

Go back to the main exhibit hall