Question: Assembly Language using Kip Irvine library. Above is code used to print out each character on a new line taken from user input. How would
Assembly Language using Kip Irvine library.

Above is code used to print out each character on a new line taken from user input. How would you modify this so that it will print each character from a string in reverse?
I know I would have to decrement the ebx register, but I am unsure on how use the length of the string as a starting point to decrement from. Any help would be appreciated.
INCLUDE c:\Irvine\Irvine32.inc :/1.386 ;// .model flat,stdcall ;//.stack 4096 ExitProcess proto,dwExitCode:dword data prompt text BYTE "I BYTE 101 DUP(?) nput a string code main proc mov edx, OFFSET prompt call WriteString mov edx, OFFSET text mov ecx, 100 call ReadString mov ebx, 0 mov edx, OFFSET text call StrLength mov eCx, eax L1: mov al, text [ebx] call WriteChar call Crlf inc ebx Loop L1 invoke ExitProcess,0 main endp end main INCLUDE c:\Irvine\Irvine32.inc :/1.386 ;// .model flat,stdcall ;//.stack 4096 ExitProcess proto,dwExitCode:dword data prompt text BYTE "I BYTE 101 DUP(?) nput a string code main proc mov edx, OFFSET prompt call WriteString mov edx, OFFSET text mov ecx, 100 call ReadString mov ebx, 0 mov edx, OFFSET text call StrLength mov eCx, eax L1: mov al, text [ebx] call WriteChar call Crlf inc ebx 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
