| ??? 06/08/03 07:50 Read: times |
#47799 - How to keep tabs on checksum from C code |
Greetings :
In the days when I used to code in assembler, I used to do something like this ORG 0 StartOfCode: CheckSumCpl: dw xxyy some code here EndOfCode: End The checksum of the code residing between StartofCode and EndofCode is noted with the location CheckSumCpl set to 0000. The 2's complement of this is then stored in the CheckSumCpl location. Now, when the program is checksummed, the result is 0. I used this code fragment in some of my work to prevent tampering of the Eprom by others. Today, I wish to do the same thing in C. Is there anyone who has used this technique and can tell me how it works in C? Specific queries - 1) How to know the EndOfCode position without looking through the M51 file? 2) Is there a straight forward way to achieve this without compiling 2 to 3 times? My intention even today is the same, I wish to prevent tampering of my code. Any tips? Jerson Fernandes |
| Topic | Author | Date |
| How to keep tabs on checksum from C code | 01/01/70 00:00 | |
| RE: How to keep tabs on checksum from C code | 01/01/70 00:00 | |
RE: How to keep tabs on checksum from C code | 01/01/70 00:00 |



