0

Any Can Help Me to Create The Program To Reverse word in the sentence in Assembly Form

Example
if you input this is a book
output is book a is this
one word has maximum 10 characters and maximum character in one sentence is 100 characters

please help me quickly as you can i need it before sunday

Thanks you Before

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by Tight_Coder_Ex
0

please help me quickly as you can i need it before sunday

Thanks you Before

Oh, Oh, panic homework assignment.

I don't understand what relevance word and sentence limits have in so much as the reversal algorithm and can there be more than one sentence in the string.

AND... are you using an Intel processor.

If so, establish a pointers to the first and last characters of string and use a register to temporarily move each character.

mov     al, [esi]
xchg    [edi], al
mov    [esi], al
inc      esi
dec     edi

Test for completion by:

If input length is even test if EDI < ESI finished; otherwise EDI = ESI.

AND NO! Because you haven't shared any of your code this is a much as I'll share with you.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.