Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
XOR checksum for BCC (block check character)
Message
De
06/12/2004 13:00:49
 
 
À
05/12/2004 08:17:05
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:
00967265
Vues:
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform