mov ax,0FFFFh ;preset CRC mov cx,byte_count ;buffer size mov si,offset buffer ;buffer pointernow, the 7 instructions, plus the loop instruction
recv_9: xor bx,bx ;2 zero bytes xor al,[si] ;modulo 2 difference with CRC LSB inc si xchg al,bl ;form table index in BX xchg ah,al ;and right shift CRC by 8 shl bx,1 ;index to table xor ax,crc_tbl[bx] ;modulo 2 diff with table value loop recv_9At this point AX contains the CRC if you were generating one.
The table necessary for this algorithm is available for $15 (check or money order) from
MPUCoder
P.O. Box 652
South Hadley MA.
01075-0652
Be sure to include your return address or email address.
Back to MPUCoder Home