rom41cat - display the function names in a HP41 ROM image
lifutils rom41cat [-x][-a] < Input file [> Output_file ]
lifutils rom41cat [-x][-a] INPUTFILE [> Output_file ]
futils rom41cat -?
rom41cat reads the Function Address Table (FAT) at the start of an unscrambled HP41 ROM image and displays the names of the functions (both Mcode and user language (Focal)) contained in that ROM. Input is read either from standard input or the file specified by the command line parameter INPUTFILE.
If a ROM consists of multiple 4K ROM files they must be concatenated before feeding them into rom41cat The maximum size of concatenated ROM files is 16K. See the example below.
If the -x option is not given then the XROM numbers, entry address of the function, language and name are displayed on standard output.
If the -x option is given, then the XROM numbers and function name are displayed on standard output in a format that can be stored in a file and read into comp41 as an xrom definition file. Then comp41 can give the correct names to functions in this rom. In this case, the names of user language functions are displayed in the form XROM’name’
Use er41rom to unscramble Eramco rom image files before using rom41cat to display the function names contained therein.
|
-x |
Produce a comp41 xrom definition file | ||
|
-a |
Decompile the following non ASCII HP-41 FOCAL characters as Unicode characters: text append (hex 0x251c), greek small mu (hex 0x03bc), angle (hex 0x2280), not equal to (hex 0x2260), greek capital sigma (hex 0x03A3). In a xrom file function names containing these FOCAL characters are output as two text strings. The first string contains these characters as escaped hex codes, the second as Unicode characters. Note: xrom files created with this option are compatible with comp41 , decomp41 , keys41 but not with other software wich support xrom files. | ||
|
-? |
Print a message giving program usage to standard error. |
The format of the FAT and names for Mcode functions is given in HP-41 Mcode for Beginners (Ken Emery) The format of names for user language functions does not appear to be documented and was discovered by experiment.
If myrom.rom is an Eramco rom image file then
lifutils er41rom < myrom.rom | lifutils rom41cat
will display the function names, entry points and language to standard output, while
lifutils er41rom < myrom.rom | lifutils rom41cat -x > myrom.xrom
will produce an xrom definition file for comp41 containing the function names in myrom.rom
To create a xrom file for the Advantage Pac which consists of 3 ROM image files:
cat AdvL1-1B.rom AdvU1-1B.rom AdvU2-1B.rom | lifutils rom41cat -x -a > advantage.xrom (Unix, macOS)
or
copy /b AdvL1-1B.rom+AdvU1-1B.rom+AdvU2-1B.rom | lifutils rom41cat -x -a > advantage.xrom (Windows)
Some commonly used HP41 characters have no ASCII equivalents and are therefore displayed as \xnn hex escape sequences. Spaces in function names are replaced by underscores since comp41 can’t handle spaces in function names in xrom definition files. The ’geese’ are displayed as the corresponding punctuation characters.
rom41cat was written by Tony Duell, ard@p850ug1.demon.co.uk and has been placed under the GNU Public License version 2.0