下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、匯編語言分段統(tǒng)計(jì)學(xué)生成績2009年12月22日 星期二 12:33data segment score db 30,46,40,50,60,70,80,100,90,67,70,99,59,87,63,88,92,100 ;18個(gè)學(xué)生的分?jǐn)?shù) score_under60 db 0
2、60; ;60以下的人數(shù) score_60to69 db 0
3、; ;60到69的人數(shù) score_70to79 db 0
4、 ;70到79的人數(shù) &
5、#160; score_80to89 db 0 &
6、#160; ;80到89的人數(shù) score_90to99 db 0
7、160; ;90到99的人數(shù) score_100 db 0
8、 ;100的人數(shù) score_mes1 DB 'the scores below 60 have:$' score_mes2 DB 'the scores 60 to 69 have:$'
9、160; score_mes3 DB 'the scores 70 to 79 have:$' score_mes4 DB 'the scores 80 to 89 have:$' score_mes5 DB 'the scores 90 to 99 have:$' score_mes6 DB 'the piont of 100 have:$' d
10、ata ends code segment assume cs:code,ds:data start: mov ax,data mov ds,ax xor ax,ax mov cx,18
11、0; ;循環(huán)18次 lea bx,score ; compare: cmp byte ptr bx,60
12、 ;與60比較 jl under60
13、; ;存放低于60的 jmp is60to69 ; 存放高于60的is60to69:
14、; cmp byte ptr bx,70 ;與70比較 jl _60to69
15、60; ;存放60到69之間的 jmp is70to79
16、160; ;存放等于和高于70的is70to79: cmp byte ptr bx,80 ;與80比較 jl _70
17、to79 ;存放70到79之間的 jmp is80to89 &
18、#160; ;存放等于和高于80的is80to89: cmp byte ptr bx,90
19、160; ;與90比較 jl _80to89 &
20、#160; ;存放80到89之間的 jmp is90to99 ;存放等于和高于90的is90to99: cmp byt
21、e ptr bx,100 ;與100比較 jl _90to99
22、0; ;存放90到99之間的 jz equal100
23、0; ;存放100分的under60: ;如果低于60
24、160; add score_under60,1 ;就調(diào)用_under60函數(shù) jmp con_60to69:
25、; ;如果在60到69之間 add score_60to69,1
26、60; ;就調(diào)用_60to69函數(shù) jmp con_70to79:
27、60; ;如果在70到79之間 add score_70to79,1 ;就調(diào)用_70to79函數(shù) jmp con_8
28、0to89: ;如果在80到89之間 add score_80to89,1
29、0; ;就調(diào)用_80to89函數(shù) jmp con_90to99:
30、60; ;如果在90到99之間 add score_90to99,1 &
31、#160; ;就調(diào)用_90to99函數(shù) jmp conequal100: ;如果等于100
32、160; add score_100,1 ;就調(diào)用_100函數(shù)con: lea bx,bx+1 loop compare
33、60; mov ax,4f02h ;以下三段代碼目的是清屏作業(yè),否則會(huì)出現(xiàn)亂碼的情況 mov bx,105h int 10h display:
34、; ;輸出 lea dx,score_mes1 mov a
35、h,9H int 21h mov dl,score_under60 ;輸出60以下的人數(shù) add dl,30h mov ah,2
36、; int 21h mov ah,2 ;換行輸出下一個(gè)數(shù)據(jù) mov b
37、h,0 mov dh,1 mov dl,0 int 10h lea dx,score_mes2 mov ah,9H int 21h mov dl,score_60to69 &
38、#160; ;輸出60到69的人數(shù) add dl,30h mov ah,2 int 21h mov ah,2
39、60; ;換行輸出下一個(gè)數(shù)據(jù) mov bh,0 mov dh,2 mov dl,0 int 10hlea dx,score_mes3 mov ah,9h int 21h
40、160; mov dl,score_70to79 ;輸出70到79的人數(shù) add dl,30h mov ah,2 int 21h
41、; mov ah,2 ;換行輸出下一個(gè)數(shù)據(jù) mov bh,0
42、; mov dh,3 mov dl,0 int 10h lea dx,score_mes4 mov ah,9h int 21h mov dl,score_80to89
43、; ;輸出80到89的人數(shù) add dl,30h mov ah,2 int 21h mov ah,2 &
44、#160; ;換行輸出下一個(gè)數(shù)據(jù) mov bh,0 mov dh,4 mov dl,0 int 10h lea dx,score_mes5 mov ah,9h int 21h mov dl,score_90to99 ;輸出90到99的人數(shù) add dl,30h mov ah,2 int 2
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- NX-1607-GMP-Cbl-b-IN-3-GMP-生命科學(xué)試劑-MCE-7412
- Isoorotidine-生命科學(xué)試劑-MCE-5873
- 3-Methoxy-prostaglandin-F1α-生命科學(xué)試劑-MCE-1002
- 二零二五年度紅木家具品牌授權(quán)合同及清單
- 二零二五年度父母無償贈(zèng)與子女房產(chǎn)并約定維修責(zé)任協(xié)議
- 二零二五年度新能源儲(chǔ)能技術(shù)融資合同
- 施工現(xiàn)場施工防突發(fā)公共衛(wèi)生事件制度
- 施工單位關(guān)于協(xié)調(diào)配合的聯(lián)絡(luò)函
- 雨雪天氣的應(yīng)急預(yù)案
- 《運(yùn)營管理 第7版》課件-chapt.05-選址與設(shè)施布置
- 《幼兒園健康》課件精1
- 刑事案件模擬法庭劇本完整版五篇
- 22S803 圓形鋼筋混凝土蓄水池
- 2023年開心英語四年級(jí)上冊(cè)全冊(cè)練習(xí)
- Hadoop大數(shù)據(jù)開發(fā)實(shí)例教程高職PPT完整全套教學(xué)課件
- 企業(yè)中層管理人員測評(píng)問題
- 人教版高中地理必修一全冊(cè)測試題(16份含答案)
- 《民航服務(wù)溝通技巧》教案第11課孕婦旅客服務(wù)溝通
- 新東方四級(jí)詞匯-正序版
- 面向機(jī)器人柔順操作的力位精準(zhǔn)控制方法研究共3篇
- 《地下工程測試技術(shù)》課程教學(xué)大綱
評(píng)論
0/150
提交評(píng)論