Hello i am really just a begginner in assembly (TASM).
anyway, my program is quite simple it is tasked to just ask the user's name and ID number. after which i have to print "hello <name> your ID is <number>"
but I cant seem to print both of them at the same line. the second user input seems to over write the first user input for some odd reason.
the out put should be:
hello, <name> your ID is: <number>
but it keeps getting over written and usually its like
hello, <number> or <number> <part of name>
TITLE simple proj DOSSEG .model SMALL .stack 100h .data GREET db "Hello, $" PNAME db "Name: $" SNAME db 24 dup("$") CRLF db 13,10,"$" PID db "ID# : $" SID db 12 dup("$") URID db "! Your ID number is: $" .code BEGIN:mov ax, @data mov ds, ax mov es, ax mov al, 03h ; clear screen mov ah, 00h int 10h mov dx, OFFSET PNAME ; Print NAME: mov ah, 09h int 21h mov byte ptr SNAME, 21 mov dx, OFFSET SNAME ; scanf Name mov ah, 0Ah int 21h mov dx, OFFSET CRLF ; print \n mov ah, 09h int 21h mov dx, OFFSET PID ; Print ID: mov ah, 09h int 21h mov byte ptr SID, 9 mov dx, OFFSET SID ; Scanf ID mov ah, 0Ah int 21h mov dx, OFFSET CRLF ; print \n mov ah, 09h int 21h mov dx, OFFSET GREET ; print Hello, mov ah, 09h int 21h mov SI, 0002 lea DX, SNAME[SI] ; Print Name Entered mov ah, 09h int 21h mov dx, OFFSET GREET ; print URID mov ah, 09h int 21h mov SI, 0002 lea DX, SID[SI] ; Printf ID Entered mov ah, 09h int 21h mov ah, 4ch int 21h end BEGIN