IDLST EQU 2000H N EQU 6 OBJH DATA 30H OBJL DATA 31H FIND BIT 00H TEST: MOV P2,#HIGH(IDLST) MOV R0,#LOW(IDLST) MOV DPTR,#DATS MOV R2,#60H LOOP: CLR A MOVC A,@A+DPTR MOVX @R0,A INC R0 INC DPTR DJNZ R2,LOOP MOV OBJH,#78H MOV OBJL,#33H LCALL BLKSRCH MOV OBJH,#2FH MOV OBJL,#68H LCALL BLKSRCH STOP: LJMP STOP BLKSRCH: MOV R2,#N MOV DPTR,#IDLST IDSRCH: MOVX A,@DPTR MOV R4,A INC DPTR MOVX A,@DPTR MOV R5,A INC DPTR MOVX A,@DPTR MOV R6,A INC DPTR MOVX A,@DPTR INC DPTR CLR C SUBB A,OBJL MOV A,R6 SUBB A,OBJH JNC IDSRCHE DJNZ R2,IDSRCH CLR FIND RET IDSRCHE: MOVX A,@DPTR MOV R6,A INC DPTR MOVX A,@DPTR CLR C SUBB A,R5 MOV R7,A MOV A,R6 SUBB A,R4 RRC A MOV R6,A MOV A,R7 RRC A MOV R7,A JZ BLK0 INC R6 BLK0: MOV DPH,R4 MOV DPL,R5 BLK1: MOVX A,@DPTR INC DPTR MOV R2,A MOVX A,@DPTR INC DPTR XRL A,OBJL JNZ BLK2 MOV A,R2 XRL A,OBJH JZ BLK3 BLK2: DJNZ R7,BLK1 DJNZ R6,BLK1 CLR FIND RET BLK3: MOV A,#0FEH ADD A,DPL MOV DPL,A JC BLK4 DEC DPH BLK4: SETB FIND RET