收藏 分销(赏)

微机原理与接口技术(第二版)第十章习题解答.doc

上传人:快乐****生活 文档编号:10820004 上传时间:2025-06-18 格式:DOC 页数:9 大小:184.01KB 下载积分:6 金币
下载 相关
微机原理与接口技术(第二版)第十章习题解答.doc_第1页
第1页 / 共9页
微机原理与接口技术(第二版)第十章习题解答.doc_第2页
第2页 / 共9页


点击查看更多>>
资源描述
<p>微机原理与接口技术(楼顺天第二版)习题解答 第10章 并行接口芯片8255A应用设计 10.1答:方式0是基本的输入/输出,端口A、B、C都可以作为输入输出端口。适用于CPU与非智能I/O设备的数据传输; 方式1是有联络信号的输入/输出,端口A、B都可以设定成该方式,此时三个端口的信号线分成了A、B两组,用作A组的联络信号,用作B组的联络信号。适用于高速CPU与低速I/O设备的数据传输; 方式2是双向传输,只有A组端口可以设定成该方式,PC6~PC7用作输出的联络信号,PC4~PC5用作输入的联络信号,PC3用作中断请求信号。适用于双机之间数据的并行传送。 10.2 答:(1)PC6~PC7用作输出的联络信号,PC4~PC5用作输入的联络信号,PC3用作中断请求信号,PC0~PC2用作基本I/O。 (2)PC4~PC5用作输入的联络信号,PC3用作中断请求信号,PC1~PC2用作输入的联络信号,PC0用作中断请求信号。PC6~PC7用作基本I/O。 (3)PC6~PC7用作输出的联络信号,PC4~PC5用作输入的联络信号,PC3用作中断请求信号,PC1~PC2用作输入的联络信号,PC0用作中断请求信号。 (4):由外设(输入设备)提供的选题脉冲,表示将外设送来的数据锁存到端口寄存器; IBF:是8255A向外设信号的响应,表示端口寄存器已经收到数据,但尚未被CPU取走(CPU通过读命令从端口寄存器取走数据后,IBF自动变为0); :由8255A向外设(输出设备)发出的数据准备好信号,表示CPU已经将数据写入端口寄存器; :外设向8255A发回的响应,其有效表示外设已经将数据从端口寄存器取走,该信号使得8255A的变高,CPU可以再一次向8255A发送数据; INTE:是8255A内的中断允许触发器,可以通过对C口的PC6,PC4,PC2通过按位置位/复位命令字设定; INTR:是8255A进行选通输入输出时的中断请求信号,A口的选通输入输出用PC3,B口的选通输入输出用PC0。 10.3 答:8255A工作在方式1输入或输出时,中断请求信号从C口的PC3引出;输入中断由INTEA(PC4通过按位置位/复位命令字设定)和IBF相与产生,输出中断由INTEA(PC6通过按位置位/复位命令字设定)和相与产生;中断屏蔽由PC6,PC4通过按位置位/复位命令字设定。 10.4 答:1, 1, 1 10.5 答:A口+ PC3~PC7;B口+ PC0~PC2。 10.6 答:1 10.7 答:0 10.8 答:PC3~PC7 10.9 答:1~3 10.10 答:中断允许触发器, PC6,PC4 10.11 答:(1)D (2)A,D (3)D (4)D (5)A (6)A (7)B 10.12 答:MOV DX,303H MOV AL,10000011B OUT DX,AL MOV DX,302H IN AL,DX MOV CL,4 SHL AL,CL OUT DX,AL 10.13 答:(1)根据题目给出的端口地址,在8086最小方式系统下,8255A与K15~K0以及4个发光二极管的连接图如下所示。 (2) 编写程序段实现连续检测并显示开关量中“1”的个数。开关量中“1”的个数以二进制形式显示。 MOV DX,8F07H MOV AL,10010010B &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;端口A、B方式0输入,端口C方式0输出 OUT DX,AL NEXT: MOV DX,8F03H &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;从端口B读取高8位开关量 IN AL,DX XCHG AL,AH MOV DX,8F01H &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;从端口A读取低8位开关量 IN AL,DX MOV BX,AX XOR AL,AL MOV CX,16 CLC L2: SHL BX,1 JNC L1 INC AL L1: LOOP L2 MOV DX,8F05H &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;从端口C送出 OUT DX,AL JMP NEXT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;进行下一次检测 10.14 答:8255A与IBM PC机总线的连接框图如下: 可将8255A的端口A作为要产生的信号的输出端口,设定为方式0输出,端口B和端口C不做使用,均设定为方式0输出。程序段如下: &nbsp; &nbsp; &nbsp; &nbsp;MOV &nbsp; DX,263H &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;设定8255A的工作方式 &nbsp; &nbsp; &nbsp; &nbsp;MOV &nbsp; AL,10000000B &nbsp; &nbsp; &nbsp; &nbsp;OUT &nbsp; DX,AL &nbsp; &nbsp; &nbsp; &nbsp;MOV &nbsp; DX,260H &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;产生指定信号 &nbsp; &nbsp; &nbsp; &nbsp;XOR &nbsp; AL,AL &nbsp; &nbsp; &nbsp; &nbsp;OUT &nbsp; DX,AL REP: &nbsp; &nbsp; &nbsp; &nbsp;MOV &nbsp; AL,80H &nbsp; &nbsp; &nbsp; &nbsp;MOV &nbsp; CX,7 REP1: &nbsp; &nbsp; &nbsp; &nbsp;OUT &nbsp; DX,AL &nbsp; &nbsp; &nbsp; &nbsp;SAR &nbsp; AL,1 &nbsp; &nbsp; &nbsp; &nbsp;LOOP &nbsp;REP1 &nbsp; &nbsp; &nbsp; &nbsp;MOV &nbsp; CX,8 REP2: &nbsp; &nbsp; &nbsp; &nbsp;SHL &nbsp; &nbsp;AL,1 &nbsp; &nbsp; &nbsp; &nbsp;OUT &nbsp; DX,AL &nbsp; &nbsp; &nbsp; &nbsp;LOOP &nbsp;REP2 &nbsp; &nbsp; &nbsp; &nbsp;JMP &nbsp; REP 10.15 答:由于开关量是16为数据,故可以将8255A的PA端口与PB端口设定为方式0,分别读取开关量的低八位和高八位,以PC端口的低三位控制八选一电路的输出依次从X0到X7,使用PC端口的高四位输出最大开关量的序号(该序号为1~8),控制发光二极管的亮灭以指示序号。 连接图如下:(下面电路中,当八选一输出Y有效时,能选通1组16位开关量数据) 程序段如下: &nbsp; &nbsp; &nbsp; MOV &nbsp;DX,263H &nbsp; &nbsp; &nbsp; MOV &nbsp;AL,10010010B ;设定工作方式,PA,PB均工作于方式0,PA、PB为 ;输入,PC为输出 &nbsp; &nbsp; &nbsp; OUT &nbsp; DX,AL &nbsp; &nbsp; &nbsp; MOV &nbsp; CX,8 &nbsp; &nbsp; &nbsp; XOR &nbsp; BX,BX &nbsp; &nbsp; &nbsp; MOV &nbsp; SI,0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;SI表示输入开关量的序号 ST1: &nbsp; &nbsp; &nbsp; MOV &nbsp; DX,262H &nbsp; &nbsp; &nbsp; MOV &nbsp; AL,SI &nbsp; &nbsp; &nbsp; &nbsp; OUT &nbsp; DX,AL &nbsp; &nbsp; &nbsp; MOV &nbsp; DX,260H &nbsp; &nbsp; &nbsp; &nbsp;;将开关量数据的低八位读入AL &nbsp; &nbsp; &nbsp; IN &nbsp; &nbsp; &nbsp;AL,DX &nbsp; &nbsp; &nbsp; MOV &nbsp; AH,AL &nbsp; &nbsp; &nbsp; MOV &nbsp; DX,261H &nbsp; &nbsp; &nbsp; &nbsp;;将开关量数据的高八位读入AL &nbsp; &nbsp; &nbsp; IN &nbsp; &nbsp; &nbsp;AL,DX &nbsp; &nbsp; &nbsp; XCHG &nbsp;AH,AL &nbsp; &nbsp; &nbsp; CMP &nbsp; BX,AX &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; JA &nbsp; &nbsp; NEXT &nbsp; &nbsp; &nbsp; MOV &nbsp; BX,AX &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;将当前最大值保存在BX中 &nbsp; &nbsp; &nbsp; MOV &nbsp; DI, SI &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;将当前最大值的序号保存到DI中 NEXT: &nbsp; &nbsp; &nbsp; INC &nbsp; &nbsp; SI &nbsp; &nbsp; &nbsp; LOOP &nbsp; ST1 &nbsp; &nbsp; &nbsp; MOV &nbsp; &nbsp;AX, DI &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MOV &nbsp; &nbsp;CL,4 &nbsp; &nbsp; &nbsp; ROL &nbsp; &nbsp; AL,CL &nbsp; &nbsp; &nbsp; &nbsp;;将最大值的序号(4位)移至AL的高四位 &nbsp; &nbsp; &nbsp; MOV &nbsp; &nbsp;DX,262H &nbsp; &nbsp; &nbsp; OUT &nbsp; &nbsp;DX,AL &nbsp; &nbsp; &nbsp; &nbsp;;PC的高四位输出最大值序号 10.16 答:根据题图,8255A的端口地址为3F0H~3F6H中的4个偶地址端口。 中断向量表设置和8255A初始化程序段如下: ;设置A口的中断向量 &nbsp; &nbsp;PUSH DS &nbsp; &nbsp;MOV AX,0 &nbsp; &nbsp;MOV DS,AX &nbsp; &nbsp;MOV SI,4AH &nbsp; &nbsp;SHL SI,1 &nbsp; &nbsp;SHL SI,1 &nbsp; &nbsp;MOV [SI],OFFSET SERV &nbsp; &nbsp;;中断服务程序偏移地址存入向量表 &nbsp; &nbsp;ADD SI,2 &nbsp; &nbsp;MOV AX,CS &nbsp; &nbsp;MOV [SI],AX &nbsp; &nbsp; ;中断服务程序的段地址存入向量表 &nbsp; &nbsp;POP DS &nbsp; &nbsp; ;设置8255A的工作方式 &nbsp; &nbsp;MOV DX,3F6H &nbsp; &nbsp;MOV AL,10111001B &nbsp; &nbsp;;A口方式1,输入;B口方式0,输出;C口输入 &nbsp; &nbsp;OUT DX,AL ;设置INTEA=1 &nbsp; &nbsp; &nbsp; &nbsp;MOV AL,00001001B &nbsp; &nbsp;;PC4置位 &nbsp; &nbsp;OUT DX,AL &nbsp; 10.17 答:根据题图,8255A的端口地址为180H~187H。PC0输出,PC5和PC6输入。A口输出,所以A口方式0,输出;B口方式0,输出;C口高半部输入,C口低半部输出。方式命令字为10001000B。 程序段为: ;设置8255A的工作方式 &nbsp; &nbsp;MOV DX,186H &nbsp; &nbsp; &nbsp; &nbsp; ;控制字口地址送DX &nbsp; &nbsp;MOV AL,10001000B &nbsp; &nbsp;;A口方式0,输出;B口方式0,输出; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;C口高半部输入,C口低半部输出 &nbsp; &nbsp;OUT DX,AL ;查询C口PC5、PC6 &nbsp; &nbsp;MOV DX,184H &nbsp; &nbsp; &nbsp; &nbsp; ;C口地址送DX CHECK:IN AL,DX &nbsp; &nbsp;TEST AL,01100000B &nbsp; &nbsp;JNZ CHECK ;输出CHAR变量数据,数据送到8255A的A端口寄存器 &nbsp; &nbsp; &nbsp; &nbsp;MOV AL,CHAR &nbsp; &nbsp; &nbsp; &nbsp; ;输出数据送AL &nbsp; &nbsp;MOV DX,180H &nbsp; &nbsp; &nbsp; &nbsp; ;A口地址送DX &nbsp; &nbsp;OUT DX,AL &nbsp; ;向打印机发选通信号,一个低电平的脉冲,先置位PC0,再复位PC0 ;然后延时,再置位PC0 &nbsp; &nbsp;MOV DX,186H &nbsp; &nbsp;MOV AL,00000001B &nbsp; &nbsp;OUT DX,AL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;置位PC0 &nbsp; &nbsp;MOV AL,00000000B &nbsp; &nbsp;OUT DX,AL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;复位PC0 &nbsp; &nbsp;CALL DELAY &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;延时 &nbsp; &nbsp;MOV AL,00000001B &nbsp; &nbsp;OUT DX,AL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;置位PC0 &nbsp; &nbsp;HLT &nbsp; &nbsp; &nbsp; DELAY: &nbsp;MOV CX,0FFFH DELAY1: NOP &nbsp; &nbsp;LOOP DELAY1 &nbsp; &nbsp;RET 10.18 答:根据题图,8255A的端口地址为38H~3EH中的偶地址。A口方式0输出,B口方式0输入,C口低半部输入,高半部输出。 程序段为: ;设置8255A的工作方式 &nbsp; &nbsp;MOV DX,03EH &nbsp; &nbsp; &nbsp; &nbsp; ;控制字口地址送DX &nbsp; &nbsp;MOV AL,10000011B &nbsp; &nbsp;;A口方式0,输出;B口方式0,输入; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;C口高半部输出,C口低半部输入 &nbsp; &nbsp;OUT DX,AL &nbsp; &nbsp; &nbsp; &nbsp;MOV CX,100 &nbsp; &nbsp; ;启动输入机,通过置位/复位实现一个高电平脉冲 SETSTART: &nbsp; &nbsp;MOV DX,03EH &nbsp; &nbsp;MOV AL,00001100B &nbsp; &nbsp;OUT DX,AL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;复位PC6 &nbsp; &nbsp;MOV AL,00001101B &nbsp; &nbsp;OUT DX,AL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;置位PC6 &nbsp; &nbsp;CALL DELAY &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;延时 &nbsp; &nbsp;MOV AL,00001100B &nbsp; &nbsp;OUT DX,AL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;复位PC6 ;查询C口PC1 &nbsp; &nbsp;MOV DX,03CH &nbsp; &nbsp; &nbsp; &nbsp; ;C口地址送DX CHECK:IN AL,DX &nbsp; &nbsp;TEST AL,00000010B &nbsp; &nbsp;JZ CHECK &nbsp; ;输入数据 &nbsp; &nbsp;MOV DX,03AH &nbsp; &nbsp; &nbsp; &nbsp; ;B口地址送DX &nbsp; &nbsp;IN AL,DX &nbsp; &nbsp;MOV CHARS,AL &nbsp; &nbsp; &nbsp; &nbsp;;将输入字符存入CHARS变量中 ;查询C口PC0 &nbsp; &nbsp;MOV DX,03CH &nbsp; &nbsp; &nbsp; &nbsp; ;C口地址送DX CHECK1:IN AL,DX &nbsp; &nbsp;TEST AL,00000001B &nbsp; &nbsp;JZ CHECK1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;输出CHAR变量数据,数据送到8255A的A端口寄存器 &nbsp; &nbsp; &nbsp; &nbsp;MOV AL,CHARS &nbsp; &nbsp; &nbsp; &nbsp; ;输出数据送AL &nbsp; &nbsp;MOV DX,038H &nbsp; &nbsp; &nbsp; &nbsp; ;A口地址送DX &nbsp; &nbsp;OUT DX,AL &nbsp; ;向打印机发选通信号,一个低电平的脉冲,先置位PC0,再复位PC0 ;然后延时,再置位PC0 &nbsp; &nbsp;MOV DX,03EH &nbsp; &nbsp;MOV AL,00001110B &nbsp; &nbsp;OUT DX,AL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;复位PC7 &nbsp; &nbsp;MOV AL,00001111B &nbsp; &nbsp;OUT DX,AL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;置位PC7 &nbsp; &nbsp;CALL DELAY &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;延时 &nbsp; &nbsp;MOV AL,00001110B &nbsp; &nbsp;OUT DX,AL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;复位PC7 &nbsp; &nbsp; &nbsp; &nbsp;LOOP SETSTART &nbsp; &nbsp;HLT &nbsp; &nbsp; &nbsp; DELAY: &nbsp;PUSH CX &nbsp; &nbsp; &nbsp; &nbsp;MOV CX,0FFFH DELAY1: NOP &nbsp; &nbsp;LOOP DELAY1 &nbsp; &nbsp; &nbsp;POP CX &nbsp; &nbsp;RET 10.19 答:根据题图,8255A的一组端口地址为8000H~8006H,8259A的一组端口地址为8020H和8022H。8255A的B口工作在方式1,输出。中断向量为97H。 程序段为: ;设置B口的中断向量 &nbsp; &nbsp;PUSH DS &nbsp; &nbsp;MOV AX,0 &nbsp; &nbsp;MOV DS,AX &nbsp; &nbsp;MOV SI,97H &nbsp; &nbsp;SHL SI,1 &nbsp; &nbsp;SHL SI,1 &nbsp; &nbsp;MOV [SI],OFFSET INT_SERVICE &nbsp; &nbsp;;中断服务程序偏移地址存入向量表 &nbsp; &nbsp;ADD SI,2 &nbsp; &nbsp;MOV AX,CS &nbsp; &nbsp;MOV [SI],AX &nbsp; &nbsp; ;中断服务程序的段地址存入向量表 &nbsp; &nbsp;POP DS &nbsp; &nbsp; ;设置8255A的工作方式 &nbsp; &nbsp;MOV DX,8006H &nbsp; &nbsp;MOV AL,10000100B &nbsp; &nbsp;;A口方式0,输出;B口方式1,输出;C口输出 &nbsp; &nbsp;OUT DX,AL ;设置INTEA=1 &nbsp; &nbsp; &nbsp; &nbsp;MOV AL,00000101B &nbsp; &nbsp;;PC2置位 &nbsp; &nbsp;OUT DX,AL &nbsp; ;8259A初始化程序段 &nbsp; &nbsp;MOV DX,8020H &nbsp; &nbsp; &nbsp; &nbsp;;8259A的偶地址端口 &nbsp; &nbsp;MOV AL,00011011B &nbsp; &nbsp;;电平触发、单片、要ICW4 &nbsp; &nbsp;OUT DX,AL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;写ICW1 &nbsp; &nbsp;MOV DX,8022H &nbsp; &nbsp;MOV AL,90H &nbsp; &nbsp;OUT DX,AL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;写ICW2 &nbsp; &nbsp;MOV AL,00000011B &nbsp; &nbsp;;一般全嵌套、非缓冲、自动中断结束 &nbsp; &nbsp;OUT DX,AL &nbsp; &nbsp; ;向8255A的B口输出一个字符 &nbsp; &nbsp;MOV BX,OFFSET DISPCHAR &nbsp; &nbsp;MOV DX,8002H &nbsp; &nbsp;MOV AL,[BX] &nbsp; &nbsp;OUT DX,AL &nbsp; &nbsp; &nbsp; &nbsp;JMP $ &nbsp; &nbsp; ;中断服务程序 INT_SERVICE: STI &nbsp; &nbsp;;开中断 &nbsp; &nbsp;INC BX &nbsp; &nbsp;;下面程序段检查200个字符输出完否 &nbsp; &nbsp;MOV SI,OFFSET DISPCHAR &nbsp; &nbsp;ADD SI,200 &nbsp; &nbsp;CMP BX,SI &nbsp; &nbsp;JB OUTPUT &nbsp; &nbsp;MOV DX,8022H &nbsp; &nbsp; &nbsp;;送9259A的基地址给DX &nbsp; &nbsp;MOV AL,10000000B &nbsp; &nbsp;OUT DX,AL &nbsp; &nbsp; &nbsp; &nbsp; ;屏蔽IR7 &nbsp; &nbsp;JMP OVER OUTPUT: &nbsp; &nbsp;MOV AL,[BX] &nbsp; &nbsp; ;获取打印数据 &nbsp; &nbsp;MOV DX,802H &nbsp; &nbsp; &nbsp; &nbsp; ;B口地址送DX &nbsp; &nbsp;OUT DX,AL OVER: &nbsp; IRET &nbsp; &nbsp; 10.20 答:(1)电路图如下: (2)8255A的初始化程序 ;设置8255A的工作方式 &nbsp; &nbsp;MOV DX,0FF03H &nbsp; &nbsp;MOV AL,10100000B &nbsp; &nbsp;;A口方式1,输出;B口方式0,输出;C口输出 &nbsp; &nbsp;OUT DX,AL ;设置INTEA=1 &nbsp; &nbsp; &nbsp; &nbsp;MOV AL,00001101B &nbsp; &nbsp;;PC6置位 OUT DX,AL &nbsp; (3)8259A初始化程序 ;8259A初始化程序段 &nbsp; &nbsp;MOV DX,0FF0CH &nbsp; &nbsp; &nbsp; &nbsp;;8259A的偶地址端口 &nbsp; &nbsp;MOV AL,00010011B &nbsp; &nbsp;;边沿触发、单片、要ICW4 &nbsp; &nbsp;OUT DX,AL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;写ICW1 &nbsp; &nbsp;MOV DX,0FF0DH &nbsp; &nbsp;MOV AL,80H &nbsp; &nbsp;OUT DX,AL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;写ICW2 &nbsp; &nbsp;MOV AL,00000011B &nbsp; &nbsp;;一般全嵌套、非缓冲、自动中断结束 OUT DX,AL (4);设置B口的中断向量 &nbsp; &nbsp;PUSH DS &nbsp; &nbsp;MOV AX,0 &nbsp; &nbsp;MOV DS,AX &nbsp; &nbsp;MOV SI,83H &nbsp; &nbsp;SHL SI,1 &nbsp; &nbsp;SHL SI,1 &nbsp; &nbsp;MOV [SI],OFFSET PRINT &nbsp; &nbsp;;中断服务程序偏移地址存入向量表 &nbsp; &nbsp;ADD SI,2 &nbsp; &nbsp;MOV AX,CS &nbsp; &nbsp;MOV [SI],AX &nbsp; &nbsp; ;中断服务程序的段地址存入向量表 POP DS 中断服务程序 ;中断服务程序 INT_SERVICE: STI &nbsp; &nbsp;;开中断 &nbsp; &nbsp;INC BX &nbsp; &nbsp;;下面程序段检查200个字符输出完否 &nbsp; &nbsp;MOV SI,OFFSET BUF &nbsp; &nbsp;ADD SI,100 &nbsp; &nbsp;CMP BX,SI &nbsp; &nbsp;JB OUTPUT &nbsp; &nbsp;MOV DX,0FF0DH &nbsp; &nbsp; &nbsp;;送8259A的奇地址给DX &nbsp; &nbsp;MOV AL,00001000B &nbsp; &nbsp;OUT DX,AL &nbsp; &nbsp; &nbsp; &nbsp; ;屏蔽IR3 &nbsp; &nbsp;JMP OVER OUTPUT: &nbsp; &nbsp;MOV AL,[BX] &nbsp; &nbsp; ;获取打印数据 &nbsp; &nbsp;MOV DX,0FF00H &nbsp; &nbsp; &nbsp; &nbsp; ;8255A的A口地址送DX &nbsp; &nbsp;OUT DX,AL OVER: &nbsp; IRET &nbsp;</p>
展开阅读全文

开通  VIP、SVIP  下载更划算
下载10份以上建议开通 VIP 会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传

当前位置:首页 > 考试专区 > 其他

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        关注我们

©2010-2026 宁波自信网络信息技术有限公司  版权所有

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服