TIMER_INI: MOV TMOD, #99H ORL P3, #00001100B ; SETB P3.2/SETB P3.3 RET
SUB_P3_2_3: CLR A MOV TL0, A MOV TL1, A MOV A, #10101111B ANL TCON, A ; CLR TR0/CLR TR1 CPL A
L1: JB P3.2, L2 JNB P3.3, L1 L2: JB P3.2, L2 JB P3.3, L2
ORL TCON, A ; SETB TR0/SETB TR1 CPL A JNB P3.2, $ JNB P3.3, $ ANL TCON, A; CLR TR0/CLR TR1 MOV A, TL1 SUBB A, TL0 JC $+3 RET CPL A INC A RET |