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

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

1、PC技术机试模拟试卷 19及答案与解析 一、程序设计题 1 请编制程序 PROG1.ASM,其功能是:以逻辑尺 L变量对内存中连续存放着 16个字的数进行去高字节操作:当 L的 i位为 1则将第 i数据的高字节置为全 0,当L的 i位为 0则第 i数据不变。将处理的结果存入 RESULT指示的内存区。 例如: 设 L=0005H 源数: 1111H, 2222H, 3333H, 4444H, 5555H, 6666H 结果: 0011H, 2222H, 0033H, 4444H, 5555H, 6666H 部分程序已经 给出,其中原始数据由过程 LOAD从文件 INPUTl DAT中读入SOU

2、RCE开始的内存元中,运算结果要求从 RESULT开始存放,由过程 SAVE保存到文件 OUTPUT1.DAT中。 填空 BEGIN和 END之间已给出的源程序使其完整 (空白已用横线标出,每行空白一般只需一条指令,但采用功能相当的多条指令也可 ),或删除 BEGIN和 END之间原有的代码并自行编程来完成要求的功能。 对程序必须进行汇编,并与 IO.OBJ链接产生执行文件,最终运行程序产生结果。调试中若发现整个程序中存在错误之处,请加以修改。 PROG1.ASM文件内容如下: EXTRN LOAD: FAR, SAVE: FAR N EQU 16 STAC SEGMENT STACK DB

3、128 DUP(?) STAC ENDS DATA SEGMENT L DW ? SOURCE DW N DUP(?) RESULT DW 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 PUSH AX MOV AX, DATA MOV DS, AX LEA DX, L ;数据区起始地址 LEA SI, NAMEO ;原始数据文件名 MOV CX,

4、 2*(N+1) ;字节数 CALL LOAD ;从 input1.dat文件中读取数据 ; * * * * BECIN * * * * LEA SI, SOURCE _ MOV CX, N MOV DX, _ LO: MOV AX, SI _ L, DX _ STORE NOT AX STORE: MOV DI, AX ADD DI, 2 ADD SI, 2 LOOP LO ; * * * * END * * * * LEA DX, RESULT ;结果数据区首址 LEA SI, NAME1 ;结果文件名 MOV CX, 2, N ;结果字节数 CALL SAVE ;保存结果到文件 RET

5、START ENDP CODE ENDS END START PC技术机试模拟试卷 19答案与解析 一、程序设计题 1 【正确答案】 ; * * * * BEGIN * * * * LEA SI, SOURCE LEA DI, RESULT ;取结果区首址 MOV CX, N MOV DX, 1 ;定义递移检测位初值 LO: MOV AX, SI TRST L, DX ;测定当前数据的操作性质 JP STORE ; 不操作 AND AX, 00FFH ;置高字节全 0 STORE: MOV DI, AX ADD DI, 2 ADD SI, 2 SHL DX, 1 ;递移检测位左移 LOOP 10 ; * * * * END * * * *

展开阅读全文
相关资源
猜你喜欢
  • ASD-STAN PREN 4604-010-2014 Aerospace series Cable electrical for signal transmission Part 010 Cable coaxial light weight 50 ohms 200 °C type KX (light WD) Product standard (Editio.pdf ASD-STAN PREN 4604-010-2014 Aerospace series Cable electrical for signal transmission Part 010 Cable coaxial light weight 50 ohms 200 °C type KX (light WD) Product standard (Editio.pdf
  • ASD-STAN PREN 4604-010-2016 Aerospace series Cable electrical for signal transmission Part 010 Cable coaxial light weight 50 ohms 200 type KX (light WD) Product standard (Edition P.pdf ASD-STAN PREN 4604-010-2016 Aerospace series Cable electrical for signal transmission Part 010 Cable coaxial light weight 50 ohms 200 type KX (light WD) Product standard (Edition P.pdf
  • ASD-STAN PREN 4608-001-2005 Aerospace Series Cable Electrical Fire Resistant Single and Multicore Assembly Screened (Braided) and Jacketed Operating Temperatures Between - 65 Degre.pdf ASD-STAN PREN 4608-001-2005 Aerospace Series Cable Electrical Fire Resistant Single and Multicore Assembly Screened (Braided) and Jacketed Operating Temperatures Between - 65 Degre.pdf
  • ASD-STAN PREN 4608-002-2005 Aerospace Series Cable Electrical Fire Resistant Single and Twisted Multicore Assembly Screened (Braided) and Jacketed Operating Temperatures between - .pdf ASD-STAN PREN 4608-002-2005 Aerospace Series Cable Electrical Fire Resistant Single and Twisted Multicore Assembly Screened (Braided) and Jacketed Operating Temperatures between - .pdf
  • ASD-STAN PREN 4608-003-2004 Aerospace series Cables electrical fire resistant Single and twisted multicore assembly screened (braided) and jacketed Operating temperature between - .pdf ASD-STAN PREN 4608-003-2004 Aerospace series Cables electrical fire resistant Single and twisted multicore assembly screened (braided) and jacketed Operating temperature between - .pdf
  • ASD-STAN PREN 4608-004-2012 Aerospace series Single and twisted multicore assembly screened (braided) and jacketed Operating temperatures between 65 and 260 Part 004 DW family - Li.pdf ASD-STAN PREN 4608-004-2012 Aerospace series Single and twisted multicore assembly screened (braided) and jacketed Operating temperatures between 65 and 260 Part 004 DW family - Li.pdf
  • ASD-STAN PREN 4608-005-2005 Aerospace series Cable electrical fire resistant Single and twisted multicore assembly screened (braided) and jacketed Operating temperatures between - .pdf ASD-STAN PREN 4608-005-2005 Aerospace series Cable electrical fire resistant Single and twisted multicore assembly screened (braided) and jacketed Operating temperatures between - .pdf
  • ASD-STAN PREN 4610-2003 Aerospace Series Pipe coupling 80 degrees 30 inches in titanium alloy Elbows 45 degrees with thrust wire nut (Edition P 1)《航空航天系列 钛合金制80°30 '管接头 带止推金属丝帽的45°.pdf ASD-STAN PREN 4610-2003 Aerospace Series Pipe coupling 80 degrees 30 inches in titanium alloy Elbows 45 degrees with thrust wire nut (Edition P 1)《航空航天系列 钛合金制80°30 '管接头 带止推金属丝帽的45°.pdf
  • ASD-STAN PREN 4611-002-2004 Aerospace series Cables electrical for general purpose single and multicore assembly XLETFE Family Part 002 General (Edition P 1)《航空航天系列 单芯和多芯配件XLETFE类通.pdf ASD-STAN PREN 4611-002-2004 Aerospace series Cables electrical for general purpose single and multicore assembly XLETFE Family Part 002 General (Edition P 1)《航空航天系列 单芯和多芯配件XLETFE类通.pdf
  • 相关搜索

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

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