How to transfer a HP 41 program to an emulator



Post: #10

Hi!

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.

Marcus


Post: #11

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
01 LBL "OUP2RAW"
02 "DOSLINK"
03 FINDID
04 SELECT
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
16 INAN
17 ATOX
18 XROM "D" /* hex in Alpha to dec in X */
19 RTN
20 LBL 01
21 XEQ 00
22 OUTXB
23 ST+ 00
24 DSE 01
25 GTO 01
26 XEQ 00
27 RCL 00
28 256
29 MOD
30 "CHKSM ERR"
31 XY? /* X.ne.Y */
32 AVIEW
33 END

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

Ciao.....Mike


Post: #12

Mike,

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...


Post: #13

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?

Ciao.....Mike


Post: #14

Almost never!

Post: #15

Dear Mike,

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

18 XROM "D"

22 OUTXB

31 X?Y?

Exist a reversal solution for converting from RAW to program ?

Thanks - Christoph Klug


Post: #16

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.

Post: #17

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
06 ALENG
07 CHS
08 LBL 13
09 RDN
10 ST* Y
11 R^
12 X0? /* X .ne. Zero? */
13 ATOXX
14 ST+ Z
15 X<> L
16 ISG X
17 "" /* this is a NOP */
18 X<0?
19 GTO 13
20 R^
21 R^
22 AOFF
23 RTN

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

Ciao.....Mike


Post: #18

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


Forum Jump: