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

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

1、PC技术机试模拟试卷 35及答案与解析 一、程序设计题 1 请编制程序,其功能为:将内存中存放的连续的 30个二进制数 (0到 100之间 ),按数值大小分别进行统计, 0 59为 D, 60 74为 C, 75 84为 B, 85 100为A,统计出 A、 B、 C、 D的个数,并按 A、 B、 C、 D次序存放在内存中。 例如:内存中原始数据为: 21H, 3CH, 4DH, 31H, 4FH, 51H, 56H 统计结果: 1, 3, 1, 2 部分程序已经给出,其中原始数据由 LOAD过程从文件 INPUT1.DAT中读入从SOURCE开 始的内存单元,转换结果 (要求从 RESULT

2、 开始读入 )由 SAVE过程保存到 OUTPUT1.DAT文件中。请在 BEGIN和 END之间补充使其完整,完成要求的功能。或删除 BEGIN和 END之间原有的代码并自行编程来完成要求的功能。 对程序必须进行汇编,并与 IO.OBJ链接产生 PROG1.EXE执行文件,最终产生运行结果。 部分程序如下: ;PROG1.ASM EXTRN LOAD:FAR, SAVE:FAR N EQU 30 DSEG SEGMENT SOURCE DB N DUP (?) RESULT DB N DUP (0) NAME0 DB INPUT1. DAT,0 NAME1 DB OUTPUT1. DAT,0

3、 DSEG ENDS SSEG SEGMENT STACK DB 128 DUP (?) SSEG ENDS CSEG SEGMENT ASSUME CS:CSEG, DS:DSEG; SS:SSEG START PROC FAR PUSH DS XOR AX,AX PUSH AX MOV AX, DSEG MOV DS,AX MOV ES, AX LEA DX, SOURCE LEA SI,NAME0 MOV CX,N CALL LOAD ; * BEGIN * MOV CX,N LEA SI,SOURCE CONT: MOV AL,SI _ JB LB INC RESULT JMP OK

4、LB: CMP AL, 75 JB LC INC _ JMP OK LC: CMP AL,60 JB LD _ JMP OK LD: _ OK: INC SI LOOP CONT ; * END * LEA DX,RESULT LEA SI,NAME1 MOV CX,4 CALL SAVE RET START ENDP CSEG ENDS END START PC技术机试模拟试卷 35答案与解析 一、程序设计题 1 【正确答案】 ; * BEGIN * MOV CX, N LEA SI, SOURCE CONT: MOV AL, SI CMP AL, 85 JB LB INC RESULT JMP OK LB: CMP AL, 75 JB LC INC RESULT+1 JMP OK LC: CMP AL, 60 JB LD INC RESULT+2 JMP OK LD: INC RESULT+3 OK: INC SI LOOP CONT ; * END * INPUT1.DAT 中的输入数据 : 60H,3CH,4DH, 31H,4FH,51H,56H,59H,41H,32H 35H,21H,4FH,3AH,21H,2BH,51H, 11H,45H,44H 3AH, 1EH,3BH,34H,3CH,46H,63H,24H,40H,3EH 输出结果 : 04 05 08 OD

展开阅读全文
相关资源
猜你喜欢
  • ASD-STAN PREN 2997-005-2015 Aerospace series Connectors electrical circular coupled by threaded ring fire-resistant or non fire-resistant operating temperatures - 65 to 175 continu.pdf ASD-STAN PREN 2997-005-2015 Aerospace series Connectors electrical circular coupled by threaded ring fire-resistant or non fire-resistant operating temperatures - 65 to 175 continu.pdf
  • ASD-STAN PREN 2997-006-2015 Aerospace series Connectors electrical circular coupled by threaded ring fire-resistant or non fire-resistant operating temperatures - 65 to 175 continu.pdf ASD-STAN PREN 2997-006-2015 Aerospace series Connectors electrical circular coupled by threaded ring fire-resistant or non fire-resistant operating temperatures - 65 to 175 continu.pdf
  • ASD-STAN PREN 2997-007-2015 Aerospace Series Connectors Electrical Circular Coupled By Threaded Ring Fire-Resistant Or Non Fire-Resistant Operating Temperatures  65 To 175 Continuo.pdf ASD-STAN PREN 2997-007-2015 Aerospace Series Connectors Electrical Circular Coupled By Threaded Ring Fire-Resistant Or Non Fire-Resistant Operating Temperatures 65 To 175 Continuo.pdf
  • ASD-STAN PREN 2997-008-2005 Aerospace Series Connectors Electrical Circular Coupled by Threaded Ring Fire Resistant or Non Fire-Resistant Operating Temperatures - 65 Degrees to 175.pdf ASD-STAN PREN 2997-008-2005 Aerospace Series Connectors Electrical Circular Coupled by Threaded Ring Fire Resistant or Non Fire-Resistant Operating Temperatures - 65 Degrees to 175.pdf
  • ASD-STAN PREN 2997-009-2014 Aerospace series Connectors electrical circular coupled by threaded ring fire-resistant or non fire-resistant operating temperatures - 65 to 175 continu.pdf ASD-STAN PREN 2997-009-2014 Aerospace series Connectors electrical circular coupled by threaded ring fire-resistant or non fire-resistant operating temperatures - 65 to 175 continu.pdf
  • ASD-STAN PREN 2997-010-2014 Aerospace series Connectors electrical circular coupled by threaded ring fire-resistant or non fire-resistant operating temperatures - 65 to 175 continu.pdf ASD-STAN PREN 2997-010-2014 Aerospace series Connectors electrical circular coupled by threaded ring fire-resistant or non fire-resistant operating temperatures - 65 to 175 continu.pdf
  • ASD-STAN PREN 2997-011-2009 Aerospace series Connectors electrical circular coupled by threaded ring fire-resistant or non fire-resistant operating temperatures C 65 degree C to 17.pdf ASD-STAN PREN 2997-011-2009 Aerospace series Connectors electrical circular coupled by threaded ring fire-resistant or non fire-resistant operating temperatures C 65 degree C to 17.pdf
  • ASD-STAN PREN 2997-012-2006 Aerospace series Connectors electrical circular coupled by threaded ring fire-resistant or non fire-resistant operating temperatures C 65 to 175 continu.pdf ASD-STAN PREN 2997-012-2006 Aerospace series Connectors electrical circular coupled by threaded ring fire-resistant or non fire-resistant operating temperatures C 65 to 175 continu.pdf
  • ASD-STAN PREN 2997-013-2006 Aerospace series Connectors electrical circular coupled by threaded ring fire-resistant or non fire-resistant operating temperatures C 65 to 175 continu.pdf ASD-STAN PREN 2997-013-2006 Aerospace series Connectors electrical circular coupled by threaded ring fire-resistant or non fire-resistant operating temperatures C 65 to 175 continu.pdf
  • 相关搜索

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

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