AcornSearch - Acorn and RISC OS information searching
RISC OS Search
containing
"Nutty quip goes here!"
Home  |  About  |  Filebase Archive  |  StrongHelp Manuals  |  Newsgroups  |  Module Database
*     R0 =     Old (Start) CRC value
           If R1 < 256 or R2=0
                 R1 =     Byte to add
           If R1 ³ &8000 and R2 > 0
                 R1 =     Start address of buffer in memory
                 R2 =     Length of buffer
*     R0 =     New CRC value
Re-entrant.

Calcuates 16-Bit CRCs compatible with the X/Y/Z-Modem polynominal (&8408)

Example

Note:     ddUtil versions <0.31a checked for R1 > &8000 instead of R1 ³ &8000!
ddu_CRC16 Basic example
CRC=0
FOR A=0 TO 1023
SYS "ddu_CRC16",CRC,Buffer?A TO CRC
NEXT A
is equal to
SYS "ddu_CRC16",0,Buffer,1024 TO CRC

[sh-index] Back to list of manuals