PROG41 Manual Page


prog41 - a filter to list an HP41C user-language program


prog41 [-h] [-x xrom_file ] [-x xrom_file ] ... < Input file > Output file prog41 -?


prog41 is a filter which produces a listing of an HP41C user language program. It reads the program as a series of bytes from standard input and prints the listing to standard output (in a similar format to the standard HP41C printer). By default, functions contained in plug-in modules are displayed as XROM rr,nn where rr is the number of the plug- in ROM and nn is the number of the function within that ROM. This can be overridden by loading xrom_files, see the -x option below. An xrom_file consists of a number of lines, each consisting of 2 decimal numbers and a string (containing no whitespace), in that order, separated by whitespace. The string gives a name to the function specified by the first number as rr and the second number as nn. The linux command pr may be useful for formatting the output of prog41 into multiple columns.


-h Display the bytes (in hexadecimal) that make up each program instruction immediately preceding the display of that instruction -x xrom_file Use xrom_file to define names for functions in plug-in modules. This option may be repeated to load multiple xrom_files. -? Print a message giving the program usage to standard error.


xroms/* xrom function definition files


The format of an HP41C program is documented in many books. Amongst the most useful references are Extend Your HP41 (W. A. C. and The HP41 Synthetic Programming Quick Reference


If disk1.lif is a LIF disk image containing an HP41 program called PROG then lifget -f disk1.lif PROG | prog41 will produce a listing of the program to standard output, with the standard names for the functions in the HPIL module and time module.


Some synthetic functions may not be displayed correctly, although an attempt has been made to handle synthetic programming. Some common HP41C characters are not printable in ASCII (and are displayed as \nnn octal display sequences) so the display of strings in programs may be somewhat messy.


prog41 was written by Tony Duell, and has been placed under the GNU Public License version 2.0