2 ; Piotr Fusik, 14.11.2001
4 ; unsigned long __fastcall__ crc32 (unsigned long crc, unsigned char* buf,
10 .import compleax, incsp2, incsp4, popax, popeax
11 .importzp sreg, ptr1, ptr2, tmp1, tmp2
13 POLYNOMIAL = $EDB88320
28 eor #(POLYNOMIAL>>24)&$FF
32 eor #(POLYNOMIAL>>16)&$FF
36 eor #(POLYNOMIAL>>8)&$FF
41 bcs @L4 ; branch always
63 ; ptr2 = (len & 0xff) == 0 ? len : len + 0x100;
73 ; if (buf == NULL) return 0;
76 ; if (!tables_initialised) make_tables();
83 ; if (len == 0) return crc;
93 ; crc = (crc >> 8) ^ table[(crc & 0xff) ^ *p++];