The Museum of HP Calculators

HP Forum Archive 14

[ Return to Index | Top of Index ]

Private ROM on HP-41, some observations (long)
Message #1 Posted by Miki Mihajlovic on 11 Nov 2004, 9:11 p.m.

Here is some information about PRIVATE ROM for HP-41 that I gathered mostly by deduction and information from SDSII manual.

HP made it possible for people putting their programs in ROM images to make them PRIVATE. It is assumed that you are using SDSII kit to create your ROM images. Chapters 7 and 8 of SDSII manual contain some guidence but no detailed explanation since the whole process is rather automatic.

In your ROM define file the line that defines ROM number, header etc. can contain PRIVATE command:

&ROM#=17,HEADER=MYROMNAME.1A,PRIVATE

This will change some bits and add some level 0 code to the ROM image automaticaly by BUILD utility.

I have built two identical ROM images (from Geometry solutions book) and comaped them. Here are the differences:

ROM FAT:

C000 011 XROM NO.=17 C001 00B 11 FUNCTIONS C002 000 FCT:GEOMETRY 1A C003 025 ADR: C025 C004 200 FCT:`TANGENT C005 028 ADR: C028 C006 201 FCT:`DIST C007 020 ADR: C120 ...

1) 1st word before program entry point has bit 9 set if PRIVATE :

Non-PRIVATE PRIVATE ----------------- ----------------- ... ... C027 210 PLDI: 84 C027 310 PLDI: C4 C028 1C4 PLDI: 71 C028 1C4 PLDI: 71 C029 001 PLDI: 00 C029 001 PLDI: 00 ... ...

2) Last word of the program has bit 8 set if PRIVATE:

Non-PRIVATE PRIVATE ----------------- ----------------- ... ... C11D 22F JC C0E2 -3B C11D 26F JC C0EA -33 C11E 01C PT= 3 C11E 01C PT= 3 C11F 250 LD@PT- 9 C11F 350 LD@PT- D C120 1CA A=A-C PT<- C120 1CA A=A-C PT<- ... ...

3) After all the programs the following 13 words are added if PRIVATE :

Non-PRIVATE PRIVATE ----------------- ----------------- ... ... C7E1 01B JNC C7E4 +03 C7E1 01B JNC C7E4 +03 C7E2 22F JC C7A7 -3B C7E2 26F JC C7AF -33 C7E3 000 NOP C7E3 0CC ?FSET 10 C7E4 000 NOP C7E4 05B JNC C7EF +0B C7E5 000 NOP C7E5 34C ?FSET 12 C7E6 000 NOP C7E6 04F JC C7EF +09 C7E7 000 NOP C7E7 10E A=C ALL C7E8 000 NOP C7E8 338 READ 12(b) C7E9 000 NOP C7E9 1BC RCR 11 C7EA 000 NOP C7EA 0AE A<>C ALL C7EB 000 NOP C7EB 15C PT= 6 C7EC 000 NOP C7EC 362 ?AC @PT C7ED 000 NOP C7ED 017 JC C7EF +02 C7EE 000 NOP C7EE 348 SETF 12 C7EF 000 NOP C7EF 1E0 GOTO ADR ... ...

4) At the end of the listing at address (CFB2-CFF3, CFF8) a code (microcode table?) is included about which I have no knowledge or any information from SDSII manual. However, if you are not worried about polling points and have no MCODE routines just FOCAL programs I assume that it is safe to zero out all that to the CFFB. If somebody knows something more about this, please correct me.

1234

      
Re: Private ROM on HP-41, some observations (long)
Message #2 Posted by Emmanuel, France on 12 Nov 2004, 2:34 a.m.,
in response to message #1 by Miki Mihajlovic

Another point :
Before Clonix41, I was only using SDS-II.
I was loading programs(read41p), creating my own ROMs (build),
dumping the others (readmldl), creating EPROM sets (highlow, eprom).
The most important thing that rom images (*.41R) had the same size as Clonix41 images (*.ROM),
i.e. 8192 bytes.
Under DOS command window, I RENAMEd rom_image.41R rom_image.ROM
And it worked in a Clonix41. It's magical, isn't it?

12345

Edited: 12 Nov 2004, 2:35 a.m.

      
Re: Private ROM on HP-41
Message #3 Posted by Mike (Stgt) on 12 Nov 2004, 7:30 a.m.,
in response to message #1 by Miki Mihajlovic

Hi Miki!

Tnx U a lot 4 sharing your observations. I never used SDS-II, only ZEN-ROM and RAM-Box from W&W. May be I find an hour this WE to have a closer look (after I did reply some postponed eMails - sorry Tony).

Ciao.....Mike

            
Re: Private ROM on HP-41
Message #4 Posted by Raymond Del Tondo on 12 Nov 2004, 11:48 a.m.,
in response to message #3 by Mike (Stgt)

Hi Mike,

why use SDSII, when you can use SDK41 from TOS ?
It's easy to use.

Regards,

Raymond

                  
Re: Private ROM on HP-41
Message #5 Posted by Miki Mihajlovic on 12 Nov 2004, 12:25 p.m.,
in response to message #4 by Raymond Del Tondo

Hi Raymond,

You are right to say that SDK41 is much easier to use and more powerful but there are some bugs in D41, A41... Try it yourself, disassemble a ROM (I used Sandbox) and assemble it again and there will be some differences. Some macro commands are different, I let Warren know about it but I guess he has no time or interest to debug it.

1234

                  
Re: Private ROM on HP-41
Message #6 Posted by Mike (Stgt) on 12 Nov 2004, 1:54 p.m.,
in response to message #4 by Raymond Del Tondo

Hi Raymond!

Thank you 4 your hint, but I like to see what code SDS-II put in in addition if you "private" user code in ROM. Just curious if it's something useful.

Ciao.....Mike


[ Return to Index | Top of Index ]

Go back to the main exhibit hall