Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
XOR checksum for BCC (block check character)
Message
From
06/12/2004 14:42:58
 
 
To
06/12/2004 13:00:49
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6 SP3
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00966910
Message ID:
00967290
Views:
10
>>I may have. What is your routine returning as the BCC value? Do you have any more data samples I can try?
>
>
>I don't know how hardware calculate this BCC, but I thought it was a simple XOR for all bytes, so I do it with
>
>. . .
> for i = 1 to 11
> result = bitxor ( result, MyByte(i) )
> endfor
>. . .
>
>and the result isn't the same as hardware did.
>
>
>I have some more data samples if you can try them:
>
>
>2,87,110,107,32,48,49,49,48,48,3 --> BCC: 23 (Why isn't it 67 ?)
>2,87,110,107,32,48,49,50,48,48,3 --> BCC: 24 (Why isn't it 64 ?)
>2,87,110,107,32,48,49,51,48,48,3 --> BCC: 29 (Why isn't it 65 ?)
>2,87,110,107,32,48,50,49,48,48,3 --> BCC: 146 (Why isn't it 64 ?)
>2,87,110,107,32,48,50,50,48,48,3 --> BCC: 157 (Why isn't it 67 ?)
>
>
>Thank's, Zlatko.

FWIW, my method returns the same results as yours. Looking at your data, I question whether this is really an XOR or some other calculation. As your last 2 samples result in the MSB set with none in the data, an XOR it is not. I'll try a couple of other things to see if I can make some sense of this.
Previous
Reply
Map
View

Click here to load this message in the networking platform