How to transfer a HP 41 program to an emulator



I'd like to test my S&SMC#8 program for the HP 41 on one or more of the available emulators. What is the easiest way to do it?

I do have:

NoVRAM - Can I store the program there and read it with the PIC programmer into the PC?

HP-IL - In what way can I use Christoph Klug's HP-IL card to transfer a program in a suitable form?

Which emulator is the fastest? Since the program can run on a HP 42, too (that's how I wrote it!), the HP 42 emulators should be considered in addition to the 41 emulators.



Well, if you have Christoph's IL-PC card I would try OUTP to store the program on disk in HEX. Then convert it to RAW like this:

 09:09   26.04
05 XEQ 00
06 STO 00
07 256
08 *
09 STO 01
10 XEQ 00
11 ST+ 00
12 ST+ 01
13 GTO 01
14 LBL 00
15 2
18 XROM "D" /* hex in Alpha to dec in X */
19 RTN
20 LBL 01
21 XEQ 00
23 ST+ 00
24 DSE 01
25 GTO 01
26 XEQ 00
27 RCL 00
28 256
29 MOD
31 XY? /* */
33 END

That's just how I would do it - probably there are more sophisticated solutions.




where do I get OUTP from?

BTW, why creating HEX2RAW on the HP if the file is on the PC? Wouldn't it be much easier to let the PC do it (in C or BASIC or whatever?) Or is the file stored in a LIF container file which is not easily accessed from PC programs?

I hadn't much time to play around with the HP-IL card: it's plugged into an ancient DOS machine with limited network access. The fun playing with this computer is limited...


EXTENDED I/O contains XROM 23,40 OUTP

With JF Garnier's Emu41 I do have an HP-41 on the PC with access to the PC's disk. So why should I learn C or BASIC?

BTW, how do you distinguish work and fun?



Almost never!


Dear Mike,

please give more details about the commands (or the needed plug in modules) of your program lines

18 XROM "D"


31 X?Y?

Exist a reversal solution for converting from RAW to program ?

Thanks - Christoph Klug


To go from RAW (i.e. a binary HP41 program) to a listing, you can use the prog41 program in my LIF utilities for Linux. It should handle most synthetics correctly, and it lets you load files of names for XROM commands, rather than just displaying them as XROM nn,ff (but it does that if you haven't specified a name).

IIRC one of the other programs in the LIF utilities for Linux distribution will make a suitable file of names from an HP41 ROM module dump if you don't want to make the file by hand.


EXTENDED I/O contains XROM 23,39 OUTXB

X?Y? is "X # Y?", content of register X not equal content of register Y?

XROM "D" is following:

 01 LBL "D"
02 CODE /* an MCode routine */
03 CLA
04 X<> [ /* M */
05 256
07 CHS
08 LBL 13
09 RDN
10 ST* Y
11 R^
12 X0? /* X .ne. Zero? */
14 ST+ Z
15 X<> L
16 ISG X
17 "" /* this is a NOP */
18 X<0?
19 GTO 13
20 R^
21 R^
23 RTN

The MCode routine CODE is from "MCode made easy" IIRC.



Sorry, CODE is from ZenRom (XROM 05,03) -- M.

Possibly Related Threads...
Thread Author Replies Views Last Post
  WP-34S (Emulator Program Load/Save) Barry Mead 1 533 12-09-2013, 05:29 PM
Last Post: Marcus von Cube, Germany
  HP-41(CL): The easiest way to transfer FOCAL programs from a Linux PC to the HP-41 Geir Isene 13 1,836 12-05-2013, 02:40 AM
Last Post: Hans Brueggemann
  HP Prime: run a program in another program Davi Ribeiro de Oliveira 6 805 11-11-2013, 08:28 PM
Last Post: Davi Ribeiro de Oliveira
  Updated PPC DVD Version 2.10: HP-41 Searchable Program Files and Scannable Barcode Jake Schwartz 3 601 09-27-2013, 09:51 PM
Last Post: Olivier (Wa)
  41CL :TROUBLE IN FILE TRANsFER aurelio 22 2,088 06-18-2013, 03:44 PM
Last Post: aurelio
  Looking for PLTMX80 program for HP- 41 Ángel Martin 1 299 10-19-2012, 05:21 AM
Last Post: Ángel Martin
  New 41 model to use rom of "big" program Olivier De Smet 4 551 10-03-2012, 07:35 PM
Last Post: Brian Walsh
  HP 48SX equation library card transfer Vincent Weber 3 539 09-01-2012, 10:23 AM
Last Post: aurelio
  How to Install/Setup PC to HP41CL Serial Transfer Software? Michael Lopez 15 1,119 08-14-2012, 08:45 AM
Last Post: Michael Lopez
  Using PIL-BOX & ILPer to Transfer Programmes from PC to HP41CX? Michael Lopez 5 699 06-25-2012, 09:31 AM
Last Post: Michael Lopez

Forum Jump: