FILTER3:
MOV R2,#04H
SRT:
MOV A,R2
MOV R3,A
MOV R0,#SAMP
LOOP:
MOV A,@R0
INC R0
MOV R1,A
CLR C
SUBB A,@R0
MOV A,R1
JC DONE
MOV A,@R0
DEC R0
XCH A,@R0
INC R0
MOV @R0,A
DONE:
DJNZ R3,LOOP
DJNZ R2.,SORT
INC R0
MOV A,@R0
RET
SAMP EQU 30H