programb31 - 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 : The source block is at address 2001 H and destination block is at address 2005 H. Let the number of bytes in the block to be transferred be 10. Initialize this as count in CX register. Now enter the data bytes in source block which you want to transfer to the destination block. Here the destination block is overlapping the source block. So first we will transfer the contents of last location, the second last location and so on till all bytes are transferred. As SI and DI both are pointing to last location of source and data block, once the data is transferred, we will use STD i.e. set direction flag which autodecrements the SI and DI registers. Display the result.  Algorithm : Step I : Initialize the data section with addresses of source and destination block. Step II : Initialize SI = start of source block. Step III : Enter data into source block. Step IV
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 / 2

programb31 - 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