📄 动态学号.asm
字号:
data segment
io8255a equ 288h
io8255c equ 28ah
io8255co equ 28bh
tab db 3fh,06h,5bh,4fh,66h,6dh,7dh,07h,7fh,6fh
data ends
code segment
assume ds:data,cs:code
start:
mov ax,data
mov ds,ax
mov dx,io8255co
mov al,10000000b;设置8255为a,c口输出
out dx,al
mov di,offset tab
clean macro
mov al,00h
mov dx,io8255c
out dx,al
endm
call function1
mov ah,01h
int 16h
jz function1
mov ah,4ch
int 21h
function1 proc near
mov al,byte ptr[di+0]
mov dx,io8255a
out dx,al
mov al,02h
mov dx,io8255c
out dx,al
call delay
clean
mov al,byte ptr[di+6]
mov dx,io8255a
out dx,al
mov al,01h
mov dx,io8255c
out dx,al
call delay
clean
mov al,byte ptr[di+3]
mov dx,io8255a
out dx,al
mov al,02h
mov dx,io8255c
out dx,al
call delay
clean
mov al,byte ptr[di+8]
mov dx,io8255a
out dx,al
mov al,01h
mov dx,io8255c
out dx,al
call delay
clean
mov al,byte ptr[di+2]
mov dx,io8255a
out dx,al
mov al,02h
mov dx,io8255c
out dx,al
call delay
clean
mov al,byte ptr[di+0]
mov dx,io8255a
out dx,al
mov al,01h
mov dx,io8255c
out dx,al
call delay
clean
mov al,byte ptr[di+2]
mov dx,io8255a
out dx,al
mov al,02h
mov dx,io8255c
out dx,al
call delay
clean
mov al,byte ptr[di+2]
mov dx,io8255a
out dx,al
mov al,01h
mov dx,io8255c
out dx,al
call delay
clean
function1 endp
delay proc near
mov cx,16572
push ax
w:
in al,61h
and al,00010000b
cmp al,ah
je w
mov ah,al
loop w
pop ax
ret
delay endp
code ends
end start
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -