title test
.model small
.stack 100h
.data
string label byte
max_len db 20
act_len db ?
chars db 21 dup (?)
.code
main proc
;
mov ax,@data
mov ds,ax
;
mov ah,2
mov dl,'?'
int 21h
;
lea dx,string
mov ah,0Ah
int 21h
;
mov dl,0Ah
mov ah,2
int 21h
mov dl,0Dh
int 21h
;
mov bl,[string+1]
xor bh,bh
mov [string+bx+2],'$'
lea dx,string
add dx,2
mov ah,9
int 21h
;
mov ax,4c00h
int 21h
main endp
end main
