I have extracted the following line from an intel HEX file in which some 8051 simulators believe have an incorrect checksum while an online tool believes it has a valid checksum.
The online tool I used is: here (https://www.fischl.de/hex_checksum_calculator)
The simulator I use is the 8051 machine found at http://www.jroweb.de/8051/. It complains this line has an incorrect checksum and displays this message:
"Checksum error in line 1 ($37 / $38). Continue?"
If I change the 7 to 8 in the last character of the above hex string then the error from the 8051 machine is no longer present.
So I try another simulator by TS controls and it doesn't even say anything about checksums yet it shows my assembly code being messed up (missing a byte of data)
I've never had anything happen like this before. Could it be that the order of 8051 assembler instructions I'm using be causing bad checksums? Is the checksum system that weak for the intel hex file? or is something not calculating it correctly?
I also made my own program in C that verifies the checksum calculation. All I did was make the checksum value to be calculated an unsigned char variable, and added all the hex pairs in the line and negated the grand total and added 1. (or am I only supposed to do the checksum of just the data fields only and not the description fields)?