At 01:03 PM 6/29/98 PDT, you wrote: >I am looking for a fast non-table driven 8 bit CRC algorithm. >Any help appreciated. Below text of the procedure is intended for creation 16-bit CRC non-tabled, it is possible to alter under 8-bit. cblock 0x30 AH,AL,DH,DL,BH,BL,CX; endc .... ..... code ..... CRC_IT clrw movwf AH ; movf AL,0 ; xorwf DH ; movf AH,0 ; xorwf DL ; movlw 08h ; movwf CX ; _C2: movf DH,0 ; movwf BH ; movf DL,0 ; movwf BL ; clrw ; bcf Status,C ; rlf DL ; rlf DH ; btfss BH,7 ; goto _C3 ; movlw 10h ; xorwf DH ; movlw 21h ; xorwf DL ; _C3: decfsz CX ; goto _C2 ; return Original source for x86 ; Written by Chris Barrett (3:690/660.25) ; The following non table-based routine produces the same CRC16's ; as required by the EMSI standard so I assume it's correct. ; Released into the Public Domain ; Pass - DS:SI = pointer to the buffer ; - CX = length of the buffer ; Returns - DX = CRC16 of the buffer IDEAL SEGMENT code BYTE PUBLIC ASSUME cs:code MODEL TPASCAL PUBLIC UpdateCRC16 PROC UpdateCRC16 FAR inBUF:DWORD,inlen:WORD Returns result:word PUSH DS lds si,[inbuf] ; ds:si := ^inbuf mov cx,[inlen] ; cx := inlen CLD ; Move forward through the buffer SUB DX,DX ; CRC := 0000h C1: LODSB ; AL := byte at DS:SI SUB AH,AH XCHG AH,AL ; AX := 256 * AL XOR DX,AX ; CRC := CRC xor AX PUSH CX MOV CX,8 C2: MOV BX,DX SHL DX,1 AND BX,8000h JZ C3 XOR DX,1021h C3: LOOP C2 POP CX LOOP C1 MOV [RESULT],dx POP DS RET ENDP ENDS END