Transfering HP-85 programs to HP-9915 EPROMs



I have been working (mainly over the Christmas holidays) on a method to transfer HP-85 Basic programs to an EPROM for the HP-9915. PROM boards are standard on the 9915 unlike tape drives which were an option. The method involves creating a LIF-like directory and breaking down programs into 256 byte records. Also each record has a two-byte checksum value added.

The whole method is on my web page at

This method uses LIFUTIL on the PC and HP-85 Basic programs. There are Series 80 binary programs around (and also utilities like SYSEXT on the HP-87) that can read raw sectors, but I wanted to use a basic approach that was easy for me to understand. I hope one day the original HP software pack for the 9915 surfaces, as there must be an easier way!

I would also welcome some help in understanding the CHECKSUM function, it does not seem to match IBM SDLC checksums as claimed in the manual.

BTW I would not be surprised if a similar method could be applied loading programs into EPROMs on the IPC (Integral PC).




Excellent work!

I wonder if anybody can help with that checksum algorithm, the manual says that it uses "the IBM SDLC Frame Check Sequence."

This is supposed to bea 16-bit CCITT polynomial, but no polynomial I have tried gives the same results as the CHECKSUM$ function on the 9915 Development ROM.

Here is a sample of some values calculated with the built-in function:



Thanks vp,

Can you clarify about your CHECKSUM exmaple, eg when you input the string "0001", surely in hex this is 30 30 30 31?

Also as a postscript I should have mentioned I developed the Basic programs on a PC using the HP-87 emulator, then transfered them to a real HP-85.



Hi John,

I hope to finish an alpha version of an HP85 emulator very soon
(based on my HP87 emulator).
The tape and printer are not working actually and when booting
the emulator say 'ERROR 23' :)

But an HP-IB interface and floppy-disc are working :)
(electronic disk don't work so it's not an HP85B emulator)

Just for completness, with the service rom, CPU and DISPLAY are ok,
only RAM 1 and 6 are OK (don't know why RAM 0,2,3,4,5,7,8 are bad..)
and of course, tape, printer, and timers don't pass the tests.



BTW did someone have an image of the Service rom for HP86/87 ?

I have some manuals about servicing the HP85 and 86, but the
diagnosis about the differents errors of the service rom are not
enough to implement the missing functionalities.

Is there somewhere a commented listing of thoses roms ?



Good to hear you are still working on the HP-85 emulator. I must admit I was a bit rusty on using the HP-87 emulator when I came to use it, so I wrote myself some notes on using disks etc as it was't obvious how to do this, I'll post them to the forum.

If you need any help with debugging your HP-85 emulator, do you want to start a new thread on this forum with any questions? For example, I have an HP-85, Assembler ROM and System Monitor module so (in theory) I can set breakpoints and single step through to see what a real HP-85 operates.

Also, how about an HP-83 emulator, as this doesn't have a tape drive or printer? I'm sure someone here will be able to dump the system ROM if needed.





The new release is ready. I send you a mail about it.
I can send it by mail (1,2Mo zip archive).

I still have some problems, perhaps from the roms.
There are at least 2 release for the HP85(A) system roms
and one for the HP85B. I don't know which release I use...



Seems to be CRC-16-X25. Please refer to

Crypto - Codes

I've checked it with the

online CRC calculator

I've entered 16 / 1021 / FFFF / FFFF / reverse data bytes. Hope this helps!

Best regards,
Juergen Keller


Thanks Juegen,

Having found the right parameters it should now be easy for someone to write a PC / Linux program to generate 9915 EPROM files straight from the extracted HP-85 Basic program.




I wrote a "brute force CRC finder" program when I was trying to identify the ROM check algorithm used by the HP Spice series calculators, as described in this blog entry.

The actual C code is in the Nonpareil Subversion repository; I can email you a copy if it's of any use to you, but it looks like Juergen Keller has already identified the polynomial.

The general things to try when a CRC polynomial doesn't seem to work right are:

  1. reverse byte ordering of data input
  2. reverse bit ordering within input bytes
  3. initialization value - usually all zeros or all ones
  4. bit order or byte order of result


many thanks everybody -- this was great


for completeness here is the C function that calculates the CRC of the supplied string:

typedef unsigned char   uchar;

// 'POLYNOM' is the CRC polynom without leading '1' bit
#define POLYNOM 0x1021
// 'crcinit' is the initial CRC value belonging to that algorithm
#define CRCINIT 0xffff
// 'CRCXOR' is the final XOR value
#define CRCXOR 0xffff
// 'CRCHIGHBIT' short with most significant bit set to 1
#define CRCHIGHBIT 0x8000

ushort hp85crc(uchar* p, ulong len)

int i, j;
uchar c;
ushort bit;
ushort crc = CRCINIT;

for (i=0; i<len; i++) {

c = *p++;

for (j = 1; j <= 0x80; j<<=1) {

bit = crc & CRCHIGHBIT;
crc<<= 1;
if (c & j) bit^= CRCHIGHBIT;
if (bit) crc^= POLYNOM;

crc^= CRCXOR;


and it is called like this:

        uchar string[] = "1234567890";

printf("crc(%s) = 0x%x\n", string,
hp85crc(string, strlen(string)));

Edited: 9 Feb 2006, 1:47 a.m.

Possibly Related Threads...
Thread Author Replies Views Last Post
  Does the HP Prime really compiles the user programs? CompSystems 3 1,190 12-13-2013, 01:55 PM
Last Post: Mike Morrow
  HP-41(CL): The easiest way to transfer FOCAL programs from a Linux PC to the HP-41 Geir Isene 13 2,745 12-05-2013, 02:40 AM
Last Post: Hans Brueggemann
  HP Prime: Lists in programs Alberto Candel 7 1,718 12-04-2013, 02:16 AM
Last Post: Alberto Candel
  HP Prime: FLOOR, iPart , and their use in programs Alberto Candel 6 1,285 12-01-2013, 10:17 PM
Last Post: Alberto Candel
  [HP-41][HP-71B][HP-75C/D][HP-IL] Found a mother-lode of programs on rdj 2 843 11-26-2013, 05:31 PM
Last Post: rdj
  HP Prime: matrices in programs, in need of help Alberto Candel 9 1,533 11-26-2013, 01:33 AM
Last Post: cyrille de Brébisson
  HP Prime: password protection for programs Davi Ribeiro de Oliveira 2 742 11-22-2013, 12:45 PM
Last Post: Geoff Quickfall
  Question about transfering programs to the HP Prime Namir 10 1,593 11-17-2013, 04:01 PM
Last Post: Namir
  HP Prime: do not send programs and shuts down by pressing Apps Davi Ribeiro de Oliveira 1 612 11-12-2013, 11:05 AM
Last Post: Joseph Ec
  Grouping programs on the HP Prime Michael de Estrada 11 1,769 11-04-2013, 01:38 PM
Last Post: Damien

Forum Jump: