Declaration:
unsigned long CheckSum(unsigned long start_addr, unsigned long end_addr, int addr_space);
Description
Calculates the checksum for data in the addr_space memory that starts from start_addr and ends at end_addr. The checksum is calculated by simple addition of byte values.
Returned value
The 32-bit checksum.
Example
printf("%08lX", CheckSum(0, 0x1FFF, AS_DATA));
|