📄 1数码管.asm
字号:
code segment public
assume cs:code
org 100h
start:
mov dx,04a0h
in al,dx
mov si,offset LEDsz
mov di,offset LEDtb
mov cx,10h
mov bx,0
ord: cmp al,byte ptr [si+bx]
jz output
inc bx
loop ord
jmp start
LEDsz: db 0,1,2,3,4,5,6,7,8,9,0ah,0bh,0ch,0dh,0eh,0fh
LEDtb: db 3fh,06h,5bh,4fh,66h,6dh,7dh,07h,7fh,6fh,77h,7ch,39h,5eh,79h,71h
output:
mov dx,04b0h
mov al,byte ptr [di+bx]
out dx,al
call delay
mov al,0
mov dx, 04b0h
out dx, al
call delay
jmp start
delay proc
push cx
mov cx,20000
lop: loop lop
pop cx
ret
delay endp
code ends
end start
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -