programb21 - 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 double word numbers i.e. 32 bit numbers. Initially we will load the first 32 bit into the registers AX and BX. AX contains the LSB while BX contains the MSB, using MOV instruction. Now we will load the second 32 bit number into the registers CX and DX with CX containing the LSB and DX containing the MSB. First we will add the two LSBs i.e. contents of AX and CX registers, using ADD instruction. Now we will the contents of the two MSBs i.e. contents of BX and DX registers. For this addition we will use the ADC instruction (add with carry) so that if any carry is generated in the LSB addition it will be added. The result is stored in AX and BX registers. AX contains the LSB and BX contains the MSB after addition. Display the result using display routine. For example : BX : AX = 12345678 H 12345678 H DX : CX = 11111111 H + 11111111 H 23456789 H  Algorithm : Step I : Initialise the data segment. Step II
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

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