求汇编大神翻译代码!谢谢拉~~~
Data segmentstring1db 'Input your string:$
string2db 'Digit:$'
string3db 'Letter:$'
string4db 'Other:$'
Digit db 0
Letterdb 0
Otherdb 0
dataends
prognamsegment
mainprocfar
assume cs:prognam,ds:data
start:
pushds
subax,ax
pushax
movax,data
movds,ax
lea dx,string1
movah,9
int 21h
movcx,80
L1:
movah,1
int 21h
cmpal,0dh
jz over
cmpal,30h
jb others
cmpal,39h
ja L2
jmpdigits
L2:
cmpal,41h
jb others
cmpal,5ah
ja L3
jmpletters
L3:
cmpal,61h
jb others
cmp al,7ah
ja others
jmpletters
digits:
inc digit
jmpover1
others:
inc other
jmpover1
letters:
inc letter
jmp over1
over1:
loop L1
over:
callendline
leadx,string2
movah,9
int 21h
subax,ax
moval,digit
calldisplay
callendline
leadx,string3
movah,9
int21h
sub ax,ax
moval,letter
calldisplay
callendline
leadx,string4
movah,9
int21h
sub ax,ax
moval,other
calldisplay
ret
mainendp
endlineprocnear
movah,2
movdl,0ah
int21h
movah,2
mov dl,0dh
int21h
ret
endline endp
display procnear
movdl,al
add dl,30h
movah,2
int21h
ret
display endp
prognamends
endstart
这是老师布置的一端代码!求大神能在每段代码前做上注释。并具体分析这段代码是做什么的,包括哪段调用哪段~
谢谢了
页:
[1]