Question: This is for Assembly Language: x86 how can I modify this so that it will output the string in reverse? the current output is: Enter
This is for Assembly Language: x86

how can I modify this so that it will output the string in reverse?
the current output is:
Enter a string
hello
h
e
l
l
o
I want the output to be:
Enter a string
hello
o
l
l
e
h
data prompt BYTE "Enter a string", 0dh, Oah, 0 text BYTE 101 DUP?) code main proc mov edx, OFFSET prompt call WriteString mov edx, OFFSET text mov ecx, 100 call ReadString mov ebx, e mov edx, OFFSET text call StrLength mov ecxeax L1: mov al, text[ebx] call WriteChar call Crlf inc eb>x loop L1 invoke ExitProcess,0 main endp end main
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
