Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Spatial And Temporal Databases 10th International Symposium Sstd 2007 Boston Ma Usa July 2007 Proceedings Lncs 4605

Authors: Dimitris Papadias ,Donghui Zhang ,George Kollios

2007th Edition

3540735399, 978-3540735397

More Books

Students also viewed these Databases questions