programb20

# programb20 - Microprocessors & Applications (UPTU) Appendix...

This preview shows pages 1–2. Sign up to view the full content.

Appendix B  Explanation : Consider that a word of data is present in the AX register and 2 nd word of data is present in the BX register. We have to multiply the word in AX with the word in BX. Using MUL instruction, multiply the contents of the 2 registers. The multiplication of the two 16 bit numbers may result into a 32 bit number. So result is stored in the DX and AX register. The MSB of result is stored in the DX register and LSB of result in AX register. AX = 1234 H 1234 H BX = 0100 H × 0100 H 123400 H  Algorithm : Step I : Initialise the data segment. Step II : Get the first number in AX register. Step III : Get the second number in BX register. Step IV : Multiply the two 16 bit numbers. Step V : Display the result. Step VI : Stop  Flowchart : Refer flowchart 20. Flowchart 20  Program : .model small .data a dw 1234H b dw 0100H .code mov ax, @data ; Initialize data section mov ds, ax mov ax, a ; Load number1 in ax

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

View Full Document
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

programb20 - Microprocessors & Applications (UPTU) Appendix...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online