MUL operation in assembly

前端 未结 2 2046
名媛妹妹
名媛妹妹 2021-01-07 13:12

i have the following assembly lines:

...
MOV ECX, 0x36EE80
MOV EDX, 0x95217CB1
MUL EDX
SHR EDX, 0x15
MOV DWORD PTR SS:[EBP-0x3C8], EDX
....
....
2条回答
  •  盖世英雄少女心
    2021-01-07 13:18

    The description for MUL r/m32 is Unsigned multiply (EDX:EAX <- EAX * r/m32)..

    That means that the 64-bit product will be stored in EDX:EAX, i.e. the upper 32 bits ends up in EDX and the lower 32 bits in EAX. Which fits with the results you're seeing, since the product should be 0x1DBEE41EB22A9CB.

提交回复
热议问题