Date : Thu, 26 Jan 2012 15:09:09 +0000 (GMT)
From : info@... (Sprow)
Subject: CRC-8 algorithm
In article <c873124d282edbcf6f03e50d201aa07b@...>,
J.G.Harston <jgh@...> wrote:
> I have a need for an 8-bit CRC algorithm (transmitting up to about
> 20 bytes, CRC-16 would be overkill, and I'd prefer a CRC rather
> than a checksum).
Would the one in the BBC micro tape filing system be suitable?
Pasted from my RFS ROM formatter, RFSHead, line 1710:
.calccrc
LDA#0:STAcrcH:STAcrcL:TAY
.next
LDAcrcH:EOR(vL%),Y:STAcrcH
LDX#8
.again
LDAcrcH:ROLA:BCCover
LDAcrcH:EOR#8:STAcrcH
LDAcrcL:EOR#16:STAcrcL
.over
ROLcrcL:ROLcrcH:DEX:BNEagain
INY
CPYlength%:BNEnext
LDXcrcH:LDYcrcL:RTS
.crcL
EQUB0
.crcH
EQUB0
Sprow.