Task: Write a com-program that first asks for your first name, after entering the name, asks for the last name, and then outputs: Hello, LAST NAME ENTERED FIRST NAME ENTERED.
But when I output the name, it appears at the beginning of the message (Hello). What could be the reason? If you display only the last name, everything is fine
[enter image description here](https://i.stack.imgur.com/T94zr.png)
org 100h
jmp start
first_name db 255,255,255 dup("$")
last_name db 255,255,255 dup("$")
msg db "Enter first name: $"
msg2 db 10,13,"Enter last name: $"
hello db 10,13, "Hello, $"
start:
; display "Enter first name" message
mov ah, 09h
mov dx, offset msg
int 21h
; read first name from user
mov ah, 0Ah
lea dx, first_name
int 21h
; display "Enter last name" message
mov ah, 09h
mov dx, offset msg2
int 21h
; read last name from user
mov ah, 0Ah
lea dx, last_name
int 21h
; display "Hello" message
mov ah, 09h
mov dx, offset hello
int 21h
; display last name
mov ah, 09h
lea dx, last_name
add dx, 2h
int 21h
; display first name
mov ah, 09h
lea dx, first_name
add dx, 2h
int 21h
; exit program
mov ax, 4C00h
int 21h
I'm new to assembler, so I watched videos on YouTube and read articles, but I didn't understand anything