crcword
crcword
calculate CRC on word
Code: 27 F4
Description: Generate a CRC (cyclic redundancy check) checksum from Areg. Breg
contains the previously accumulated checksum and Creg the polynomial divisor (or
‘generator’). The new CRC checksum, the polynomial remainder, is calculated by
repeatedly (BitsPerWord times) shifting the accumulated checksum left, shifting in
successive bits from the Areg and if the bit shifted out of the checksum was a 1, then
the generator is exclusive-ored into the checksum.
Definition:
Areg′ ← temp(BitsPerWord)
Breg′ ← Creg
Creg′ ← undefined
where
temp(0) = Breg
for i = 1 .. 32
temp(i) = (temp(i -1) << 1) + AregBitsPerWord-i)
⊗ (Creg × temp(i −1)BitsPerWord-1)
Error signals: none
Comments:
Secondary instruction.
See also: crcbyte
57/212
®