The Museum of HP Calculators

HP Forum Archive 14

[ Return to Index | Top of Index ]

HP41 ROM Checksum
Message #1 Posted by Meindert Kuipers on 25 Oct 2004, 10:18 a.m.

While writing the PC user interface for the MLDL2000 I thought it would be nice to show some info about the ROM being loaded into the MLDL. One of the items would be the ROM checksum at the end of the ROM with the indocation if it is OK or not. I thought I had figured out the algorithm, but I am failing miserably in translating it to Delphi.

My interpretation is:

Simply add all 10-bit ROM words together, except the checksum itself. For any overflow (carry) generated in a 10-bit addition a 1 extra is added. The calculated checksum is the 1's complement of the result of the additions. What am I missing here?

      
Re: HP41 ROM Checksum
Message #2 Posted by Raymond Del Tondo on 25 Oct 2004, 11:04 a.m.,
in response to message #1 by Meindert Kuipers

Hi,

did you take a look into the sources of v41 or the associated SDK?

Raymond

            
Re: HP41 ROM Checksum
Message #3 Posted by Meindert Kuipers on 25 Oct 2004, 2:11 p.m.,
in response to message #2 by Raymond Del Tondo

It was indeed right under my nose. Now get it to work ....

      
Re: HP41 ROM Checksum
Message #4 Posted by Mike (Stgt) on 25 Oct 2004, 1:11 p.m.,
in response to message #1 by Meindert Kuipers

Here my PIPE routine for that, hope that helps:

* * * Top of File * * *                                    
/* test checksum of hp-41 modules */ signal on error       
   'PEEKTO s'; if words(s) > 1 then s = 2; else s = 1      
   'CALLPIPE *:!spec pad 0 w' s '2!spec w1 x2d!spec',      
     'printonly eof a: w1 . set #0+=a eof print #0 1!var s'
   do while s >= 1024; s = s // 1024 + s % 1024; end       
   'OUTPUT' s                                              
error:; exit rc * (rc <> 12)                               
* * * End of File * * *

Ciao.....Mike

Edited: 25 Oct 2004, 1:11 p.m.

      
Re: HP41 ROM Checksum
Message #5 Posted by Meindert Kuipers on 25 Oct 2004, 2:30 p.m.,
in response to message #1 by Meindert Kuipers

Am I stupid or what? Forgot to initialize the variable holding the checksum, sorry guys .....

It works now


[ Return to Index | Top of Index ]

Go back to the main exhibit hall