Thema: Delphi LSB Parity Checksumme

Einzelnen Beitrag anzeigen

Benutzerbild von Berserker
Berserker

Registriert seit: 15. Dez 2002
Ort: Chemnitz
164 Beiträge
 
Delphi 6 Professional
 
#3

Re: LSB Parity Checksumme

  Alt 29. Mai 2007, 19:29
Hi.

Danke erstmal für die schnelle Antwort.

Also ein Befehl sind 8 Bytes.
Byte1 bis Byte8.

Die Summe von Byte2 bis Byte8 wird von FFFFh abgezogen.
Funtkioniert auch.

Jetzt muss nur von der Summe die übrig bleibt das LSB rauskommen.

Beispiel:

Byte2: 00h
Byte3: 01h
Byte4: 01h
Byte5: 00h
Byte6: 01h
Byte7: 20h
Byte8: 00h

= Dezimal: 35
= Hex: 23h

FFFFh - 23h = FFDCh

LSB of FFDCh = DC;

brauche also nur eine Funktion für das LSB.
  Mit Zitat antworten Zitat