The ReadString procedure reads a string from the keyboard, stopping when the user presses the Enter key. Pass the offset of a buffer in EDX and set ECX to the maximum number of characters the user can enter, plus 1 (to save space for the terminating null byte). The procedure returns the count of the number of characters typed by the user in EAX. Sample:
.data
buffer BYTE 21 DUP(0) ; input buffer
byteCount DWORD ? ; holds counter
remrk byte “Enter a string: “,0
.code
main proc
mov edx,OFFSET buffer ; point to the buffer
mov ecx,SIZEOF buffer ; specify max characters
call ReadString ; input the string
mov byteCount,eax ; number of characters
ReadString automatically inserts a null terminator in memory at the end of the string. The following is a hexadecimal and ASCII dump of the first 8 bytes of buffer after the user has entered the string “ABCDEFG”
Question: Reverse a string but the string from a user usingReadString procedure. Please comment out the declarations of variables used Your output should be shown in the picture
Please take a picture of your assembly code and your output.
Extracted text: C:4. CAWindows\system32\cmd.exe Please insert a string: Towson_university Towson_university ytisrevinu_noswot Press any key to continue .