SEARCHB: MOV B,A MOV A,R1 ADD A,R7 MOV R7,A MOV A,R0 ADDC A,R6 MOV R6,A MOV A,R7 SUBB A,#01H MOV R7,A JNC SECH1 DEC R6 SECH1: MOV A,R7 CLR C SUBB A,R1 MOV A,R6 SUBB A,R0 JNC SECH2 MOV A,#0FFH RET SECH2: MOV A,R7 ADD A,R1 MOV R2,A MOV A,R6 ADDC A,R0 RRC A MOV DPH,A MOV A,R2 RRC A MOV DPL,A MOVX A,@DPTR CLR C SUBB A,B JNC SECH3 INC DPTR MOV R0,DPH MOV R1,DPL SJMP SECH1 SECH3: JZ SECH5 MOV A,DPL SUBB A,#01H MOV R7,A JNC SECH4 MOV R6,DPH DEC R6 SECH4: SJMP SECH1 SECH5: MOV R0,DPH MOV R1,DPL CLR A RET