After Translate (C2PAS) :
for (i := 0; i < cnt; i++) (* cnt = number of protocol bytes without CRC *)
begin
crc ^ := DATA[i];
for (j := 0; j < 8; j++)
begin
if (crc (* C2PAS: RefOrBit? *)& 0x0001) then
crc := (crc >> 1) ^ CRC_POLYNOM
else
crc := (crc >> 1);
end;
end;
what is this?? ( >> )
please (400 point :) ) i want to this code translatee..
Main Topics
Browse All Topics





by: c567591Posted on 2004-11-03 at 14:28:04ID: 12488246
Here is a rough translation: net/)
Translated by OpenCtoPas (http://c2pas.sourceforge.
unsigned internal CRC := CRC_PRESET;
for (i := 0; i < cnt; i++) (* cnt = number of protocol bytes without CRC *)
begin
crc ^ := DATA[i];
for (j := 0; j < 8; j++)
begin
if (crc or 0x0001) then
crc := (crc >> 1) ^ CRC_POLYNOM
else
crc := (crc >> 1);
end;
end;