CRCST: MOV R1,#0 MOV R2,#0 MOV R3,#2 MOV R4,#144 MOV DPTR,#DTPINT CRC1: MOV R5,#8 MOVX A,@DPTR INC DPTR CRC2: CLR C RLC A XCH A,R2 RLC A XCH A,R2 XCH A,R1 RLC A XCH A,R1 JNC CRC3 XRL 1,#80H XRL 2,#05 CRC3: DJNZ R5,CRC2 DJNZ R4,CRC1 DJNZ R3,CRC1 LCALL DECD MOV A,R1 MOVX @DPTR,A INC DPTR MOV A,R2 MOVX @DPTR,A RET