Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
XOR checksum for BCC (block check character)
Message
De
06/12/2004 14:42:58
 
 
À
06/12/2004 13:00:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6 SP3
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
00966910
Message ID:
00967290
Vues:
14
>>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform