满意答案
这个简单:)
assume cs:code, ds:datas
datas segment
str db 100 dup(?)
datas ends
code segment
start:
mov ax, datas
mov ds, ax
lea si, str
next:
mov ah, 1
int 21h
cmp al, 13
jz done
mov [si], al
inc si
jmp next
done:
mov byte ptr [si], '$'
mov ah, 2
mov dl, 13
int 21h
mov dl, 10
int 21h
mov ah, 9
lea dx, str
int 21h
mov ax, 4c00h
int 21h
code ends
end start