code segment
assume cs:code,ds:data,ss:stk
main proc
mov ax,data
mov ds,ax
mov ah,0Fh
int 10h
mov VPage,bh
mov dx,offset msg
lea si,buf1
call Input
inc byte ptr Number
lea dx,Number
lea si,buf2
call Input
inc byte ptr Number
lea dx,Number
lea si,buf3
call Input
lea si,buf1+2
call Print
lea si,buf2+2
call Print
lea si,buf3+2
call Print
xor ah,ah
int 16h
mov ax,4c00h
int 21h
main endp
Input proc
mov ah,9
int 21h
mov dx,si
mov ah,0Ah
int 21h
xor ch,ch
mov cl,[si+1]
add si,cx
mov byte ptr [si+2],'$'
lea dx,CRLF
mov ah,9
int 21h
ret
Input endp
Print proc
mov bh,VPage
mov ah,3
int 10h
inc dh
mov ah,2
int 10h
mov dx,si
mov ah,9
int 21h
ret
Print endp
code ends
data segment
msg db 'Введите три слова: ',13,10
Number db '1: $'
CRLF db 13,10,36
buf1 db 21, 22 dup (?)
buf2 db 21, 22 dup (?)
buf3 db 21, 22 dup (?)
VPage db ?
data ends
stk segment stack
dw 128 dup (?)
stk ends
end main
