polluxtech
Programmer
Hi friends:
I have a problem, need help.
I capture data to a binary file,and have to zero checksum one sector of data.
The binary file like this:
00 01 02 03 04 05 06 07
00H: 0xa0 0x12 0x13 0xf0 0xf1 0xc2 0xc4 0xea
08H: 0xab 0x32 0x13 0xf0 0xb1 0xc5 0xa7 0x5a
10H: 0xb0 0x12 0x08 0xa0 0xf1 0xc2 0xc6 0xe1
18H: 0xa0 0x12 0x23 0xd0 0xf1 0xc2 0xc4 0x34
20H: 0xc4 0x12 0x13 0xe0 0xf1 0xc3 0xe4 0x52
My job is to zero checksum bytes data from offset 04H to 18H. It means that I need to check if 0xf1+0xc2+0xea+...+0xa0=0, if not I have to change the last byte's value(offset 18H) to make the check sum to equal zero.
But I find the the aspect does not support unsigned byte data type. I confused. Need help. Thanks in advanced.
I have a problem, need help.
I capture data to a binary file,and have to zero checksum one sector of data.
The binary file like this:
00 01 02 03 04 05 06 07
00H: 0xa0 0x12 0x13 0xf0 0xf1 0xc2 0xc4 0xea
08H: 0xab 0x32 0x13 0xf0 0xb1 0xc5 0xa7 0x5a
10H: 0xb0 0x12 0x08 0xa0 0xf1 0xc2 0xc6 0xe1
18H: 0xa0 0x12 0x23 0xd0 0xf1 0xc2 0xc4 0x34
20H: 0xc4 0x12 0x13 0xe0 0xf1 0xc3 0xe4 0x52
My job is to zero checksum bytes data from offset 04H to 18H. It means that I need to check if 0xf1+0xc2+0xea+...+0xa0=0, if not I have to change the last byte's value(offset 18H) to make the check sum to equal zero.
But I find the the aspect does not support unsigned byte data type. I confused. Need help. Thanks in advanced.