How to create a HP41 ROM image from a set of programs


Is it possible (and how) to create a ROM image file from a set of user programs and get something like your own ROM module. The programs are pure 41C RPN statements, no machine or synthetic code.


Dear Miki,

take a W&W Ram Box or the Eramco Ram Storage Unit. The belonging operating systems includes commands for createing own rom image file and for loading USER code program routines. Same with Hepax.

Alternatively use EMU41 and work with a virtual ram box. Next HPCC Datafile Journal will publish some details about converting Hepax rom-image-files to W&W/ZEPROM/Eramco rom-image-files.

Best wishes from Germany - Christoph Klug


Third possibility: Buy a ZEPROM (or a Clonix,...) and programm it with the system software of the W&W Rambox. In this system you have the WRTPG command, that alloweds you to make your images...


Ok, maybe I should clarify it a bit. I am trying to get a ROM image on a PC so that when Clonix arrives (soon hopefully) I can program the EPROM with my own image file(s) and use it on HP-41. I do not have a RAM BOX, ZEPROM, HEPAX etc on HP-41. Yes to HEPAX on V41. Not familiar with EMU41, maybe it can do what I need, create ROM image that Clonix can use?



Have you looked for p41cx at ? It is a 41cx/41cv emulator, and the roms are included.



just at the moment there is a ram-box(ram storage unit) at ebay. I did not see any rambox at ebay for three years now since i am regularily looking through hp calcs at ebay. so normally it is not possible to get a rambox because it is extremely rare. i will not bid because in the meantime fortunately i got a mldl from eramco with ram and eprom. but this rambox at ebay could be the opportunity for you to get one. maybe it is the only chnce for another three years ... :-)

i don't know about price development, i believe it will reach 1000 dollar mark. this is very much money but i think it is nevertheless worth buying becuase it is extremely useful and it is extremely rare even at ebay

here is the link to the ebay offer:

i heard that reloading the operating system of the eramco ram-box is no principal problem. so the box that is offered should work fine.
you can not only store own user code programs but you can also do machine code programming. without a ram-box or an mldl (like i have) machine code or mcode cannot be done with a hp41cx.



I have seen this one on e-bay but it doesn't fit what I would like to have. I agree that this is a great piece of equipment but I am a minimalist so I would like my programs (ROM image) in a standard HP module housing. I never liked the design of HP card reader and I keep my out of site whenever I don't use it since ,in my opinion, when attached it ruins the great looking design of 41. Call me nuts but aren't we all who still use this retro technology.


If you want to create a "virtual rom" of User Code (sometimes called FOCAL Programs) on a PC for eventual transfer then this is one way.

First you will need several pieces of software
1) HP's SDS II assembler package
2) Warren Furlow's excellent SDK41 assembler package
3) Leo Duran's User Code Utility 1.21 and Ulisse Quadri's User Code Utility GUI (a "front end" for Leo's program)
4) Some kind of test editor

Second I am assuming you have no way to get your program's into the PC without typing.

So, get all the packages installed on the PC and type in the programs. You next need to convert all external references to XROM NUMBERS (XROM,XX,YY).

Next, use the User Code Utility to convert the "text" programs to "dat" format.

Now it gets a little hard. You must manually do what the SDSII program to read mass storage programs automatically does.
You need to edit the DAT file to insure the hex instructions are correct.
For this I'd suggest using Warren's program to decode some of the ROM files with user code to understand their structure. Also, programs in ROM have their bytes coded differently from RAM.
All FOCAL instructions are 3 hex digits in size. In ROM the first digit will be a 1 if the instruction is (a) a single byte instruction or (b) the first byte of a multi-byte instruction.
All ROM FOCAL code ends with a specific code. Check some de-compiled code and you'll see it.

Finally, when you have edited the code use the User Code Utility to convert the DAT to BIN.

Now you can run the bin file through the SDSII programs to produce hex files for building a input file for Warren's SDK programs.

There are some other little problems that pop up:
I suggest building you're programs one by one because you'll need to set entry points for the FAT table for SDKII to assemble. This means you need to know the entry byte for each FOCAL Program...and FOCAL code does not show as anything but lines of hex code when dissambled.

The SDSII programs to build the user code are not really self-referencing. If you are calling other programs (or m-code) within the same ROM you actually cannot build with that XROM number--you must actually build to another XROM number temporarily. For example, if you are creating an XROM 31 and your code calls a routine designated at XROM 31,25 SDSII will not let you build the code as XROM 31. You must temporarily build as say XROM 30 then copy the code into the file you are going to use the SDK41 assembler/linker to create the actual compiled ROM code.

So the path is text->User Code Utility->edit DAT->User Code Utility->SDSII->hex code->Text file of hex code->SDK41 to assemble and link the ROM.

If this sounds confusing--it is. There is a steep learning curve but it is entirly possible. I build 4k worth of FOCAL code into a ROM file while learning to use the v41 emulator and Charles Lee's P41 emulator and later Frank Baquernoeppel's PocketPc emulator.

I have an article I wrote to clarify thinks for myself when I was dealing with learning and implementing this and if you'd like I could dig it out, clean it up and email it to you.


Hi all,

David, I'm very interested in this issue too, please consider to send me a copy of said document, provided you find it, (Hopefully you're less chaotic than me ;-)

Should I get a whole and clear picture of the required steps, I'll gladly write an utility to make the task. Not a trivial issue though.

Once tested, I'll release it to the public domain as a Clonix module companion.

My general idea is something like that:

-Use .RAW files as input(s), as those are very easily obtained (i.e. V41 emulator)

-Select a XROM number of your choice, (avoiding XROM nr. conflicts is a must!)

-Run the utility and produce a suitable 4k .ROM image.

I know I've got a nice amount of work ahead, but I like it! :-)

Regarding the e-bay RAM box auction, I'm not goint to argue about its collector value, anyhow, Meindert's MLDL200 proyect and hopefully my own non-volatile RAM module project (still in designing phase) will see the light in quite less than three years, and far less than said $1000 :-)



Edited: 11 Dec 2003, 5:36 a.m.


I guess I (naively) believed that utility of that sort already existed (guess not). If you really undertake that kind of project Diego, let us all know.



isn't it possible to use the EMU41 (which emulate the HP-IL mass storage) for reading programs with SDS-II ?

If so, SDS should do the above mentioned manual DAT editing automatically.

I am just thinking about it, I never tried it.



I can't tell for sure that such a convertion tool does not exist, but if it does I'm not aware of it.

I haven't digged very much in this, anyhow it seems to me that appart from the needed clerycal job (crating a FAT, counting labels, calculating pointers, etc.) the real "hard" part of the conversion is the necesity of correctly "interpreting" the FOCAL code, as you need to "mark" every new program line by setting bit 8 of its first word; the rest of words uses only bits 0 to 7, wasting the ramaining two bits of every word.

Some more qualified advice should be greatly appreciated.




Dear HP41 friends,

All the listed tools and procedures listed above are not needed with EMU41. Because EMU41 acts and works like the real HP41 plus RAM-BOX.

First upload your USER code programms from your real machine to the virtual mass storage drive of EMU41 (for this you need the HP-IL/PC interface card). Now read the programs to the virtual main memory of EMU41. Than create the rom-image file (XROM Number...) with your virtual RAM-Box and load the routines to RAM Box. When finished store the complete file to virtual mass storage drive and transfer them to your real RAM-Box, Zeprom, or send them to your friends as email attachment....

You see EMU41 replaces a long list of former software tools for HP41, again EMU41 is a surpriesing all in one solution...

Regards from Germany - Christoph Klug


Christoph is right:- With Emu41 thre's no need to look any further, all is in there, provided of course that you have an HP-IL PC Card...

And another thing: you can substitute all references to the RAMBOX by HEPAX everywhere in his message, as Emu41 also emulates the HEPAX RAM.



Diego and all,

I should have my mini-report ready for upload by the weekend on going from text to ROM image for FOCAL programs.

I agree that using various Ram-Boxes, MLDL, etc hardware provide all the tools. Actually, the HEXPAX modules were probably the most efficient--just save the FOCAL programs to Hepax RAM.

But, I think the origional question was if you could produce a ROM image of FOCAL code just with a PC and later be able to download it to the Clonix module?

The path there is
UCC -> .bin files -> Read41P -> .41T files -> BUILD -> .41R files, which are equivalent to SDK41 .rom files -> D41 -> to disassembled .src files which can be edited to make the FOCAL code a bit more position independent thru SDK41 labels and finally importing those files into prototype ROM .src files, setting up the FAT table and assembling.

Also, to answer Diego: You can use UCC to convert .raw files to .bin files acceptable to the Read41P program.

With some limitations, using SDSll you could create an entire 8k ROM image of FOCAL code--after all, this is how HP would have had us do it (20+year ago)...

On a different topic:
Often I read or hear people debating the merits of "old" calculating machines--Are they only good for the collector? People pay crazy prices on eBay for "useless" machines and accessories--crazy, of course, because there are very few uses that can't be done better and cheaper with current devices. There are many justifications, but one I rarely hear is education: Working with these machines, from hardware to mcode to FOCAL programs still can teach us many things. The best teacher I had--so far--in my life had been fighting a battle against being retired for 5 years. He taught me that being old didn't automatically mean you had nothing to teach. I look at the 41 like that.

I got back into this a year or so ago when I started looking for a good calculator program for my PDA. After finding Charles Lee's p41 emulator for the Palm a search for more ROM images lead me to Warren's site--heaven!
It lead to memories of PPC, etc. My HP41C was purchased 3 months after HP announced it, I still have my HP 67 and a TI58--I don't use them but to start up, clean and test a couple times a year but you'll have to pry them from my cold dead fingers. The 41C lead to my career in Computer--hardware and software consulting, installing, a maintaining networks.
I always wanted to write machine code for the 41 and now I have been able to. Why? Well some people like crossword puzzles I like the puzzles of mcode. Do I need to? No, I have access to Workstations, notebooks, PDA's all with better, faster calculator program's and programming. My affection for the 41 is because I think it was one of the best engineering projects I know of: from concept to end-of-life it was inovative, it created standards which effected the entire development of personal computers and it met or exceeded the design criteria set for it. That's a lot from a small black plastic box.


Hi all,

David, your post is really interesting for me. If I've correctly understood, you'll be posting a said *report* after the weekend. Am I right?

I have a question for you anyhow, are .BIN files in your "path" above same format as .BIN rom images???

.BIN (rom images) format compared to *real* 41 10bit words:

HP41:--Word 1-----Word 2-----Word 3-----Word 4

-------9876543210 9876543210 9876543210 9876543210

BIN:--Byte 1---Byte 2---Byte 3---Byte 4---Byte 5

------76543210 54321098 32109876 10987654 98765432

Should you confirm the last, I wrote an utility (just yesterday) to convert .BIN rom images into .ROM rom images in just one step.




Honestly I don't know. I haven't checked. I assumed it was one format of programs on mass storage. This was sort of 'cut and try' development for me. The Load41P program needed a .bin file format for importing FOCAL code & producing .41T files for BUILD.
Also, it is BUILD which compiles the jumps in multi-byte functions to proper ROM form so simply going from .bin->.rom leaves you with slower code as GTO/XEQs must search each time. .


I might be totally off-track here, but I'd dare to add that that's where the function XQ>XR kicks in...



Would work but it would be a LOT of work!
The nice thing about using the SDSll is that the BUILD program will do all the work: compiling, linking, building the ROM type bytes, generating the entry points and FAT table.
Next, with a minor amount of manual manipulation you end up with your FOCAL code in a block which is re-locatable. Which then allows relatively easy integration with mcode.
And, of course, if you have MUCH FOCAL code you can create/edit programs one by one and then link them together.


Hmm. Slightly OT, but...
With the MBK ProfiSET, you just load your FOCAL progs into the selected 4K block, like you load a prog into X-memory, and all necessary steps, like FAT linking, and XEQ>XROM conversation take place automatically. It simply can't be easier to use.
AFAIK the W&W RAMBox OS can perform similar actions, not as smooth as the ProfiSET, but if you can live with it's restrictions it still works.



Just slightly? I thought I was way over...

Of course it's easier using the various RAM boxes. Or using the EMU41 and HEPAX allows you to test and effectively generate a 4K image of FOCAL code as a continuous process.

Still, for learning how to structure a ROM module, combining FOCAL code and MCODE programs within a module and dealing with some of the more exotic aspects of ROM (paging)the HP SDS and Warren's SDK41 are unbeatable.

Also, they are free and don't involve possible copyright problems--something which may be important to some.

Actually, my personal view is any of the methods discussed are viable and have merit. I use/have used EMU41/HEPAX, SDSll,SDK41, the v41 emulator, Charles Lee's p41 emulator, ROM dumps and pencil and paper for developing code. Each has it's uses. I prefer developing on a computer. I can't justify the expense of RAM or EPROM hardware for my 41 hobby. I have background in using IDE-style code development tools so SDS and SDK41 work for me.

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to add image to HP Forum Posting Harold A Climer 2 1,498 11-20-2013, 02:28 PM
Last Post: Han
  How to create a touch button [HP Prime] uklo 1 1,222 11-02-2013, 02:03 PM
Last Post: Marcus von Cube, Germany
  How to set the Date.Time etc on a WP34S Harold A Climer 4 1,878 10-29-2013, 09:32 PM
Last Post: FORTIN Pascal
  Prime Program number of set bits kris223 3 1,844 10-23-2013, 03:05 PM
Last Post: David Hayden
  How to use XnView to create .gro4 file as in OpenFire? arturfeghali 2 1,338 06-27-2013, 05:57 PM
Last Post: jerome ibanes
  HP85 Programmable ROM cardtridge 82929A-service ROM not working- inaki 2 1,856 04-25-2013, 08:08 AM
Last Post: inaki
  [41CL] Repairing an image in Flash Monte Dalrymple 0 883 01-24-2013, 07:01 PM
Last Post: Monte Dalrymple
  Able to set HP 48G axis tick marks at integers? Randal B 1 1,053 01-24-2013, 12:40 AM
Last Post: Chris Dreher
  shelf life time of a ROM, EEPROM, EPROM vs Mask Rom Guido (Canada) 6 2,931 01-11-2013, 04:09 PM
Last Post: Thomas Falk
  Big ROM - 41 System DEMO ROM Ángel Martin 5 2,529 10-16-2012, 05:28 AM
Last Post: Ángel Martin

Forum Jump: