📄 led.asm
字号:
org 000h
jmp 40h
org 40h
main:
;acall pro1
;acall pro2
acall pro3
ajmp main
pro1:
mov p0,#06h
setb p2.0
acall yanshi
clr p2.0
setb p2.1
acall yanshi
clr p2.1
setb p2.2
acall yanshi
clr p2.2
setb p2.3
acall yanshi
clr p2.3
setb p2.4
acall yanshi
clr p2.4
setb p2.5
acall yanshi
setb p2.6
clr p2.5
acall yanshi
clr p2.6
setb p2.7
acall yanshi
clr p2.7
ret
pro2:
setb p2.0
mov p0,#06h
acall yanshi
clr p2.0
setb p2.1
mov p0,#5bh
acall yanshi
clr p2.1
setb p2.2
mov p0,#4fh
acall yanshi
clr p2.2
setb p2.3
mov p0,#66h
acall yanshi
clr p2.3
setb p2.4
mov p0,#6dh
acall yanshi
clr p2.4
setb p2.5
mov p0,#7dh
acall yanshi
setb p2.6
clr p2.5
mov p0,#07h
acall yanshi
clr p2.6
setb p2.7
mov p0,#7fh
acall yanshi
clr p2.7
ret
pro3: mov r7,#00h
mov r4,#3
pro31:mov dptr,#tab
mov r5,#80h ;pian xuan
dir1: mov r0,#0
mov r6,#8
next: mov p2,r5
mov a,r0
add a,r7
movc a,@a+dptr
mov p0,a
acall yanshi
inc r0
mov a,r5
rr a
mov r5,a
djnz r6,next ;8ge xian shi
inc r7
djnz r4,pro31;kongzhi cishu 3
ret
yanshi:mov tmod,#10h
mov th1,#67h
mov tl1,#67h
setb tr1
ret
tab:db 06h,5bh,4fh,66h,6dh,7dh,07h,7fh
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -