Does anybody has a code of Cyclic Redundancy Check implemented in assembly??
You might want to specify which CRC you want. Also list the polynomial, just so posters will be sure it's the right one.
Everything you ever needed to know about CRCs: http://www.repairfaq.org/filipg/LINK/F_crc_v3.html See also: http://www.8052.com/forum/read.phtml?id=77621
Write a procedure that performs CRC computation. The same procedure should be used for CRC computation at the transmitter and the receiver. The procedure should perform computation on frames with size multiple of 8 bits and a maximum of 127 bytes. You would also need a macro to rotate an array of up to 127 bytes by one bit. CRC Computation at the source is performed as follows; since a 16 bit standard polynomial is used, 16 zeros are appended to the end of the k-bit frame. The (k+16) bits are supplied to the CRC circuit as shown in figure 3. After (k+16) shifts the remainder value obtained in the shift register is the CRC. This value is simply appended to the k bits of the original message. At the destination, the circuit performs the same operation on the received (k+16) bit frame, without appending zeros. An error is reported only if the remainder value is different than zero. A file needs to be divided into blocks of 127 bytes, the last block may have less than 127 bytes. The error control operation has to be performed on the already encrypted data. This phase can be performed without having to link the two computers together. Tests should be carried out and results reported.
Thank you sir!
"The same procedure should be used for CRC computation at the transmitter and the receiver" The algorithm (or "procedure") must be the same - but there may need to be differences in the detail of the implementation if the transmitter and the receiver run on different architectures; eg, if one is big-endian and the other is little-endian...
"a 16 bit standard polynomial is used" There are many standard 16-bit polynomials - which one do you want?
Assume the data frame: 1010001101, and the polynomial generator: G(X) = X^5 + X^4 + X^2 + 1