Witam wszystkich,

Mam nastepujacy problem. Chcialabym przetlumaczyc nastepujacy kod na jezyk delphi, ale mi nie wychodzi :(

unsigned XMODEMcrc(unsigned char byt, unsigned crc)
/* Update the CRC with a new byte */
{
crc = (crc << 8) table[byt (crc >> 8)];
return crc;
}

unsigned crc_buf(unsigned char *buf, unsigned length, unsigned crc)
{

//Calculate the crc of a buffer full of characters
while (length--)
{
crc = XMODEMcrc(*buf, crc);
buf++;
}
return crc;
}

Bardzo prosze o pomoc.

Pozdrawiam