[求助]请高人注释一下吧,小弟正在自学汇编,谢谢
自学好不容易啊,大哥大姐们帮小弟一把吧。不胜感激!!!!!data segment
yy1 db 'input name:','$'
yy2 db 'input a telephone number:','$'
yy3 db 'name',26 dup(' '),'tel.','$'
inbuf db 20,?,20 dup(?)
outname db 20 dup(?)
outphone db 9 dup(?)
data ends
code segment
telist proc far
assume cs:code,ds:data,es:data
begin:mov ax,data
mov ds,ax
mov es,ax
lea dx,yy1
mov ah,09h
int 21h
call input_name
mov dl,0dh
mov ah,2
int 21h
mov dl,0ah
mov ah,2h
int 21h
lea dx,yy2
mov ah,09h
int 21h
call inphone
call crlf
call printline
call crlf
telist endp
input_name proc near
call getchar
lea si, inbuf
lea di,outname
mov cl,[inbuf+1]
mov ch,0
add si,2
cld
rep movsb
xor bh,bh
mov bl,[inbuf+1]
mov al,24h
mov [outname+bx],al
ret
input_name endp
crlf proc near
mov dl,0dh
mov ah,2
int 21h
mov dl,0ah
mov ah,2
int 21h
ret
crlf endp
getchar proc near
mov ah,0ah
mov dx,offset inbuf
int 21h
ret
getchar endp
inphone proc near
call getchar
lea di,outphone
lea si,inbuf
add si,2
mov cl,[inbuf+1]
sub ch,ch
cld
rep movsb
mov al,24h
mov [outphone+8],al
ret
inphone endp
showchar proc near
mov ah,09h
int 21h
ret
showchar endp
printline proc near
lea dx,yy3
call showchar
call crlf
lea dx,outname
call showchar
mov ah,2h
mov bl,0
mov dl,30
mov dh,3
int 10h
lea dx,outphone
call showchar
ret
printline endp
code ends
end begin