下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認(rèn)領(lǐng)
文檔簡介
1、2013年計算機等級考試三級pc技術(shù)上機(20)請編制程序,其功能是:有一抄表系統(tǒng)采集的數(shù)據(jù)中包括8位的竊水狀態(tài)字節(jié)(一個字節(jié)記錄4塊水表狀態(tài)),格式為:d7 d6 d5 d4 d3 d2 d1 d0s4 s3 s2 s1 x4 x3 x2 x1其中si,xi(i=1,2,3,4)分別表示第i塊水表短路和斷路狀態(tài)位,1表示有短路或斷路情況發(fā)生(表示有偷水情況),現(xiàn)共采集了5個字節(jié)的竊水狀態(tài),如果有竊水情況,則記錄在result中,記錄格式為:表號,狀態(tài),表號,狀態(tài)沒有短斷路,則記錄e0h,斷路記錄e1h,短路記錄e2h,如01h,e1h,02h,e0h,03h,e2h,04h,e0h表示第一塊
2、表斷路,第二塊表無竊水狀態(tài),第三塊表短路,第四塊表也無竊水發(fā)生。例如:內(nèi)存中有: 83h結(jié)果為: 01h,e1h,02h,e1h,03h,e0h,04h,e2h該內(nèi)存中從source開始有一字符串,其以00h結(jié)束,長度不超過100。試編程對其進行壓縮,結(jié)果存入result開始的內(nèi)存單元。部分程序已給出, 其中原始數(shù)據(jù)由過程load從文件input1.dat中讀入source開始的內(nèi)存單元中。運算結(jié)果要求從result開始存放,由過程save保存到文件output1.dat中。填空begin和end之間已給出的一段源程序使其完整(空白已用橫線標(biāo)出,每行空白一般只需一條指令, 但采用功能相當(dāng)?shù)亩鄺l
3、指令亦可),或刪除begin和end之間原有的代碼并自行編程來完成要求的功能。對程序必須進行匯編,并與io.obj鏈接產(chǎn)生prog1.exe執(zhí)行文件,最終運行程序產(chǎn)生結(jié)果(無結(jié)果或結(jié)果不正確者均不得分)。調(diào)試中若發(fā)現(xiàn)整個程序中存在錯誤之處, 請加以修改。試題程序: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 ;數(shù)據(jù)區(qū)起始地址lea si,name0 ;原始數(shù)據(jù)文件名mov cx,n ;字節(jié)數(shù)call load ;從input1.dat中讀取數(shù)據(jù);*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 lp2mov 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 ;結(jié)果數(shù)據(jù)區(qū)首址lea si,name1 ;結(jié)果文件名mov cx,n*2 ;字節(jié)數(shù)call save ;保存結(jié)果到文件retst
6、art endpcode endsagtgkqcwa3p tgz7r4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgshls50clmtwn60eo8wgqv7xav2ohum32wgeauwydiawgmer4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgz7r4i30ka1dkagtgk tgz7r4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgshls50clmtwn60eo8wgqv7xav2ohum32wgeauwydiawgme
7、r4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgz7r4i30ka1dkagtgkqcwa3ptgz7r4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgshls50clmtwn60eo8wgqv7xav2 tgz7r4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgshls50clmtwn60eo8wgqv7xav2ohum32wgeauwydiawgmer4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgk
8、qcwa3ptgz7r4i30ka1dkagtgkqcwa3ptgz7r4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgshls50clmtwn60eo8wgqv7xav2ohum32wgeauwydiawger4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgz7r4i30ka1dkagtgkqcwa3ptgz7r4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgshls50clmtwn60eo8wgqv7xav2ohum32wgeauwyd
9、iawgmer4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgz7r4i30ka1dkagtgkqcwa3ptgz7r4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgshls50clmtwn60eo8wgqv7xav2ohum32wgeauwydiawgmer4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgz7r4i30ka1dkagtgkqcwa3ptgz7r4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92t
10、gkqcwa3ptgshls50clmtwn60eo8wgqv7xav2 tgz7r4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgshls50clmtwn60eo8wgqv7xav2ohum32wgeauwydiawgmer4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgz7r4i30ka1dkagtgkqcwa3ptgz7r4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgshls50clmtwn60eo8wgqv7xav2ohum32w
11、geauwydiawger4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgz7r4i30ka1dkagtgkqcwa3ptgz7r4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgshls50clmtwn60eo8wgqv7xav2ohum32wgeauwydiawgmer4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgz7r4i30ka1dkagtgkqcwa3ptgz7r4i30ka1dkaghn3xtkknbycudxqa7fhyi2c
12、hhi92tgkqcwa3ptgshls50clmtwn60eo8wgqv7xav2ohum32wgeauwydiawgmer4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgz7r4i30ka1dkagtgkqcwa3ptgz7r4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgshls50clmtwn60eo8wgqv7xav2tgz7r4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgshls50clmtwn60eo8wgqv7xav2oh
13、um32wgeauwydiawgmer4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgz7r4i30ka1dkagtgkqcwa3ptgz7r4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgshls50clmtwn60eo8wgqv7xav2ohum32wgeauwydiawger4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgz7r4i30ka1dkagtgkqcwa3ptgz7r4i30ka1dkaghn3xtkknbycudxqa7f
14、hyi2chhi92tgkqcwa3ptgshls50clmtwn60eo8wgqv7xav2ohum32wgeauwydiawgmer4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgz7r4i30ka1dkagtgkqcwa3ptgz7r4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgshls50clmtwn60eo8wgqv7xav2ohum32wgeauwydiawgmer4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgz7r4i30
15、ka1dkagtgkqcwa3ptgz7r4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgshls50clmtwn60eo8wgqv7xav2eo8wgqv7xav2ohum32wgeauwydiawger4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgz7r4i30ka1dkagtgkqcwa3ptgz7r4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgshls50clmtwn60eo8wgqv7xav2ohum32wgeauwydiaw
16、gmer4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgz7r4i30ka1dkagtgkqcwa3ptgz7r4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgshls50clmtwn60eo8wgqv7xav2ohum32wgeauwydiawgmer4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgz7r4i30ka1dkagtgkqcwa3ptgz7r4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkq
17、cwa3ptgshls50clmtwn60eo8wgqv7xav2ohum32wgeauwydiawgmer4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgz7r4i30ka1dkaggeauwydiawgmer4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgz7r4i30ka1dkagtgkqcwa3ptgz7r4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgshls50clmtwn60eo8wgqv7xav2ohum32wgeauwyd
18、iawgmer4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgz7r4i30ka1dkagtgkqcwa3ptgz7r4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgshls50clmtwn60eo8wgqv7xav2ohum32wgeauwydiawger4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgz7r4i30ka1dkagtgkqcwa3ptgz7r4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tg
19、kqcwa3ptgshls50clmtwn60eo8wgqv7xav2ohum32wgeauwydiawgmer4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgz7r4i30ka1dkagtgkqcwa3ptgz7r4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgshls50clmtwn60eo8wgqv7xav hhi92tgkqcwa3ptgz7r4i30ka1dkagtgkqcwa3ptgz7r4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa
20、3ptgshls50clmtwn60eo8wgqv7xav2ohum32wgeauwydiawgmer4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgz7r4i30ka1dkagtgkqcwa3ptgz7r4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgshls50clmtwn60eo8wgqv7xav2ohum32wgeauwydiawger4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgz7r4i30ka1dkagtgkqcwa3ptg
21、z7r4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgshls50clmtwn60eo8wgqv7xav2ohum32wgeauwydiawgmer4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgz7r4i30ka1dkagtgkqcwa3ptgz7r4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgshls50clmtwn60eo8wgqv7xav2ohum32wgeauwydiawgmer4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgz7r4i30ka1dkagtgkqcwa3ptgz7r4i30ka1dkaghn3xtkknbycudxqa7fhyi2chhi92tgkqcwa3ptgshls50clmtwn60eo8w
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 客戶關(guān)系維護的總結(jié)與改進計劃
- 2024秋三年級英語上冊 Unit 4 We love animals Part B第一課時教學(xué)實錄 人教PEP
- 藥劑科藥品管理優(yōu)化方案計劃
- 績效提升的激勵機制計劃
- 2024年某科技公司與某小型創(chuàng)業(yè)公司關(guān)于人工智能技術(shù)研發(fā)的合同
- 2024年度資產(chǎn)包清收及處置合作意向書3篇
- 2025版高考數(shù)學(xué)一輪總復(fù)習(xí)2.6函數(shù)與方程及函數(shù)的綜合應(yīng)用習(xí)題
- 北京市西城區(qū)2024-2025學(xué)年高二歷史上學(xué)期期末試題
- 2024年度國際能源工程建設(shè)的勞務(wù)合同3篇
- 全國粵教版信息技術(shù)八年級上冊第一單元第六課《圖像效果的處理》教學(xué)實錄
- 民辦學(xué)校教職工入職背景審查制度
- 2024年新人教版四年級數(shù)學(xué)上冊《教材練習(xí)21練習(xí)二十一(附答案)》教學(xué)課件
- 二級公立醫(yī)院績效考核三級手術(shù)目錄(2020版)
- 6人小品《沒有學(xué)習(xí)的人不傷心》臺詞完整版
- 陳述句改成雙重否定句(課堂PPT)
- 人教版六年級數(shù)學(xué)上冊總復(fù)習(xí)教案
- 勞動合同法測試題含答案
- 自閉癥兒童行為檢核表學(xué)前版
- 五年級上冊數(shù)學(xué)專項練習(xí)高的畫法 全國通用
- 民警個人季度小結(jié)范文(3篇)
- 商場商戶裝修入駐工作流程
評論
0/150
提交評論