PC(user code) to HP-41(mcode) it works!


PC(user code) to HP-41(mcode) it works!

Hardware required: Slow PC: 286/16Mhz? HP-IL card for PC: 82973A HP-IL module for HP-41

Software required: ( not free-ware, don't ask me for them ) 41UCC: HP-41 user code compiler, by Hand Held Products DosLink: HP-IL transfer utility, by Southern Software

Well, here's what I found out... 41UCC generates a .BIN file in this format: Header: Code 'Size' - 2 bytes Code: 'Size' bytes Checksum - 1 byte Trailer - filler to nearest 128 byte boundary The checksum is simply a byte sum of all the bytes from the top of the file (including the 2-byte header).

I found an HP-IL transfer utility, "DOSLink", that emulates a 9114 disc drive using a transfer file, on the PC, called HPILDISC. The 41 can read and write to this file as if it were a 9114 drive. If the file does not exist, the calculator can create it with the NEWM command. This transfer file is simply a DOS file in LIF format. And, if you understand LIF, you can create this file yourself!

see http://www.finseth.com/~fin/hpdata/lif.html

So, to get the code transfered to the 41, I took the code from 41ucc (minus header, checksum and trailer), put a LIF wrapper around it, renamed it to HPILDISC, and read it using DOSLink. The code in the LIF file must be appended with a checksum byte, but you can't use the one from 41ucc, it's calculated using only the code bytes.

I'm writing a DOS program, HP41.EXE, to handle the file conversion: .BIN to .LIF. It will also convert .P41 (pseudo LIF files) to .LIF., etc. .P41 is the format used to archive 41 programs on ftp sites. Contact me if you're interested.



Leo hi, Very interesting. Do you know of any good emulators for DOS that might be written for the HP200LX and that might look anything close to the PAL applications? Andreas


Sorry, I don't know anything about the HP200LX.


I'm interested in the utility you mention and knowing more about what you are doing with this. Where did you obtain the 41UCC and DOSLink?


The HP-IL transfer file used by DOSLink, is in the format (LIF) used by other transfer utilities like LinkPlus, etc. I got the software from a friend who has a bunch of other HP-41 goodies. OK, here's what my utility will do:

File Formats: P41: archive file for HP-41 programs (ftp sites, etc); RAW: input file for LIFUTIL; LIF: HP-IL transfer file for DOSLink, LinkPlus, etc; BIN: output file from 41UCC;

Usage: P41 file to RAW file (remove 32-byte header); P41 file(s) to LIF file; RAW file to P41 file; RAW file(s) to LIF file; BIN file to RAW file (remove 2-byte header); BIN file to P41 file; BIN file(s) to LIF; LIF file to RAW file; LIF file to P41 file; Remove control characters from ascii file;



Great. Let me know when it's ready.


Philip, Version 1.00 of HP41.EXE is on its way. Let me know how it works for you.



Hello Leo, I would also be interested in testing your new software. Could you please send it and I will let you how it works. Thanks. Jerry


I'd like to see it too.



OK, HP41.EXE is on its way to both of you. If you just want me to send it to you, send me e-mail at leo_duran@yahoo.com, instead of wasting thread space here. Regards, Leo.


By Mcode I meant compiled user-code as opposed to text. Sorry for the confusion.

Possibly Related Threads...
Thread Author Replies Views Last Post
  Does the HP Prime really compiles the user programs? CompSystems 3 173 12-13-2013, 01:55 PM
Last Post: Mike Morrow
  HP Prime works from the traditionally TI community... debrouxl 1 118 12-06-2013, 09:00 PM
Last Post: Erwin Ried
  HP 50g switching two keys in the user keyboard Sean Freeman 9 324 12-05-2013, 11:44 AM
Last Post: Mark Puscas
  HP-41(CL): The easiest way to transfer FOCAL programs from a Linux PC to the HP-41 Geir Isene 13 466 12-05-2013, 02:40 AM
Last Post: Hans Brueggemann
  HP PRIME: APP program code DISAPPEARS !! Joseph Ec 0 82 11-25-2013, 11:35 AM
Last Post: Joseph Ec
  HP Prime - User manual lack bluesun08 6 232 11-08-2013, 05:38 PM
Last Post: bluesun08
  HP-41 MCODE: The Last Function - at last! Ángel Martin 0 91 11-08-2013, 05:11 AM
Last Post: Ángel Martin
  HP PRIME : strange behavior when trying user key capability Damien 12 332 11-03-2013, 11:02 AM
Last Post: Joe Horn
  HP-Prime Polynomials: User Guide and Request CompSystems 4 164 09-30-2013, 09:48 PM
Last Post: Han
  HP Prime Tip: Setting Up User Keys Eddie W. Shore 2 132 09-27-2013, 09:53 PM
Last Post: Eddie W. Shore

Forum Jump: