;multi-segmentexecutablefiletemplate.
datasegment
;addyourdatahere!
lendb6
numdb34,9,15,98,21,55
pkeydb\"pressanykey...$\"
ends
stacksegment
dw128dup(0)
ends
codesegment
start:
setsegmentregisters:
movax,data
movds,ax
;moves,ax
movcx,len
deccx
lop1:movdx,cx
movsi,0
lop2:moval,num[si]
cmpal,num[si1]
jaecont
xchgal,num[si1]
movnum[si],al
cont:incsi
looplop2
movcx,dx
looplop1
movcx,len
movsi,0
next:movdl,num[si]
movah,5
int21h
incsi
loopnext
movah,4ch
int21h
;addyourcodehere
leadx,pkey
movah,9
int21h;outputstringatds:dx
;waitforanykey....
movah,1
int21h
movax,4c00h;exittooperatingsystem.
int21h
ends
endstart;setentrypointandstoptheassembler.
|