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

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: PC(user code) to HP-41(mcode) it works! (/thread-4373.html)



PC(user code) to HP-41(mcode) it works! - Leo - 04-25-2000

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.


Re: PC(user code) to HP-41(mcode) it works! - Andreas Terzis - 04-25-2000

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


Re: PC(user code) to HP-41(mcode) it works! - Leo - 04-26-2000

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


Re: PC(user code) to HP-41(mcode) it works! - Philip Reagan (Texas) - 04-26-2000

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?


Re: PC(user code) to HP-41(mcode) it works! - Leo Duran - 04-27-2000

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;

leo_duran@yahoo.com




Re: PC(user code) to HP-41(mcode) it works! - Philip Reagan (Texas) - 04-27-2000

Great. Let me know when it's ready.


HP41.EXE: File Converter is done! - Leo Duran - 04-28-2000

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

Leo.


Re: HP41.EXE: File Converter is done! - Jerry Ballard - 04-28-2000

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


Re: HP41.EXE: File Converter is done! - Wayne Brown - 04-29-2000

I'd like to see it too.

Wayne


Re: HP41.EXE: File Converter is done! - Leo Duran - 04-29-2000

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.


Re: PC(user code) to HP-41(mcode) it works! - Should read: PC to HP-41 (User Code); not MCode - 05-01-2000

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