Question: I need to write a code in assembly language (kip irvene) that Reads in a string from the user (up to 50 characters). Reverse the

I need to write a code in assembly language (kip irvene) that Reads in a string from the user (up to 50 characters). Reverse the contents of the string. Display the string. Use the STACK. This is the code i have but I have to use the stack, help? ==============================================================

INCLUDE Irvine32.inc

.data myString BYTE 51 DUP (0) myStringLength DWORD 0

.code Main PROC call Clrscr

mov ecx,50 mov edx, OFFSET myString ;reading the string call ReadString

mov myStringLength, eax

xor edx, edx mov ebx, 2 div ebx mov ecx, eax

xor esi, esi mov edi, myStringLength dec edi

L1: mov al, [myString + esi] mov ah, [myString + edi] mov [myString + edi], al mov [myString + esi], ah

inc esi dec edi loop L1

mov edx, OFFSET myString call WriteString call crlf

exit main ENDP

END main

================================================ Edit or start new code using the same variables to complete this task, and with notes would be nice. Thank you.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!