[fpc-pascal] old school crc32

wkitty42 at windstream.net wkitty42 at windstream.net
Sun Jul 24 21:46:41 CEST 2016


On 07/24/2016 06:41 AM, Tony Whyman wrote:
> On 24/07/16 00:18, wkitty42 at windstream.net wrote:
>> i've already checked the polynomial ($edb88320) is the same in both, the
>> original implementation (converted to TP4 in 1988) and this implementation...
>
> Are you sure that you are dealing with a CRC algorithm? ISO 8073 TP4 uses an
> arithmetic checksum (Fletcher).

ahhh... TP4 in this case is Turbo Pascal v4... i've had a lot of code for a very 
long time... especially code that was posted to the PASCAL and PASCAL_LESSONS 
echos on Fidonet ;)

> If you are using genuine CRC32 then
>
> http://www.tty1.net/pycrc/
>
> is a good reference for all the different variations. It will generate 'C' code
> for you but still a good baseline reference. I've used it successfully for CRC
> implementations (some quite oddball in the aviation sector).

thanks for the info! if you've read my other posts by now, you'll see that the 
function in FPC's crc unit does some things automatically that blow our desired 
operation out of the water... we have to initialize the crc variable ourselves, 
feed each character individually to the crc routine and then leave off the 
finalization which flips all the bits over... it comes down to needing the 
result in LSB to MSB format like was used with analogue UARTS which feed the 
values to the serial port in reverse...

-- 
  NOTE: No off-list assistance is given without prior approval.
        *Please keep mailing list traffic on the list* unless
        private contact is specifically requested and granted.



More information about the fpc-pascal mailing list