汇编实验14Word格式.docx

上传人:b****4 文档编号:6351648 上传时间:2023-05-06 格式:DOCX 页数:14 大小:52.60KB
下载 相关 举报
汇编实验14Word格式.docx_第1页
第1页 / 共14页
汇编实验14Word格式.docx_第2页
第2页 / 共14页
汇编实验14Word格式.docx_第3页
第3页 / 共14页
汇编实验14Word格式.docx_第4页
第4页 / 共14页
汇编实验14Word格式.docx_第5页
第5页 / 共14页
汇编实验14Word格式.docx_第6页
第6页 / 共14页
汇编实验14Word格式.docx_第7页
第7页 / 共14页
汇编实验14Word格式.docx_第8页
第8页 / 共14页
汇编实验14Word格式.docx_第9页
第9页 / 共14页
汇编实验14Word格式.docx_第10页
第10页 / 共14页
汇编实验14Word格式.docx_第11页
第11页 / 共14页
汇编实验14Word格式.docx_第12页
第12页 / 共14页
汇编实验14Word格式.docx_第13页
第13页 / 共14页
汇编实验14Word格式.docx_第14页
第14页 / 共14页
亲,该文档总共14页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

汇编实验14Word格式.docx

《汇编实验14Word格式.docx》由会员分享,可在线阅读,更多相关《汇编实验14Word格式.docx(14页珍藏版)》请在冰点文库上搜索。

汇编实验14Word格式.docx

DATA'

;

addyourdatahere!

resdb0,0,0,'

time:

'

mindb0,0,'

min'

secdb0,0,'

sec'

10,13,'

$'

timesdb0,0

string1db'

WelcomeBABY!

13,10,36

string2db'

1toQUIT'

string3db'

2TOstart'

string4db'

No'

string5db0

string6db'

Pleasewritesuchsentences'

thedefinitionofthesentences

note0db'

Hello!

Theme'

note1db'

abcdefghigklm'

note2db'

whatareyouns'

note3db'

aaaaaaaaaa'

note4db'

bbbbbbbbbbbbb'

note5db'

ccccccccccccc'

note6db'

globalhis'

note7db'

mmmmmmmmmmmmmm'

note8db'

kkkkkkkkkkkkk'

note9db'

nnnnnnnnnnnnn'

lengthListdb13,13,14,10,14,13,11,12,13,13

outmsgdb'

Yourgradeis'

36

spacedb13,10

scoredb0

string6Timedw10

guangbiaomacrox,y//清屏

pushdx

pushbx

movdl,x

movdh,y

movbh,0

movah,02h;

置光标位置BH=显示页号;

DH:

DL=行:

int10h

popbx

popdx

endm

outputstrmacrostring

leadx,string

movah,09h

int21h

endm

DSEGENDS

SSEGSEGMENTSTACK'

STACK'

db256DUP(0)

SSEGENDS

CSEGSEGMENT'

CODE'

STARTPROCFAR

setsegmentregisters:

MOVAX,DSEG

MOVDS,AX

MOVES,AX

addyourcodehere

callDtishiyuju;

//输出提示性语句

yaoqiu:

movah,0;

//键盘功能调用,读键盘

int16h

cmpal,'

1'

jzs0

2'

jzs1

jmps2

s1:

callexercise

movah,1

int21h

jmps0

s2:

guangbiao1,20

outputstrstring4

jmpyaoqiu

s0:

movah,4ch

xoral,al

end:

////读取时间

movah,2ch

subcl,times

subdh,times+1

movtimes,cl

movtimes+1,dh

MOVAX,4C00h;

exittooperatingsystem.

INT21h

STARTENDP

DrawUIproc

;

cleartheentirescreen

pushax

pushdx

pushbx

pushcx

movah,07h

moval,0

movcl,0

movch,0

movbh,7

movdh,25

movdl,80

int10h

popcx

popbx

popdx

popax

ret

DrawUIendp

Dtishiyujuproc

todrawthewelcomeinterface

guangbiao22

outputstrstring1

guangbiao12,8

outputstrstring3

guangbiao12,12

outputstrstring2;

/////将提示性语句输出来

ret

Dtishiyujuendp

exerciseproc

mov[score],0

leasi,note0

subsi,3

ex:

dec[string6Time]

callDrawUI

guangbiao0,0

leadx,string6

movah,09h

addsi,3

guangbiao12,10

movdx,si

leadi,lengthList

adddi,string6Time

movcl,[di]

movch,0

guangbiao11,15

xordx,dx

judge:

movah,01h

cmp[si],al

jzaddpoint

cmpal,1bh

jz.endexercise

jmp.conti

addpoint:

incdl

jmp.conti

.conti:

incsi

loopjudge

add[score],dl

cmp[string6Time],0

jz.endexercise

jmpEX

.endexercise:

calldisplayresult

ret

exerciseendp

displayresultproc

callDrawUI///分数

cmpscore,100

jgeB1

cmpscore,90

jgeB2

cmpscore,80

jgeB3

cmpscore,70

jgeB4

jmpB5

B1:

movdl,'

A'

jmpoutput

B2:

B'

B3:

C'

B4:

D'

B5:

E'

output:

pushdx

leadx,outmsg

movah,09h

int21h

popdx

movah,02h

displayresultendp

CSEGENDS

ENDSTART;

setentrypoint.

四、结果分析(对输入\输出部分截屏)

五、实验总结

十个打字练习的截图较多,因为是打一句,然后屏幕就清屏,于是就只截了几个

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

当前位置:首页 > 自然科学 > 物理

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2