X86-assembly/Instructions/mul

From aldeid
Jump to navigation Jump to search
You are here:
mul

Description

  • The mul instruction is used to perform a multiplication.
  • Always multiplies EAX by a value.
  • The result of the multiplication is stored in a 64-bits value accross EDX (most significant 32 bits of the operation) and EAX (least significant 32 bits of the operation).

Syntax

mul value

Example

mul 0x10
Multiplies EAX by 0x10 and stores the result in EDX:EAX.

The result of the previous operation is 123,456,789,012,345 (7048860DDF79 in hexadecimal), here is how it will be broken down into EDX and EAX:

+----------+----------+
|     7048 | 860DDF79 |
+----------+----------+
|    EDX   |    EAX   |
+----------+----------+

Comments