微机原理与接口技术高手帮解一道题?

2024-12-29 18:11:04
推荐回答(2个)
回答1:

从右到左循环点亮
假设8255端口地址为80h和81h
stack segment
dw 64 dup(0)
stack ends
code segment
assume cs:code
start: mov al,80h
out 81h,al
mov al,01h
a1: out 80h,al
call dally
rol al,1
jmp a1
dally: push cx
mov cx,0ffffh
a2: loop a2
pop cx
ret
code ends
end start
鄙视楼上的laoyou7300 !! (复制我的,由于我修改了回答,竟然跑到他下面了)

回答2:

stack segment
dw 64 dup(0)
stack ends
code segment
assume cs:code
start: mov al,80h
out 81h,al
mov al,01h
a1: out 80h,al
call dally
rol al,1
jmp a1
dally: push cx
mov cx,0ffffh
a2: loop a2
pop cx
ret
code ends
end start