programb41 - 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 : We have two matrices mat 1 and mat 2 present. Now our task is to add these two matrices and display the result. As it is a 3 × 3 matrix, number of elements present is 9. We will initialise counter CX with 9 as 9 additions are to be made. Also we will use three pointers DI for matrix 1, BX for matrix 2 and SI for result matrix. Element 1 of matrix 1 and matrix 2 are added. The result of addition alongwith carry are stored in AX register. The counter is decremented. The next element from two matrices is added and result is stored in result matrix. The process continues till all the elements are added. Then, display the resultant matrix using display routine.  Algorithm : Step I : Initialize the data segment. Step II : Initialize counter = 9. Step III : Initialize pointer DI to matrix 1. Step IV : Initialize pointer BX to matrix 2. Step V
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 / 3

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