GAININTER: MOV DPTR,#0080H MOVX A,@DPTR ANL A,#03H CJNE A,#01H,NEWGAIN3;01 不等于01则判断是否为10 CLR ET0 SETB EX0 GAINWAIT: MOV R1,#0ffH MOV R2,#0ffH MOV R3,#2 GAINWAITA: MOVX A,@DPTR ANL A,#03H CJNE A,#01H,NGAINWAITA ;01 不等于01则继续执行 jb gainbit,gainwaita0 DJNZ R1,GAINWAITA MOV R1,#255 DJNZ R2,GAINWAITA mov r2,#0ffh djnz r3,gainwaita setb gainbit CLR EX0 gainwaita0: ; clr gainbit LJMP CHANGEDEC ;LJMP LOOP |