Post Reply 
HP 35s Checksum explained
02-09-2015, 10:36 PM (This post was last modified: 02-09-2015 11:00 PM by Tugdual.)
Post: #11
RE: HP 35s Checksum explained
Unfortunately I have a bad news... I just found that there is indeed a major flaw with this checksum calculation.
Literals, i.e. any string in your code including EQN as well as constant values are sharing a certain memory area and therefore are allocated by blocks. The 3 bytes OP Code contains an offset to its literal ASCII string which seems to be included in the checsum calculation. And this is really a very stupid design because the checksum will depend on your calculator context.
In particular all EQN are sharing, again the same area as any literal in your code. Therefore it is pretty easy to demonstrate the problem, starting from a MEMORY CLEAR state:
Case 1
Code:
[MEMORY CLEAR]
LBL A
1
->7991

Case 2
Code:
[MEMORY CLEAR]
EQN 123456789 // first create a random EQN before you start editing your code
// Now enter the same code as before
LBL A
1
->7A1D

In the case 2 the literal "1" doesn't have the same address as in case 1 because it is pushed ahead by the previous EQN declaration and this is fooling the CRC calculation.

Conclusion
The idea of implementing a CRC was very good, the way it is done makes me feel extremely sad for myself as a customer and for Hp. How sbdy can spend so much effort designing a CRC procedure and then fail so miserably on such an obvious and basic aspect is above me. I'm afraid this definitely concludes the question of CRC.

This being said, I keep thinking that this calculator is a good one despite its flaws and most of the calculations I did to establish these findings were done using the 35s Hexa capabilities, (except some brute force for which I used the PC... much much faster). Special thanks to Didier who somehow helped me to understand what was going on.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP 35s Checksum explained - Tugdual - 02-08-2015, 05:43 PM
RE: HP 35s Checksum explained - Tugdual - 02-09-2015, 09:20 AM
RE: HP 35s Checksum explained - Gerald H - 02-09-2015, 12:57 PM
RE: HP 35s Checksum explained - Tugdual - 02-09-2015, 04:07 PM
RE: HP 35s Checksum explained - Tugdual - 02-09-2015, 04:42 PM
RE: HP 35s Checksum explained - Tugdual - 02-09-2015 10:36 PM
RE: HP 35s Checksum explained - Tugdual - 02-10-2015, 01:53 PM
RE: HP 35s Checksum explained - Paul Dale - 02-14-2015, 08:44 AM
RE: HP 35s Checksum explained - Tugdual - 02-14-2015, 08:57 AM
RE: HP 35s Checksum explained - Tugdual - 02-11-2015, 06:55 PM
RE: HP 35s Checksum explained - Tugdual - 02-11-2015, 08:45 PM
RE: HP 35s Checksum explained - Tugdual - 02-14-2015, 08:38 AM



User(s) browsing this thread: 1 Guest(s)