【计算机类职业资格】三级PC技术机试-197及答案解析.doc

上传人:rimleave225 文档编号:1320182 上传时间:2019-10-17 格式:DOC 页数:4 大小:28KB
下载 相关 举报
【计算机类职业资格】三级PC技术机试-197及答案解析.doc_第1页
第1页 / 共4页
【计算机类职业资格】三级PC技术机试-197及答案解析.doc_第2页
第2页 / 共4页
【计算机类职业资格】三级PC技术机试-197及答案解析.doc_第3页
第3页 / 共4页
【计算机类职业资格】三级PC技术机试-197及答案解析.doc_第4页
第4页 / 共4页
亲,该文档总共4页,全部预览完了,如果喜欢就下载吧!
资源描述

1、三级 PC技术机试-197 及答案解析(总分:100.00,做题时间:90 分钟)一、上机题(总题数:1,分数:100.00)1.请编制程序,其功能是:内存中连续存放着 20个十进制数的 ASCII字符,把它们转换成压缩型(组保型)BCD码。例如:内存中有:31H(1),32H(2),33H(3),34H(4).(共 20个字节)结果为:21H,43H,.(共十个字节)部分程序已给出,其中原始数据由过程 LOAD从文件 INPUT1.DAT中读入 SOURCE开始的内存单元中,运算结果要求从 RESULT开始存放,由过程 SAVE保存到文件 OUTPUT1.DAT中。请填空 BEGIN和 EN

2、D之间已给出的源程序使其完整,空白已用横线标出,每个空白一般只需一条指令,但采用功能相当的多条指令亦可,或删除 BEGIN和 END之间原有的代码并自行编程来完成所要求的功能。对程序必须进行汇编,并与 IO.OBJ链接产生可执行文件,最终运行程序产生结果。调试中若发现整个程序中存在错误之处,请加以修改。试题程序EXTRN LOAD:FAR,SAVE:FARN EQU 10STAC SEGMENT STACKDB 128 DUP(?)STAC ENDSDATA SEGMENTSOURCE DB N*2 DUP(?)RESULT DB N DUP(0)NAME0 DB INPUT1.DAT,0NA

3、ME1 DB OUTPUT1.DAT,0DATA ENDSCODE SEGMENTASSUME CS:CODE,DS:DATA,SS:STACSTART PROC FARPUSH DSXOR AX,AXPUSH AXMOV AX,DATAMOV DS,AXLEA DX,SOURCE ;数据区起始地址LEA SI,NAME0 ;原始数据文件名MOV CX,N*2 ;字节数CALL LOAD ;从INPUT1.DAT中读取数据; *BEGIN*LEA SI,SOURCELEA DI,RESULTMOV CX,NCLDNEXT: LODS _AND AL,_MOV BL,ALLODS _PUSH _

4、MOV CL,_SAL AL,CLPOP _ADD AL,_MOV DI,ALINC DILOOP NEXT; *END*LEA DX,RESULT ;结果数据区首址LEA SI,NAME1 ;结果文件名MOV CX,N ;结果字节数CALL SAVE ;保存结果到文件RETSTART ENDPCODE ENDSEND START(分数:100.00)_三级 PC技术机试-197 答案解析(总分:100.00,做题时间:90 分钟)一、上机题(总题数:1,分数:100.00)1.请编制程序,其功能是:内存中连续存放着 20个十进制数的 ASCII字符,把它们转换成压缩型(组保型)BCD码。例如

5、内存中有:31H(1),32H(2),33H(3),34H(4).(共 20个字节)结果为:21H,43H,.(共十个字节)部分程序已给出,其中原始数据由过程 LOAD从文件 INPUT1.DAT中读入 SOURCE开始的内存单元中,运算结果要求从 RESULT开始存放,由过程 SAVE保存到文件 OUTPUT1.DAT中。请填空 BEGIN和 END之间已给出的源程序使其完整,空白已用横线标出,每个空白一般只需一条指令,但采用功能相当的多条指令亦可,或删除 BEGIN和 END之间原有的代码并自行编程来完成所要求的功能。对程序必须进行汇编,并与 IO.OBJ链接产生可执行文件,最终运行程序

6、产生结果。调试中若发现整个程序中存在错误之处,请加以修改。试题程序EXTRN LOAD:FAR,SAVE:FARN EQU 10STAC SEGMENT STACKDB 128 DUP(?)STAC ENDSDATA SEGMENTSOURCE DB N*2 DUP(?)RESULT DB N DUP(0)NAME0 DB INPUT1.DAT,0NAME1 DB OUTPUT1.DAT,0DATA ENDSCODE SEGMENTASSUME CS:CODE,DS:DATA,SS:STACSTART PROC FARPUSH DSXOR AX,AXPUSH AXMOV AX,DATAMOV

7、DS,AXLEA DX,SOURCE ;数据区起始地址LEA SI,NAME0 ;原始数据文件名MOV CX,N*2 ;字节数CALL LOAD ;从INPUT1.DAT中读取数据; *BEGIN*LEA SI,SOURCELEA DI,RESULTMOV CX,NCLDNEXT: LODS _AND AL,_MOV BL,ALLODS _PUSH _MOV CL,_SAL AL,CLPOP _ADD AL,_MOV DI,ALINC DILOOP NEXT; *END*LEA DX,RESULT ;结果数据区首址LEA SI,NAME1 ;结果文件名MOV CX,N ;结果字节数CALL SAVE ;保存结果到文件RETSTART ENDPCODE ENDSEND START(分数:100.00)_正确答案:(B;OFH;B;CX;4;CX;BL)解析:

展开阅读全文
相关资源
猜你喜欢
  • DIN EN 2349-405-2007 Aerospace series - Requirements and test procedures for relays and contactors - Part 405 Fluid resistance German and English version EN 2349-405 2006《航空航天系列 继电.pdf DIN EN 2349-405-2007 Aerospace series - Requirements and test procedures for relays and contactors - Part 405 Fluid resistance German and English version EN 2349-405 2006《航空航天系列 继电.pdf
  • DIN EN 2349-407-2007 Aerospace series - Requirements and test procedures for relays and contactors - Part 407 Cold low pressure and moist heat German and English version EN 2349-40.pdf DIN EN 2349-407-2007 Aerospace series - Requirements and test procedures for relays and contactors - Part 407 Cold low pressure and moist heat German and English version EN 2349-40.pdf
  • DIN EN 2349-409-2008 Aerospace series - Requirements and test procedures for relays and contactors - Part 409 Ozone resistance German and English version EN 2349-409 2007《航空航天系列 继电.pdf DIN EN 2349-409-2008 Aerospace series - Requirements and test procedures for relays and contactors - Part 409 Ozone resistance German and English version EN 2349-409 2007《航空航天系列 继电.pdf
  • DIN EN 2349-410-2008 Aerospace series - Requirements and test procedures for relays and contactors - Part 410 Mould German and English version EN 2349-410 2007《航空航天系列 继电器和电流接触器用要求和.pdf DIN EN 2349-410-2008 Aerospace series - Requirements and test procedures for relays and contactors - Part 410 Mould German and English version EN 2349-410 2007《航空航天系列 继电器和电流接触器用要求和.pdf
  • DIN EN 2349-411-2008 Aerospace series - Requirements and test procedures for relays and contactors - Part 411 Temperature change German and English version EN 2349-411 2007《航空航天系列 .pdf DIN EN 2349-411-2008 Aerospace series - Requirements and test procedures for relays and contactors - Part 411 Temperature change German and English version EN 2349-411 2007《航空航天系列 .pdf
  • DIN EN 2349-412-2008 Aerospace series - Requirements and test procedures for relays and contactors - Part 412 Seal German and English version EN 2349-412 2007《航空航天系列 继电器和电流接触器用要求和试.pdf DIN EN 2349-412-2008 Aerospace series - Requirements and test procedures for relays and contactors - Part 412 Seal German and English version EN 2349-412 2007《航空航天系列 继电器和电流接触器用要求和试.pdf
  • DIN EN 2349-413-2008 Aerospace series - Requirements and test procedures for relays and contactors - Part 413 Vibration sinusoidal and random German and English version EN 2349-413.pdf DIN EN 2349-413-2008 Aerospace series - Requirements and test procedures for relays and contactors - Part 413 Vibration sinusoidal and random German and English version EN 2349-413.pdf
  • DIN EN 2349-414-2008 Aerospace series - Requirements and test procedures for relays and contactors - Part 414 Mechanical shock German and English version EN 2349-414 2007《航空航天系列 继电.pdf DIN EN 2349-414-2008 Aerospace series - Requirements and test procedures for relays and contactors - Part 414 Mechanical shock German and English version EN 2349-414 2007《航空航天系列 继电.pdf
  • DIN EN 2349-415-2008 Aerospace series - Requirements and test procedures for relays and contactors - Part 415 Acceleration German and English version EN 2349-415 2007《航空航天系列 继电器和电流.pdf DIN EN 2349-415-2008 Aerospace series - Requirements and test procedures for relays and contactors - Part 415 Acceleration German and English version EN 2349-415 2007《航空航天系列 继电器和电流.pdf
  • 相关搜索

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

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