这个程序错在哪里啊!!
删除字符串里字符的程序:da segment
str1 db 'abcdefghijk','$'
str2 db 0ah,0dh,'input the place that you want to delete words:','$'
str3 db 0ah,0dh,'input the amount :','$'
num1 dw ?
num2 dw ?
da ends
cd segment
assume ds:da,cs:cd
start: mov ax,da
mov ds,ax
mov es,ax
lea dx,str1 ;输出字符串
mov ah,09h
int 21h
lea dx,str2 ;输出第一句话
mov ah,09h
int 21h
mov ah,01h ;输入地址
int 21h
and ax,0fh
dec ax
mov [num1],ax
lea dx,str3 ;输出第三句话
mov ah,09h
int 21h
mov ah,01h ;输入个数
int 21h
and ax,0fh
mov [num2],ax
mov dl,byte ptr [num2]
mov ah,02h
int 21h
lea si,str1
mov di,si
add si,[num1]
mov di,si
add si,[num2]
clc
mov cx,[num2]
cld
rep movsb
mov dl,0ah
mov ah,2
int 21h
mov dl,0dh
mov ah,2
int 21h
lea dx,str1
mov ah,09h
int 21h
mov ah,4ch
int 21h
cd ends
end start
为什么输出的字符串不正确啊???