2012年自考微型計算機及接口技術題十_第2頁
來源:
考試網 [ 2012年2月29日 ] 【大 中 小】
2. 8255方式0,A口輸入,輸入的數(shù)高4位不變低4位取反,在8255的C口輸出,有鍵按下返回DOS,無鍵按下繼續(xù)執(zhí)行。
code segment
assume cs:code
start: mov dx,28bh
mov al,90h
out dx,al
l1: mov dx,288h
in al,dx
xor al,0fh
mov dx,28ah
out dx,al
mov ah,1
int 16h
jz l1
mov ah,4ch
int 21h
code ends
end start
3.8255方式0,C口低4位輸入數(shù)據(jù)取反,在8255的C口高4位輸出,有鍵按下返回DOS,無鍵按下繼續(xù)執(zhí)行。
code segment
assume cs:code
start: mov dx,28bh
mov al,81h
out dx,al
l1: mov dx,28ah
in al,dx
mov cl,4
shl al,cl
xor al,0f0h
mov dx,28ah
out dx,al
mov ah,1
int 16h
jz l1
mov ah,4ch
int 21h
code ends
責編:snrvge