|PC(user code) to HP-41(mcode) it works!|
Message #1 Posted by Leo on 25 Apr 2000, 2:12 p.m.
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!
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.