Question: IN.86 ASSEMBLY LANGUAGE- Need help writing a program that reverses a string using indirect addressing using and the runtime stack (uses push and pop). The
IN.86 ASSEMBLY LANGUAGE- Need help writing a program that reverses a string using indirect addressing using and the runtime stack (uses push and pop). The string will be given BY THE USER and be up to 50 characters long. SEE CODE EXAMPLE BELOW AND USE AS STARTING POINT : Reversing a string (Revstr.asm) : This program reverses a string Irvine 32. nc INCLUDE . data Newln byte 13,10,0 aName byte "Abrham Lincoln",0 name size ($ _ aName)-1 . code main PROC ecx, namesize mov mov esi, o mov edx, offset aName call Writestring call CrLf LI : movzx eax, aName[esi] ; get character i push on stack inc esi loop L1Pop from the stack in reverse : store it in the aName array mov ecx, namesize mov esi, o L2 : ; get character pop eax mov aNameesi], alstore in string nc es2 loop L2 call writestring call CrLf exit main ENDE END main
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
