programb42 - Microprocessors Applications(UPTU Explanation...

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. Our task is to subtract these two matrices. As it is a 3 × 3 matrix, the number of elements present in it is 9. We will initialize counter CX with 9 as 9 subtractions are to be made. Also we will use three pointers DI for matrix 1, BX for matrix 2 and SI for result matrix. Then, element 1 of matrix 2 is subtracted from element 1 of matrix 1. The result of subtraction is stored in AX register. The counter is decremented. Then, the next element from two matrices is subtracted and result is stored. The process continues till all the elements of matrix 1 and matrix 2 are subtracted. The result of subtraction of matrices is stored in result matrix 3. Display the result using display routine. ØØ Algorithm : Step I : Initialize the data segment. Step II : Initialize counter = 9. Step III
Background image of page 1

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

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

{[ snackBarMessage ]}

Page1 / 3

programb42 - Microprocessors Applications(UPTU Explanation...

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