如圖所示,8255A的PA口接一個(gè)LED共陰極數(shù)碼管。要求當(dāng)開關(guān)K閉合時(shí),顯示‘F’;斷開時(shí),顯示‘0’。已知:(1)‘0’字形碼為3FH,‘F’字形碼為71H;
(2)8255APA口地址:118H
PB口地址:119H
PC口地址:11AH
控制端口地址:11BH
試填寫下列程序段,完成以上功能。
MOV DX,()
MOV AL,82H
OUT DX.AL
HER:MOV DX,()
IN AL.DX
AND AL, ()
CMP AL,()
JZ HER1
MOV AL, ()
MOV DX, ()
OUT DX,AL
JMP HER
HER1: MOV AL, ()
MOV DX, ()
OUT DX,AL
JMP HER