Download presentation
Presentation is loading. Please wait.
1
MUL operation
2
MLU Operations The MUL instruction multiplies an 8-,16-,32-bits operand by either AL,AX,or EAX. The instruction format is: MUL r/m8 MUL r/m16 MUL r/m32 The result is in EDX and EAX . EDX sets the flag register if it is not zero ( as the result of operation over flow situation is Eax carries the product of operation. Will we go through the detail of multiplication and division instruction later on this course.
3
Example: TITLE Multiply (AddSub2.asm)
; This program Multiply two decimal numbers together. We need to put the first operand in eax, the ;second operand in another multi purpose register. The product goes to eax ; Last update: 2/1/02 INCLUDE Irvine32.inc .data val1 dword 10 val2 dword 40 .code main PROC mov eax,val1 ; eax=10 mov ebx,val2 ; ebx=40 mul ebx ; eax=ebx*eax call writedec exit main ENDP END main
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.