FILTER6:
MOV A,7FH
MOV B,#3
M1jL AB
MOV DPTR,#2000H
ADD A,DDL
MOV DPL,A
MOV A, R6
MOVX @DPTR,A
INC DPTR
MOV A, R2
MOVX @DPTR,A
INC DPTR
MOV A,R3
MOVX @DPTR,A
MOV A,7FH
INC A
CJNE A,#15,FSA1
CLR A
FSA1:
MOV 7FH,A
MOV R0,#15
INC DPTR
FSA2:
MOV A, DPL
CJNE A,#30H,FSA3
MOV DPL,#0
FSA3:
MOVX A,@DPTR
MOV R7,A
INC DPTR
MOVX A,@DPTR
MOV R4,A
INC DPTR
MOVX A,@DP'TR
MOV R5,A
INC DPTR
CLR 3AH
MOV A,R6
MOV C,ACC.7
MOV 38H,C
XRL A,R7
JNB ACC.7,LOOP6
CPL 3AH
MOV A,R6
MOV C,ACC.6
MOV ACC.7,C
MOV R6,A
MOV A,R7
MOV C,ACC.6
MOV ACC.7,C
MOV R7,A
CLR C
MOV A,R6
SUBB A,R7
JZ LOOP7
CLR PSW.5
CLR 39H
JB ACC.7,LOOP10
CJNE R4,#0,LOOP11
CJNE R5,#0,LOOP11
LOOP7:
JB 3AH,LOOP13
MOV A,R3
ADD A,R5
MOV R3,A
MOV A,R2
ADDC A,R4
MOV R2,A
JNC LOOP9
SETB 39H
CLR C
LOOP8:
CLR PSW.5
LCALL FSDT
LOOP9:
CJNE R2,#0,FAB
CJNE R3,#0,FAB
MOV R4,#41H
RET
FAB:
MOV A,R6
MOV C,38H
MOV ACC.7,C
XCH A,R4
MOV R6,A
RET
LOO10:
CJNE R2,#0,LOOP12
CJNE R3,#0, LOOP12
MOV A ,R7
MOV R6,A
SJMP LOOP7
LOOP11:
CPL PSW.5
LOOP12:
CLR C
LCALL FSDT
SJMP LOOP6
LOOP13:
MOV A,R3
CLR C
SUBB A,R5
MOV R3,A
MOV A,R2
SUBB A,R4
MOV R2,A
JNC LOOP14
CLR A
CLR C
SUBB A,R3
MOV R3,A
CLR A
SUBB A,R2
MOV R2,A
CPL 38H
LOOP14:
SETB C
SJMP LOOP8
MOV A, R4
MOV R6,A
DJNZ R0,FSA2
MOV C, A.7
DEC A
DEC A
DEC A
DEC A
MOV A.7,C
MOV R4,A
MOV A,R4
MOV @R1,A
INC R1
MOV A,R2
MOV @R1,A
INC R1
MOV A,R3
MOV @R1,A
DEC R1
DEC R1
RET