programb34 - 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 : Consider that a block of N bytes is present at source location. Let the number of bytes N = 10 for example. We have to add these N bytes. We will initialize this as count in the CX register. We know that source address is in the SI register. This SI register will act as pointer. Clear the direction flag. Using ADD instruction add the contents, byte by byte of the block. Increment SI to point to next element. Decrement the counter and add the contents till all the contents are added. Result is stored in AL. Display the contents using display routine. For example : Block Data : 01 02 03 04 05 06 07 08 09 0A Result : 01 + 02 + 03 + 04 + 05 + 06 + 07 + 08 + 09 + 0A = 37 H  Algorithm : Step I : Initialise the data segment. Step II : Initialise SI as pointer with source address. 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 / 2

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