The Museum of HP Calculators

HP Forum Archive 17

[ Return to Index | Top of Index ]

Scan / PDF / text file of HP41 application pac program listings?
Message #1 Posted by Gene on 28 May 2007, 9:11 p.m.

If this is on the Museum DVD, let me know and I'll dig mine out.

I'm looking for the program listings to the programs on the HP41 application ROMs. The manuals are available, but are the listings?

If I want the listing to the standard pac blackjack program, or any other program on a 41c rom from HP, are those listings available anywhere?

      
Re: Scan / PDF / text file of HP41 application pac program listings?
Message #2 Posted by Dave Hicks on 28 May 2007, 10:04 p.m.,
in response to message #1 by Gene

Some but not all of the modules have text files associated with them on the DVD.

After the next version of the DVD (actually 2 DVDs now) goes to the factory and after I start whittling down my in-box, I was planning to ask for scans of more software. I have a few dozen user's library programs here but hopefully we can find many more. Depending on whether it turns into dozens or thousands of scans, these could go on-line or on another DVD.

            
Re: Scan / PDF / text file of HP41 application pac program listings?
Message #3 Posted by Gene on 28 May 2007, 10:17 p.m.,
in response to message #2 by Dave Hicks

Ok, I'll check my copy of the DVD.

If the standard pac, math pac, and others aren't there, then I'll drop another note.

Thanks Dave...see you in San Diego in September?

                  
Re: Scan / PDF / text file of HP41 application pac program listings?
Message #4 Posted by Dave Hicks on 28 May 2007, 11:42 p.m.,
in response to message #3 by Gene

Yes, I plan to be there. I haven't actually booked yet but it's on the TODO list.

                        
Nope - no 41c math pac program listing on DVD
Message #5 Posted by Gene on 29 May 2007, 9:55 a.m.,
in response to message #4 by Dave Hicks

I found the text files containing program listings, but there wasn't one for the math pac. Does anyone have this in electronic form so I don't have to recreate the wheel by finding my thinkjet printer and generating the listing?

I'm particularly looking for the listing to the MATRIX program.

Could it be generated by the emulator on a palm?

?

                              
Re: Nope - no 41c math pac program listing on DVD
Message #6 Posted by Meindert Kuipers on 29 May 2007, 4:11 p.m.,
in response to message #5 by Gene

In the software for the MLDL2000 is a ROM disassembler that also decompiles user code, it will work with the MATH ROM. Only disadvantage is that it will not yet decompile the XROM numbers to its function name. This software can be downloaded from hp41.kuipers.to

Go to Tools -> ROM/SR Handler and Open the MATH ROM file (only .ROM format supported) in the ROM tab. Then press DisAsm ....

Copy and paste the resulting listing in whatever you like ....

I just tried it, "MATRIX" it is 603 lines, otherwise I would post it here (but maybe I would violate copyrights???)

Meindert

                                    
Re: Nope - no 41c math pac program listing on DVD
Message #7 Posted by Werner on 30 May 2007, 3:25 a.m.,
in response to message #6 by Meindert Kuipers

? It's 566 lines, 983 bytes. MATH-1C version. I have a listing (painstakingly copied by hand..), but only of the MATRIX program. I can email it, if you want.

Cheers, Werner

                                          
Re: Nope - no 41c math pac program listing on DVD
Message #8 Posted by Meindert Kuipers on 30 May 2007, 4:17 a.m.,
in response to message #7 by Werner

You're totally right. The disasmbler counts the line numbers a bit different (this is a limitation in the decompiler). For numeric entries each digit is decompiled in a seperate line, sorry for the confusion.

Meindert

                              
Re: Nope - no 41c math pac program listing on DVD
Message #9 Posted by Les Wright on 30 May 2007, 6:55 p.m.,
in response to message #5 by Gene

Gene, I think the best, albeit somewhat time-consuming, way to generate a listing is this:

1. Get the Math Pac MOD file from TOS--it comes with V41.

2. Convert the MOD file to ROM format using the modfile.exe utility, also from TOS.

3. Convert the ROM file to *.raw format using the rom2raw utility from Thomas Okken's Free42 site.

4. Using a clean instance of Free42 (i.e. back up and move any existing state files, since the menu will fill up with labels and we don't want to get confused), import the resultant *.raw file into Free42.

5. In Free42, PRP the "MATRIX" program from the menu, making sure that in Free42's preferences the "print to text file" or, on Palm, "print to Memo" options, whatever you desire, are selected.

Do all of this correctly, you get, voila, a text listing.

I already created the RAW file some time ago, so it took me just a moment to print and cut and paste the following for you. Please keep in mind that some of the commands are in their 42S versions (e.g. ISG ST X instead of ISG X and Rv instead of RDN), but this is easy enough to clean up if you ever want to. Also, since the program listing has just one END in it, I think that Leo Duran's hp41uc utility can be used to generate a text listing from the RAW listing in original HP41 format and nothing should be missed. I find that if a RAW file includes several routines with internal "END"s, the hp41uc decompiler will only convert up to the first END it hits. I also believe the issue occurs in the reverse situation of compiling a text to RAW file using hp41uc. Hence, I prefer to use PRP in Free42.

00 { 1032-Byte Prgm } 01>LBL "MATRIX" 02 2.01 03>LBL 15 04 CF IND ST X 05 ISG ST X 06 GTO 15 07 SF 04 08 SF 21 09 CF 29 10 "ORDER=?" 11 PROMPT

<snip>

551>LBL 32 552 SF 06 553 XEQ 18 554 STOP 555 FC?C 22 556 GTO 31 557 STO IND ST Y 558 GTO 32 559>LBL 02 560 FS?C 08 561 SF 05 562 GTO 19 563>LBL 14 564 1E3 565 566 END

Is this sort of thing what you are looking for?

Les

P.S. If you have the "paid" version of P41CX, you can load the Math Pac ROM with the P41CXRM utility, the go into P41CX, set the program pointer to MATRIX with GTO ALPHA MATRIX ALPHA, then print the program listing to the Memo application with XEQ PRP ALPHA ALPHA, just as you would on the real calculator with printer or IR module attached--make sure that MAN is selected in the printer options menu. This will print out the 566 steps to two memos, which are easy enough to find on the Palm. Hotsync with your PC and you can cut and paste the listing right out of Palm Deskstop.

Edited: 30 May 2007, 9:52 p.m. after one or more responses were posted

                                    
Re: Nope - no 41c math pac program listing on DVD
Message #10 Posted by Les Wright on 30 May 2007, 7:26 p.m.,
in response to message #9 by Les Wright

Quote:
Please keep in mind that some of the commands are in their 42S versions (e.g. ISG ST X instead of ISG X and Rv instead of RDN), but this is easy enough to clean up if you ever want to. Also, since the program listing has just one END in it, I think that Leo Duran's hp41uc utility can be used to generate a text listing from the RAW listing in original HP41 format and nothing should be missed.

Using Export Program from the Free42 menu, I was able to export MATRIX and its subroutines, up to the END at step 566, to its own separate RAW file, which I call simply MATRIX.RAW. Then, with the command hp41uc /r=MATRIX /t /n, I get the following MATRIX.TXT:

 01 LBL "MATRIX"
 02 2.01
 03 LBL 15
 04 CF IND X
 05 ISG X
 06 GTO 15
 07 SF 04
 08 SF 21
 09 CF 29
 10 "ORDER=?"
 11 PROMPT

<snip>

551 LBL 32 552 SF 06 553 XEQ 18 554 STOP 555 FC?C 22 556 GTO 31 557 STO IND Y 558 GTO 32 559 LBL 02 560 FS?C 08 561 SF 05 562 GTO 19 563 LBL 14 564 1 E3 565 / 566 END

This time, the desire HP41 format of the commands is preserved.

Also, just for fun, I was able to generate barcode. But this is not efficient--the program takes up 148 registers. I think ideally the program should be run from the module so that as many registers as possible are available to store matrix elements.

Les

Edited: 30 May 2007, 9:53 p.m.

                                    
Re: Nope - no 41c math pac program listing on DVD
Message #11 Posted by Les Wright on 30 May 2007, 9:56 p.m.,
in response to message #9 by Les Wright

In respect to concerns about copyright I snipped the innards of my listings. The point was really not to provide a full listing--rather, to demonstrate that a text listing could be readily reproduced with freely available software and utilities--no painstaking hand transcription required!

Les


[ Return to Index | Top of Index ]

Go back to the main exhibit hall