Re: Re: An workable solution. But difficult. Wednesday, 10-Feb-99 17:50:18
Hi Princess Here is the CRC-32 routine: This routine calculates a running CRC-32 value on the buffer passed to it. You should use proper CRC pre and post-conditioning, meaning an initial start value of ~0 (all ones) and the final value be one's complemented. Below is an example pseudo-code using the CRC 32 routine: unsigned long far pascal crc32( unsigned char far *buffer, unsigned short int far *size, unsigned long far *old_crc); unsigned long crc_cal = ~0; unsigned short int size; extern char far buffer[]; /* some buffer containing */ /* data to be CRC'd */ while (data is being put in buffer) { size = amount of data in buffer; crc_val=crc32(buffer,&size,&crc_val); } crc_val=~crc_val; printf("Final CRC residual value is: %lu\n",crc_val); L8R Mushy!!! mushy |
The Mushy thread (mushy) (09-Feb-99 16:31:15) |