汇编语言编写金牌榜程序文档格式.docx

上传人:b****1 文档编号:15310670 上传时间:2022-10-29 格式:DOCX 页数:15 大小:16.20KB
下载 相关 举报
汇编语言编写金牌榜程序文档格式.docx_第1页
第1页 / 共15页
汇编语言编写金牌榜程序文档格式.docx_第2页
第2页 / 共15页
汇编语言编写金牌榜程序文档格式.docx_第3页
第3页 / 共15页
汇编语言编写金牌榜程序文档格式.docx_第4页
第4页 / 共15页
汇编语言编写金牌榜程序文档格式.docx_第5页
第5页 / 共15页
点击查看更多>>
下载资源
资源描述

汇编语言编写金牌榜程序文档格式.docx

《汇编语言编写金牌榜程序文档格式.docx》由会员分享,可在线阅读,更多相关《汇编语言编写金牌榜程序文档格式.docx(15页珍藏版)》请在冰豆网上搜索。

汇编语言编写金牌榜程序文档格式.docx

FLAGDW0

dataends

codesegment

mainprocfar

assumecs:

code,ds:

data

start:

pushds

xorax,ax

pushax

movax,data

movds,ax

ma:

CALLCRLF

leadx,string

movah,9

int21h

leadx,xzzifu

movah,1

cmpal,31h

jzcsh

cmpal,32h

jzshuru

cmpal,33h

jzpaixu

cmpal,34h

jzshuchu

cmpal,35h

jzexit

jmpma

csh:

movcx,15

movdl,30h

moval,30h

leabx,country_name

csh1:

movbyteptr[bx],41h

mov[bx+1],al

mov[bx+2],dl

addbx,10

incdl

cmpdl,3Ah

jnzcsh2

incal

csh2:

loopcsh1

movbyteptr[bx],'

Z'

movbyteptr[bx+1],'

H'

movbyteptr[bx+2],'

J'

movcx,64

movbx,0

csh3:

movarray[bx],0

addbx,2

loopcsh3

shuru:

CALLCRLF

leadx,SRst2

movcx,4

leasi,ls_name

leadi,ls_shu

CALLCREE1

next:

mov[si],al

mov[si+1],al

mov[si+2],al

CALLCREE18

calljieshoushuju

mov[di],bx

CALLCREE30

mov[di+2],bx

CALLCREE42

mov[di+4],bx

addsi,10

adddi,6

callcrlf

loopnext

MOVSUM,0

LEASI,LS_NAME;

CHAXUN

zjxcha:

pushcx

pushsi

leadi,country_name

jxcha:

moval,[si]

cmpal,'

K'

JZBUDENG

cmpal,[di]

jzcha1

jxc:

ADDDI,10

LOOPjxcha

cha1:

MOVAL,[SI+1]

CMPAL,[DI+1]

JNZjxc

MOVAL,[SI+2]

CMPAL,[di+2]

ADDDI,2

MOVAX,DI;

XIANGDENGLEIJIAJINYINGTONG

LEAdi,country_name

subax,di

movdx,0

movcx,10

divcx

movcl,3

salax,cl

LEABX,ARRAY

addbx,ax

leasi,ls_shu

ADDSI,SUM

ADDSUM,6

movax,[si]

add[bx],ax

movax,[si+2]

add[bx+2],ax

movax,[si+4]

add[bx+4],ax

budeng:

popsi

popcx

loopzjxcha

leasi,array

xorbx,bx

xordx,dx

TJ:

xordi,di

adddi,[si]

adddi,[si+2]

adddi,[si+4]

mov[si+6],di

addax,[si]

addbx,[si+2]

adddx,[si+4]

addsi,8

LOOPTJ

mov[si],ax

mov[si+2],bx

mov[si+4],dx

addax,bx

addax,dx

mov[si+6],ax

movsum,ax

ZTJ:

ADDAX,[SI+6]

LOOPZTJ

CMPax,sum

jzjma

LEADX,ERR

jma:

JMPMA

paixu:

movdi,14

lp1:

movcx,di

movsi,0

lp2:

movax,array[bx]

cmpax,array[bx+8]

jgcont

jzlp3

calljh4

jmpcont

lp3:

movax,array[bx+2]

cmpax,array[bx+10]

jzlp4

lp4:

movax,array[bx+4]

cmpax,array[bx+12]

jgecont

cont:

addbx,8

looplp2

decdi

jnzlp1

jh4procnear

nextzf:

movdl,country_name[si]

xchgcountry_name[si+10],dl

movcountry_name[si],dl

incsi

loopnextzf

movsi,bx

nextsj:

movdx,array[si]

xchgdx,array[si+8]

movarray[si],dx

addsi,2

loopnextsj

ret

jh4endp

shuchu:

leadx,SCst1

movcx,11

movsi,-10

movdi,0

next3:

CMPCX,1

jnzjxnext

movsi,150

movdi,120

jxnext:

cmparray[di+6],0

JZSJJS

movcx,10;

10geguojiaming

next2:

movdl,country_name[si]

cmpdl,20h

jzjj

movah,2

jj1:

loopnext2

jj:

callcree18

movbx,array[di]

CMPBX,0

JGSCSJ1

CALLKG0

JMPSJ2

SCSJ1:

callbtod

calllx

SJ2:

movbx,array[di+2]

JGSCSJ2

JMPSJ3

LSGD:

JMPNEXT3

SCSJ2:

SJ3:

movbx,array[di+4]

JGSCSJ3

JMPSJ4

SCSJ3:

SJ4:

movbx,array[di+6]

JGSCSJ4

JMPSJJS

SCSJ4:

SJJS:

adddi,8

loopLSGD

MOVAH,1

INT21H

exit:

CREE1PROCNEAR

PUSHDX

MOVDH,24

MOVDL,0

MOVBH,0

MOVAH,2

INT10H

POPDX

RET

CREE1ENDP

CREE18PROCNEAR

MOVDL,18

CREE18ENDP

CREE30PROCNEAR

MOVDL,30

CREE30ENDP

CREE42PROCNEAR

MOVDL,42

CREE42ENDP

jieshoushujuprocnear

mov

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

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

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1