INS-ANI
Full Member level 3
dup assembly language
Here is the problem statement:
>> WAP to take a string from user and then display it.
solution( what i have found till now)
the problem:
I am able to take input from user succesfully, but it is not displayed properly .
I request some experienced member to please help me out.
Also if possible, please advice me on troubleshooting process.
Thanks in advance.
Here is the problem statement:
>> WAP to take a string from user and then display it.
solution( what i have found till now)
Code:
.MODEL SMALL
.DATA
DISP1 DB 0DH,0AH,"Enter the desired string=",0DH,0AH,"$"
DISP2 DB 0DH,0AH,"The stored string is=",0DH,0AH,"$"
STRIP DB (?)
.CODE
MOV AX,@DATA
MOV DS,AX
MOV AH,09H
LEA DX,DISP1
INT 21H
MOV CL,07H
LEA SI,STRIP
LOOP2:
MOV AH,01H
INT 21H
MOV [SI],AL
INC SI
DEC CL
JNZ LOOP2
MOV AH,09H
LEA DX,DISP2
INT 21H
MOV CL,07H
LEA SI,STRIP
LOOP1:
MOV AH,02H
LEA DL,[SI]
INT 21H
INC SI
DEC CL
JNZ LOOP1
MOV AH,4CH
INT 21H
END
the problem:
I am able to take input from user succesfully, but it is not displayed properly .
I request some experienced member to please help me out.
Also if possible, please advice me on troubleshooting process.
Thanks in advance.