The Museum of HP Calculators

HP Forum Archive 02

[ Return to Index | Top of Index ]

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!

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!
Message #2 Posted by Andreas Terzis on 25 Apr 2000, 10:41 p.m.,
in response to message #1 by Leo

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!
Message #3 Posted by Leo on 26 Apr 2000, 11:07 a.m.,
in response to message #2 by Andreas Terzis

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

      
Re: PC(user code) to HP-41(mcode) it works!
Message #4 Posted by Philip Reagan on 26 Apr 2000, 2:17 p.m.,
in response to message #1 by Leo

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!
Message #5 Posted by Leo Duran on 27 Apr 2000, 11:37 a.m.,
in response to message #4 by Philip Reagan

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!
Message #6 Posted by Philip Reagan on 27 Apr 2000, 4:17 p.m.,
in response to message #5 by Leo Duran

Great. Let me know when it's ready.

                        
HP41.EXE: File Converter is done!
Message #7 Posted by Leo Duran on 28 Apr 2000, 2:58 p.m.,
in response to message #6 by Philip Reagan

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!
Message #8 Posted by Jerry Ballard on 28 Apr 2000, 11:07 p.m.,
in response to message #7 by Leo Duran

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!
Message #9 Posted by Wayne Brown on 29 Apr 2000, 10:37 a.m.,
in response to message #8 by Jerry Ballard

I'd like to see it too.

Wayne

                                          
Re: HP41.EXE: File Converter is done!
Message #10 Posted by Leo Duran on 29 Apr 2000, 1:43 p.m.,
in response to message #9 by Wayne Brown

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!
Message #11 Posted by Should read: PC to HP-41 (User Code); not MCode on 1 May 2000, 11:10 a.m.,
in response to message #1 by Leo

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


[ Return to Index | Top of Index ]

Go back to the main exhibit hall