org 00h
start: mov r0,#8;初始化,右移次數(shù)與初始亮燈狀態(tài)
mov a, #01111111b
loop: mov p1,a
acall delay;調用延時子程序
rr a
djnz r0,loop
jmp start
delay: mov tmod,#00000001b
setb tr0
mov tl0,#0b0h ;延時50ms
mov th0,#3ch
jnb tf0,$
clr tf0
ret
end
本文引用地址:http://2s4d.com/article/201611/320414.htm
評論