I'm new to assembly language and I am having trouble with my code. At first I tried 1 input and then 1 output and it works just fine. But when I try 2 inputs. That's when the problem shows up. When it asks "Gender" input 1 and output 1 seems to overlap it.
I have searched thoroughly and managed to find one that asks the same thing but his/hers was different and I can't seem to understand. I hope someone can help. This is for school.
Full Code:
.model small
.stack 200
.data
message db "Name: ","$"
message2 db "Your name is: ","$"
message3 db "Gender: ","$"
message4 db "Your name is: ","$"
BUF DB 100
DB 100 DUP("$")
.code
MOV ax,@data
mov ds,ax
LEA dx,message
mov ah,09h
int 21h
mov ah,0ah ;
mov dx, offset buf
int 21h
LEA dx,message2
mov ah,09h
int 21h
LEA DX,BUF
ADD DX,02
MOV AH,09H
INT 21H
LEA dx,message3
mov ah,09h
int 21h
mov ah,0ah
mov dx, offset buf
int 21h
LEA dx,message4
mov ah,09h
int 21h
LEA DX,BUF
ADD DX,02
MOV AH,09H
INT 21H
MOV AX,4C00H
INT 21H
END