1 / 3

MUL operation

MUL operation. 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 .

mei
Télécharger la présentation

MUL operation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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

More Related