下面的程怎么样改才能合我的要求啊请高手指教<br />tm1 equ 100<br />tm2 equ 10<br /> org 0000h<br /> ajmp start<br /> org 000bh<br /> ajmp time0<br /> org 30h<br />start: mov p1,#0ffh<br /> mov r7,#00h<br /> mov r6,#00h<br /> mov tmod,#00000001b<br /> mov th0,#00h<br /> mov tl0,#001h<br /> setb ea<br /> setb et0<br /> setb tr0<br /> clr 0<br />loop: ajmp loop<br />time0: jb 0,tp4 <br /> cpl p1.0<br /> ajmp ttp <br />tp4: cpl p1.4<br />ttp: inc r7<br /> mov a,r7<br /> cjne a,#tm1,t_ret<br /> mov r7,#0<br /> inc r6<br /> mov a,r6<br /> cjne a,#tm2,t_ret<br /> mov r6,0<br /> cpl 0<br />t_ret: mov th0,#00h<br /> mov tl0,#001h<br /> reti<br /> end |
|