Question

8086 Microprocessor Write an ASSEMBLY program that is capable of copying a string in reversed order...

8086 Microprocessor
Write an ASSEMBLY program that is capable of copying a string in reversed order
For Example:
If entered: Hello World!
The string in reversed order must be:
!dlroW olleH

*MUST USE ASSEMBLY LANGUAGE *

0 0
Add a comment Improve this question Transcribed image text
Answer #1
Data Segment
  str db \'String_Reverse\',\'$\'  
  strlen dw $-str
  strrev db 20 dup(\' \')
Data Ends

Code Segment
  Assume cs:code, ds:data
  Begin:
    mov ax, data
    mov ds, ax
    mov es, ax
    mov cx, strlen
    add cx, -2
    lea si, str
    lea di, strrev
    add si, strlen
    add si, -2
    L1:
       mov al, [si]
       mov [di], al
       dec si
       inc di
       loop L1
       mov al, [si]
       mov [di], al
       inc di
       mov dl, \'$\'
       mov [di], dl
    Print:
       mov ah, 09h
       lea dx, strrev
       int 21h
    Exit:
       mov ax, 4c00h
       int 21h
Code Ends
End Begin
Add a comment
Know the answer?
Add Answer to:
8086 Microprocessor Write an ASSEMBLY program that is capable of copying a string in reversed order...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT