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

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

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

1、2013年计算机等级考试三级PC技术上机(20)请编制程序,其功能是:有一抄表系统采集的数据中包括8位的窃水状态字节(一个字节记录4块水表状态),格式为:D7 D6 D5 D4 D3 D2 D1 D0S4 S3 S2 S1 X4 X3 X2 X1其中Si,Xi(i=1,2,3,4)分别表示第i块水表短路和断路状态位,1表示有短路或断路情况发生(表示有偷水情况),现共采集了5个字节的窃水状态,如果有窃水情况,则记录在RESULT中,记录格式为:表号,状态,表号,状态没有短断路,则记录E0H,断路记录E1H,短路记录E2H,如01H,E1H,02H,E0H,03H,E2H,04H,E0H表示第一块

2、表断路,第二块表无窃水状态,第三块表短路,第四块表也无窃水发生。例如:内存中有: 83H结果为: 01H,E1H,02H,E1H,03H,E0H,04H,E2H该内存中从SOURCE开始有一字符串,其以00H结束,长度不超过100。试编程对其进行压缩,结果存入RESULT开始的内存单元。部分程序已给出, 其中原始数据由过程LOAD从文件INPUT1.DAT中读入SOURCE开始的内存单元中。运算结果要求从RESULT开始存放,由过程SAVE保存到文件OUTPUT1.DAT中。填空BEGIN和END之间已给出的一段源程序使其完整(空白已用横线标出,每行空白一般只需一条指令, 但采用功能相当的多条

3、指令亦可),或删除BEGIN和END之间原有的代码并自行编程来完成要求的功能。对程序必须进行汇编,并与IO.OBJ链接产生PROG1.EXE执行文件,最终运行程序产生结果(无结果或结果不正确者均不得分)。调试中若发现整个程序中存在错误之处, 请加以修改。试题程序:EXTRN LOAD:FAR,SAVE:FARN EQU 5ESC_CODE EQU 27STAC SEGMENT STACKDB 128 DUP(?)STAC ENDSDATA SEGMENTSOURCE DB N DUP(?)RESULT DB N*8 DUP(0)NAME0 DB INPUT1.DAT,0NAME1 DB OUT

4、PUT1.DAT,0DATA ENDSCODE SEGMENTASSUME CS:CODE,DS:DATA,SS:STACSTART PROC FARPUSH DSXOR AX,AXPUSH AXMOV AX,DATAMOV DS,AXMOV ES,AX ;置附加段寄存器LEA DX,SOURCE ;数据区起始地址LEA SI,NAME0 ;原始数据文件名MOV CX,N ;字节数CALL LOAD ;从INPUT1.DAT中读取数据;*BEGIN*LEA SI,SOURCEMOV DI,OFFSET RESULTMOV DH,NLPM: MOV AL,SIMOV BL,ALINC SIMOV

5、 CL,_SHR BL,CLMOV CX,4MOV BH,0LP0: SHR AL,1 ;BH放水表号INC BHMOV DI,BH_JC LP1SHR BL,1JC LP2.MOV DL,0E0HJMP LPCOMLPLP: LOOP _JMP RET1LP1: SHR BL,1MOV DL,_JMP LPCOMLP2: MOV DL,0E2HLPCOM: MOV DI,DL_JMP LPLPRET1: DEC DH_ LPM;*END*LEA DX,RESULT ;结果数据区首址LEA SI,NAME1 ;结果文件名MOV CX,N*2 ;字节数CALL SAVE ;保存结果到文件RETS

6、TART ENDPCODE ENDS29C91AFE4CED1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFEDD1B6C87D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF95AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9D1B6C8795AD9C91AFE4CED1B6C8795A1AFE4CED1B6C8795AD91AFE4CED1B6

7、C8795AD9C91FE4CED1B6C8795AD29C91AFC91FE4CED1D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6CD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF8795AD9C91FE4CED1D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C87D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795

8、AD29C91AF5D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFAD9C91FE4CED1B6C8795AD29C91AFB6C8795AD29C91AFB6C8795AD29C91AFD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9

9、C91FE4CED1B6C8795AD29C91AFFE4CED1B6C8795AD29C91AFC8795AD9C91FE4CED1B6C8795AD29C91AFD1B6C8795AD9C91AFED1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8D1B6C8795AD9C91AFE4CED1D91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFC91FE4CED1D1B6C871AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFC9

10、1FE4CED1D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6CD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF8795AD9C91FE4CED1D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C87D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF5D1B6C8795AD9C91AFE4CED1B6C

11、8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFAD9C91FE4CED1B6C8795AD29C91AFB6C8795AD29C91AFB6C8795AD29C91AFD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8791AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFC91FE4CED1D1B6C8795AD9C91AFE4CE

12、D1B6C8795AD91AFE4CED1B6CD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF8795AD9C91FE4CED1D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C87D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF5D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91

13、FE4CED1B6C8795AD29C91AFAD9C91FE4CED1B6C8795AD29C91AFB6C8795AD29C91AFB6C8795AD29C91AFD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFFE4CED1B6C8795AD29C91AFC8795AD9C91FE4CE

14、D1B6C8795AD29C91AFD1B6C8795AD9C91AFED1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8D1B6C8795AD9C91AFE4CED15AD9C91D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFFE4CED1B6C8795AD29C91AFC8795AD9C91FE4CED1B6C8795AD29C91AFD1B6C8795AD9C91AFED1B6C8795AD9C91AFE4CED1B6C8795AD91A

15、FE4CED1B6C8D1B6C8795AD9C91AFE4CED195AD9C91AFE4CED1B6C8795AD91AFE4CED1B6CD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF8795AD9C91FE4CED1D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C87D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF5D1B6C87

16、95AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFAD9C91FE4CED1B6C8795AD29C91AFB6C8795AD29C91AFB6C8795AD29C91AFD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795

17、AD29C91AFFE4CED1B6C8795AD29C91AFC8795AD9C91FE4CED1B6C8795AD29C91AFD1B6C8795AD9C91AFED1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF795AD9C91FE4CED1B6C8795ADD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C87

18、95AD29C91AF29C91AF4CED1B6C8795AD1B6C8795AD9C91AFE4CED1B6C8795AD91AFD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFD1B6C8795AD29C91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFD91AFE4CED1B6C8795AD9C91FE4CED1B6C8

19、795AD29C9D1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF1AFD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AFD1BD1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF1B6C8795AD9C91AFE4CED1B6C8795AD91AFE4CED1B6C8795AD9C91FE4CED1B6C8795AD29C91AF4CED1B6C8795AD29C91AFE4CED1B6C8795ADC6F554C62

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

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


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号