programb36 - Microprocessors & Applications (UPTU)...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Appendix B  Explanation : Initialize the data section. We have a source block and a destination block. The source block contains N bytes. Let N = 10 for eg. We have to reverse this 10 bytes of data and transfer them to destination block. We will initialize the data and extra segments. SI will be initialized to point to source block and DI to destination block. The count of number of bytes is loaded in the CX register. We will add the count to SI, so that SI will point to the last location. Then, we will copy the contents of this location to destination. Decrement the counter. Decrement SI to point to (N-1) th block. Increment DI to next location. Repeat the process till all the contents are transferred to destination block in reverse manner. Display the result.  Algorithm : Step I : Initialize the data and extra segment. Step II : Initialize SI to starting location of source and DI to starting location of destination block. Step III :
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 08/04/2011 for the course ECON 101 taught by Professor Lucky during the Spring '11 term at Silver Lake.

Page1 / 4

programb36 - Microprocessors & Applications (UPTU)...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online