计算机等级考试三级PC技术上机15.doc

上传人:laozhun 文档编号:4122477 上传时间:2023-04-06 格式:DOC 页数:4 大小:55.50KB
返回 下载 相关 举报
计算机等级考试三级PC技术上机15.doc_第1页
第1页 / 共4页
计算机等级考试三级PC技术上机15.doc_第2页
第2页 / 共4页
计算机等级考试三级PC技术上机15.doc_第3页
第3页 / 共4页
计算机等级考试三级PC技术上机15.doc_第4页
第4页 / 共4页
亲,该文档总共4页,全部预览完了,如果喜欢就下载吧!
资源描述

《计算机等级考试三级PC技术上机15.doc》由会员分享,可在线阅读,更多相关《计算机等级考试三级PC技术上机15.doc(4页珍藏版)》请在三一办公上搜索。

1、2013年计算机等级考试三级PC技术上机(15)请编制程序,其功能是:对一个由可打印ASCII字符(ASCII码20H7FH)组成的字符串可采用下列方法进行压缩:从串首开始向后扫描,如某字符单独出现该字符不变,如某字符连续出现n次,则该字符用ESC(1BH),n,三个字节来代替(假定n不超过255)。例如:设内存中从SOURCE开始有一用上述方法压缩的字符串,其以00H结束,长度不超过100。试编程对其进行解压缩,结果存入RESULT开始的内存单元。原串: 41H,1BH,06H,43H,61H,00H解压后: 41H,43H,43H,43H,43H,43H,43H,61H,00H(ACCCC

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

3、AD:FAR,SAVE:FARN EQU 100ESC_CODE EQU 27STAC SEGMENT STACKDB 128 DUP(?)STAC ENDSDATA SEGMENTSOURCE DB N 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 DS,AXMOV ES,AX ;置附加段寄存器LEA

4、DX,SOURCE ;数据区起始地址LEA SI,NAME0 ;原始数据文件名MOV CX,N ;字节数CALL LOAD ;从INPUT1.DAT中读取数据;*BEGIN*LEA SI,SOURCELEA DI,RESULTCLDL0: LODSBCMP AL,0JE QUITCMP AL,ESC_CODEJ_ EXPAND_JMP L0待添加的隐藏文字内容1EXPAND: _ ;解压XOR CX,CX_JMP L0QUIT: STOSB ;STORE THE 00H;*END*LEA DX,RESULT ;结果数据区首址LEA SI,NAME1 ;结果文件名MOV CX,N ;字节数CAL

5、L SAVE ;保存结果到文件RETSTART ENDPCODE ENDSEND START29C91AFE4CED1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFEDD1B6C87D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF95AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9D1B6C8795AD9C91AFE4CED1B6C8795A1A

6、FE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFC91FE4CED1D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6CD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF8795AD9C91FE4CED1D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C87D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED

7、1B6C8795AD9C91FE4CED1B6C8795AD29C91AF5D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFAD9C91FE4CED1B6C8795AD29C91AFB6C8795AD29C91AFB6C8795AD29C91AFD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91D1B6C8795AD9C91AFE4CED1B

8、6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFFE4CED1B6C8795AD29C91AFC8795AD9C91FE4CED1B6C8795AD29C91AFD1B6C8795AD9C91AFED1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8D1B6C8795AD9C91AFE4CED1D91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFC91FE4CED1D1B6C871AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9

9、C91FE4CED1B6C8795AD29C91AFC91FE4CED1D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6CD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF8795AD9C91FE4CED1D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C87D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91A

10、F5D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFAD9C91FE4CED1B6C8795AD29C91AFB6C8795AD29C91AFB6C8795AD29C91AFD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8791AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFC91

11、FE4CED1D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6CD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF8795AD9C91FE4CED1D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C87D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF5D1B6C8795AD9C91AFE4CED1B6C8

12、795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFAD9C91FE4CED1B6C8795AD29C91AFB6C8795AD29C91AFB6C8795AD29C91AFD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFFE4CED1B6C8

13、795AD29C91AFC8795AD9C91FE4CED1B6C8795AD29C91AFD1B6C8795AD9C91AFED1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8D1B6C8795AD9C91AFE4CED15AD9C91D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFFE4CED1B6C8795AD29C91AFC8795AD9C91FE4CED1B6C8795AD29C91AFD1B6C8795AD9C91AFED1B6C87

14、95AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8D1B6C8795AD9C91AFE4CED195AD9C91AFE4CED1B6C8795AD91AFE4CED1B6CD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF8795AD9C91FE4CED1D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C87D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4

15、CED1B6C8795AD29C91AF5D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFAD9C91FE4CED1B6C8795AD29C91AFB6C8795AD29C91AFB6C8795AD29C91AFD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED

16、1B6C8795AD9C91FE4CED1B6C8795AD29C91AFFE4CED1B6C8795AD29C91AFC8795AD9C91FE4CED1B6C8795AD29C91AFD1B6C8795AD9C91AFED1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF795AD9C91FE4CED1B6C8795ADD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4C

17、ED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF29C91AF4CED1B6C8795AD1B6C8795AD9C91AFE4CED1B6C8795AD91AFD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFD1B6C8795AD29C91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFD91AFE4

18、CED1B6C8795AD9C91FE4CED1B6C8795AD29C9D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF1AFD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFD1BD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF4CED1B6C8795AD29C91AFE4CED1B6C8795ADC6F554C62

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 办公文档 > 其他范文


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号