IDIV operation in assembly (understanding)

后端 未结 2 922
后悔当初
后悔当初 2021-01-21 09:30

when I have the the operation

IDIV ecx

in assembly, then i have read that the that the value in edx:eax is divided by the operand ecx. I also

2条回答
  •  再見小時候
    2021-01-21 10:06

    What is it? It's the value you put there because you want to divide it...

    The CDQ instruction takes a 32-bit value in EAX and converts it into a 64-bit value in EDX:EAX (by copying the sign bit of EAX into every bit of EDX). You use it if (as is usual) the value you want to divide is 32-bit to begin with.

提交回复
热议问题