相关代码 |
|
;FUNCTION NAME: GENERATE_CHECK_BYTE ;FUNCTION: GENERATE 1 CHECK BYTE FOR 4 BYTES DATA IN EXTERNAL DATA MEMORY ;CHECK BYTE=(DPTR+3)XOR(DPTR+2)XOR(DPTR+1)XOR(DPTR)XOR55H ; GENERATE_CHECK_BYTE MOV B,#00H MOV R2,#04H;COUNT $1 MOVX A,@DPTR XRL A,B MOV B,A INC DPTR DJNZ R2,$1 XRL A,#55H MOVX @DPTR,A RET