Seems #blitz #basic for #amiga doesn't have an exclusive or #xor #eor numeric operator?? This makes implementing #CRC harder than necessary, needing inline #m68k #assembly for at least some of it:
```
Function XOR.b{x.b, y.b}
GetReg d0, x.b
GetReg d1, y.b
eor.b d1, d0
PutReg d0, z.b
Function Return z.b
EndFunction
```
(untested)
http://www.sunshine2k.de/articles/coding/crc/understanding_crc.html links to http://users.ece.cmu.edu/~koopman/roses/dsn04/koopman04_crc_poly_embedded.pdf which claims 0xA6 is a good 8-bit CRC polynomial for large input lengths, though it seems that is the most significant 8 bits (instead of the least significant 8 bits), with implicit trailing 1 (instead of implicit leading 1), to make it compatible with the first article I think I need rotate the byte 1 bit to give 0x4D.
#blitz #basic #amiga #xor #eor #crc #m68k #assembly