看到我的程序能运行真的好高兴!我有向前迈进了一步!
程序很简单,可我为他尽力了!这是这一年来第一次这样高兴!努力吧!要知道‘学如逆水行舟,不进则退’
数显是:7SEG-MPX2-CA可以用7406驱动或PN4275
org 0000h
mov 31h,#00h
mov 30h,#00h
mov dptr,#tab
mov r5,#020h
main:mov a,30h
anl a,#0fh
movc a,@a+dptr
mov p0,a
mov p2,#01h
lcall ys
mov a,31h
anl a,#0fh
movc a,@a+dptr
mov p0,a
mov a,p2
rl a
mov p2,a
lcall ys
mov r1,#04h
loop2:mov r2,#64h
loop1:nop
nop
nop
nop
nop
nop
nop
nop
djnz r2,loop1
djnz r1,loop2
djnz r5,main
mov r5,#020h
inc 30h
mov a,30h
cjne a,#0ah,main
inc 31h
mov 30h,#00h
mov a,31h
cjne a,#0ah,main
mov 31h,#00h
sjmp main
ys:mov r3,#010h
l:mov r4,045h
lo:nop
nop
djnz r4,lo
djnz r3,l
ret
tab: db 02h,09fh,024h,00dh,99h,049h,040h,01fh,000h,009h
end
|