[计算机类试卷]PC技术机试模拟试卷95及答案与解析.doc

上传人:roleaisle130 文档编号:493514 上传时间:2018-11-28 格式:DOC 页数:4 大小:29KB
下载 相关 举报
[计算机类试卷]PC技术机试模拟试卷95及答案与解析.doc_第1页
第1页 / 共4页
[计算机类试卷]PC技术机试模拟试卷95及答案与解析.doc_第2页
第2页 / 共4页
[计算机类试卷]PC技术机试模拟试卷95及答案与解析.doc_第3页
第3页 / 共4页
[计算机类试卷]PC技术机试模拟试卷95及答案与解析.doc_第4页
第4页 / 共4页
亲,该文档总共4页,全部预览完了,如果喜欢就下载吧!
资源描述

1、PC技术机试模拟试卷 95及答案与解析 一、程序设计题 1 请编制程序 PROG1.ASM,其功能是:以 SOURCE开始的内存区域存放着红外数据通信系统传输的数据信息,其编码形式为: AACCXYXYDDEE,表示传送的数据为压缩 BCD码 XY。如 AACCl212DDEE表示数据 12。现要求编程实现解码,如果压缩 BCD码不是以 AACC开始或者不是以 DDEE结束或中间两个 BCD码不同,则此数据不解码。解码后的 BCD码存入 RESULT开始的内存区域。 例如: 原信息为:AAH,CCH,05H,05H,DDH,EEH,AAH,C8H,43H,43H,DDH,0EH,AAH,CCH

2、87H,87H,DDH,EEH, 结果为: 05H,87H, 部分程序已给出,其中原始数据由过程 LOAD从文件 INPUT1.DAT中读入SOURCE开始的内存单元中。运算结果要求从 RESULT开始存放,由过程 SAVE保存到文件 OUTPUT1.DAT中。 填空 BEGIN和 END之间已给出的源程序使其完整 (空白已用横线标出,每行空白一般只需一条指令,但采用功能相当的多条指令亦可 ),或删除 BEGIN和 END之间原有的代码并自行编程来完成要求的功能。 对程序必须进行汇编,并与 IO.OBJ链接产生 PROG1.EXE执行文件,最终运行程序产生结果 (无结果或结果不正确者均不得分

3、 )。调试中若发现整个程序中存在错误之处,请加以修改。 试题程序: EXTRN LOAD:FAR, SAVE:FAR N EQU 10 STAC SEGMENT STACK DB 128 DUP (?) STAC ENDS DATA SEGMENT SOURCE DB 6*N DUP(0) RESULT DB N DUP(0) NAME0 DB INPUT1.DAT,0 NAME1 DB OUTPUT1.DAT,0 DATA ENDS CODE SEGMENT ASSUME CS:CODE, DS:DATA, SS:STAC START PROC FAR PUSH DS XOR AX ,AX

4、PUSH AX MOV AX,DATA MOV DS,AX MOV ES,AX ; 置附加段寄存器 LEA DX,SOURCE ; 数据区起始地址 LEA SI,NAME0 ; 原始数据文件名 MOV CX,6*N ; 字节数 CALL LOAD ; 从 INPUT1.DAT中读取数 据 ; * BEGIN * LEA SI,SOURCE MOV DI,OFFSET RESULT MOV CX, (1) LPST: MOV DL, 6 MCLP1: MOV AL, (2) MOV BX,SI CMP AL,0AAH JNZ NEXTD INC SI MOV AL,SI CMP AL,0CCH

5、3) INC SI MOV AL,SI MOV DH,AL INC SI MOV AL,SI (4) JNZ NEXTD INC SI MOV AL,SI CMP AL,0DDH JNZ NEXTD INC SI MOV AL,SI CMP AL,0EEH JNZ NEXTD INC SI MOV DI,DH INC DI NEXTD: (5) MOV SI,BX (6) ; * END * LEA DX,RESULT ; 结果数据区首址 LEA SI,NAME1 ; 结果文件名起始地址 MOV CX,N ; 字节数 CALL SAVE ; 保存结果到 OUTPUT1.DAT文件中 RET START ENDP CODE ENDS END START PC技术机试模拟试卷 95答案与解析 一、程序设计题 1 【正确答案】 (1) 6*N (2) SI (3) JNZ NEXTD(4) CMP DH, AL (5) INC BX (6) LOOP MCLP1 【试题解析】 依次读入某组数据的元素,并按题目要求与指定数比较,若不相等,则准备读入下一组数据;若相等,则继续读入数据并比较,一直到读完该数组数据,并保存到目的区。

展开阅读全文
相关资源
猜你喜欢
  • BS PD CLC TR 50659-2017 Electromagnetic characteristics of linear cable management systems (CMS)《线形电缆管理系统(CMS)的电磁特性》.pdf BS PD CLC TR 50659-2017 Electromagnetic characteristics of linear cable management systems (CMS)《线形电缆管理系统(CMS)的电磁特性》.pdf
  • BS PD CLC TR 61340-5-2-2008 Electrostatics — nPart 5-2 Protection of electronic ndevices from electrostatic phenomena – nUser guide《静电学 第5-2部分 电子设备的静电保护 用户指南》.pdf BS PD CLC TR 61340-5-2-2008 Electrostatics — nPart 5-2 Protection of electronic ndevices from electrostatic phenomena – nUser guide《静电学 第5-2部分 电子设备的静电保护 用户指南》.pdf
  • BS PD CLC TR 61800-6-2007 Adjustable speed electrical power drive systems — Part 6 Guide for determination of types of load duty and corresponding current ratings《可调速电力驱动.pdf BS PD CLC TR 61800-6-2007 Adjustable speed electrical power drive systems — Part 6 Guide for determination of types of load duty and corresponding current ratings《可调速电力驱动.pdf
  • BS PD CLC TR 62102-2006 Electrical safety — Classification of interfaces for equipment to be nconnected to information and communications technology networks《电气安全性 连接至信息和通.pdf BS PD CLC TR 62102-2006 Electrical safety — Classification of interfaces for equipment to be nconnected to information and communications technology networks《电气安全性 连接至信息和通.pdf
  • BS PD CLC TR 62125-2008 Environmental nstatement specific to nTC 20 — Electric cables《针对IEC TC 20的环境报告 电缆》.pdf BS PD CLC TR 62125-2008 Environmental nstatement specific to nTC 20 — Electric cables《针对IEC TC 20的环境报告 电缆》.pdf
  • BS PD CLC TR 62271-208-2010 High-voltage switchgear nand controlgear nPart 208 Methods to quantify the steady nstate power-frequency electromagnetic nfields generated by .pdf BS PD CLC TR 62271-208-2010 High-voltage switchgear nand controlgear nPart 208 Methods to quantify the steady nstate power-frequency electromagnetic nfields generated by .pdf
  • BS PD CLC TR 62453-41-2009 2500 Field device tool (FDT) interface nspecification — nPart 41 Object model integration profile — nCommon object model《场器件工具接口规范(FDT) 第41部分 对象模型综合剖面.pdf BS PD CLC TR 62453-41-2009 2500 Field device tool (FDT) interface nspecification — nPart 41 Object model integration profile — nCommon object model《场器件工具接口规范(FDT) 第41部分 对象模型综合剖面.pdf
  • BS PD CLC TR 62453-501-2009 7500 Field device tool (FDT) interface nspecification — nPart 501 Communication implementation for ncommon object model — IEC 61784 CPF 1《菲尔德设计工具(FDT).pdf BS PD CLC TR 62453-501-2009 7500 Field device tool (FDT) interface nspecification — nPart 501 Communication implementation for ncommon object model — IEC 61784 CPF 1《菲尔德设计工具(FDT).pdf
  • BS PD CLC TR 62453-502-2009 2500 Field device tool (FDT) interface nspecification — nPart 502 Communication implementation for ncommon object model — IEC 61784 CPF 2《现场设备工具(FDT)接.pdf BS PD CLC TR 62453-502-2009 2500 Field device tool (FDT) interface nspecification — nPart 502 Communication implementation for ncommon object model — IEC 61784 CPF 2《现场设备工具(FDT)接.pdf
  • 相关搜索

    当前位置:首页 > 考试资料 > 职业资格

    copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
    备案/许可证编号:苏ICP备17064731号-1