Why when I try to get my output only get a half (or even less) of my original input buffer?
At first I enter random symbols and when I transfer them into new buffer, but a result I get half of that originally buffer and I don't know why
These are parts of my code:
My data segment:
.data
buff db 255,?,255 dup("$")
result db 255,?,255 dup(" ")
_result db "Result: $"
endl db 13,10,"$"
I scan with int21,0Ah:
mov ah, 0Ah
mov dx, offset buff
int 21h
Here I transfer symbols to another buffer
loop_tranfer:
mov ah, [si] ;source buffer
mov [ di ], ah ;ah move to result buffer
inc di ;increase destination index
inc si ;increase source index
loop loop_tranfer
Here I want to get a result, but I can't
mov ah, 09h
mov dx, offset _result ;message "Result:"
int 21h
mov ah, 40h
mov bx, 1
xor cx, cx
mov cl, result+1
mov dx, offset result ; result ; here I get less than than entered
int 21h
mov ax, 4c00h ;exit
int 21h
end start