摘要:
纯计算方式:procedure ByteCrc(data:byte;var crc:word);VAR i:BYTE;BEGIN FOR i:=0 TO 7 DO BEGIN IF ((data and $01)XOR(crc AND $0001)<>0) THEN BEGIN crc:=crc shr 1; crc:= crc XOR $A001; END ELSE crc:=crc shr 1; data:=data shr 1; // this line is not ELSE and executed anyway. END;END;func... 阅读全文