2012年自考微型计算机及接口技术题十_第3页
来源:
考试网 [ 2012年2月29日 ] 【大 中 小】
4。8255方式0,A口输入,C口输出。如果A口输入的数大于等于128,从C口输出
80H;否则将输入的数高4位不变低4位取反从C口输出,有键按下返回DOS,无键按下继续执行。
code segment
assume cs:code
start: mov dx,28bh
mov al,90h
out dx,al
l3: mov dx,288h
in al,dx
cmp al,80h
jae l1
xor al,0fh
mov dx,28ah
out dx,al
l2: mov ah,1
int 16h
jz l3
mov ah,4ch
int 21h
l1: mov al,80h
mov dx,28ah
out dx,al
jmp l2
code ends
end start
责编:snrvge