The Museum of HP Calculators

HP Articles Forum

[Return to the Index ]
[ Previous | Next ]

HP-41C "Decompiler" and "BarCode Maker"

Posted by Dan McDonald on 14 May 2000, 1:11 p.m.

This is an Excel file with macros that will produce-on a PC running Excel-a listing and a barcode of an HP-41 binary program file. The HP-41 Binary files are available online at the swap-disk archive ( or on a LIF disk somewhere. My previous article on the HP Museum site shows how to get these files to your PC and how to remove the extraneous LIF header data from them.

Getting a fast listing from the PC is essential to figuring out what some of these files are. Getting a fast BarCode of these files is just kind of fun and something I wanted to see if I could do.

The files I've included, and which are needed for this project are:

To download the files above in Netscape, right click on each link and click on "Save Link As..." Alternately, you may find it easier to download all of the above files in this zipfile.

Special (non-DOS) characters are not implemented yet. I've used the words , , and to indicate them. If the user doesn't like these, they are welcome to change them in the appropriate Excel cell.

XROM functions are not implemented yet. They appear as "XROM xx,yy" and it is up to the user to figure out which ROM these are from and what the command is. The correct "xx,yy" are supplied for every XROM function, of course, it's just that it's hard to tell from that which ROM it's coming from (xx) and which command within that ROM it is (yy).

I'm slowly working on some other fonts, including a 41 Display font and a 82143/82162 dot-matrix printer font.

Error trapping is almost non-existent. Be wary of source files or paths spelled wrong and duplicate Excel worksheet names, and more. Some of these will put Excel into an infinite loop, others will just stop the macro from running.

The operator interface still needs some work, but it's not too bad.


  1. Have the 41C Binary file of interest available on the machine somewhere.
  2. Open the Excel file 41_ListA.xls Go to the worksheet "41_List" you should see 2 colored boxes ("Make Listing!" and "Make BarCode!") near the top rows.
  3. Type the name of the file of interest (include the path) somewhere, and make it the current Excel cell. You actually don't have to do this, but it's nice to have it somewhere. If you don't do this, you'll have to type it all into a dialog box, and then do it again if something goes wrong.
  4. To get a listing:
    Click on the "Make Listing!" colored box (it's actually a "button") This puts a text file of the program listing into a location you specify
  5. To get a BarCode:
    Click on the "Make BarCode" colored box. This puts a printable barcode program listing into a new Excel worksheet (you specify the name)
    It also puts the information into a non-fonted text file which you can then later load into another program and give it the correct font...this is not as nice as the new Excel worksheet, and is pretty much unnecessary.


These programs were written for fun not profit, so all are welcome to use, modify, or distribute them, but please don't sell or charge anybody for using them!

If there are any questions about the usage or implementation of these programs, please let me know.

Happy calculating.


[ Return to the Message Index ]

Go back to the main exhibit hall