adzhuanhuanchengxu.txt
来自「左边输入,八位显示外部译码八位显示。AD转换程序」· 文本 代码 · 共 63 行
TXT
63 行
Z8279 EQU 212H
D8279 EQU 210H
LEDMOD EQU 00 ;左边输入,八位显示外部译码八位显示
LEDFEQ EQU 38H ;扫描频率
CODE SEGMENT
ASSUME CS:CODE,DS:code
START: push cs
pop ds
call delay
MOV DX,Z8279
MOV AL,LEDMOD
OUT DX,AL
MOV AL,LEDFEQ
OUT DX,AL
MOV CX,06H
XZ: MOV DX,D8279
MOV AL,00H
OUT DX,AL
LOOP XZ
MOV DX,D8279
MOV AL,5eH
OUT DX,AL
MOV DX,D8279
MOV AL,77H
OUT DX,AL ;以上为写(AD )
NOP
bg: mov dx,208h
mov al,0
out dx,al
call delay
in al,dx
mov cl,04h
ror al,cl
and al,0fh
MOV BL,AL ;查表,将键码放入AL中
push ax
mov cx,08h
mov al,00h
clear: out dx,al
loop clear
mov dx,z8279
mov al,83h
out dx,al
MOV AL,BL
pop ax
LEA BX,LED
XLAT
MOV DX,D8279 ;将AL中内容写到数码管上
OUT DX,AL
call delay
jmp bg
LED DB 3FH,06H,5BH,4FH,66H,6DH,7DH,07H,7FH,6FH,77H,7CH,39H
DB 5EH,79H,71H
delay proc near
push cx
mov cx,0f00h
loop $
pop cx
ret
delay endp
CODE ENDS
END START
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?