{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

programb50

# programb50 - Get the first number in AX register Step III...

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

Microprocessors & Applications (UPTU) 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 IMUL 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 = 8000 H 8000 H BX = 2000 H × 2000 H F000 0000 H Negation of the product generated by MUL instruction  Algorithm : Step I : Initialise the data segment. Step II

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.

Unformatted text preview: : Get the first number in AX register. Step III : Get the second number in BX register. Step IV : Multiply the two 16 bit signed numbers. Step V : Stop Flowchart : Refer flowchart 50. Flowchart 50 Microprocessors & Applications (UPTU) Appendix B Program : .model small .data a dw 8000H ; Negative number as MSB = 1 b dw 2000H ; Positive number as MSB = 0 .code mov ax, @data ; Initialize data section mov ds, ax mov ax, a ; Load number1 in ax mov bx, b ; Load number2 in bx imul bx ; multiply numbers. Result in dx and ax end Result : F000 0000 H with DX = F000 H and AX = 0000 H i.e. result in negated form as result is negative....
View Full Document

{[ snackBarMessage ]}

### Page1 / 2

programb50 - Get the first number in AX register Step III...

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

View Full Document
Ask a homework question - tutors are online