Hello all
I have a question relating to x86. In the Intel manual some instruction might take different types of memory operands.
eg. IDIV r/m8 or IDIV r/m16 or IDIV r/m32 or IDIV r/m64
now they are all IDIV is there a possibility to know if the operand is m8, m16,m32 or m64?
I was thinking if operand is m8 then it is addressed by an 8 bit register eg. ax if 32 then eax,esp…
Is my assumption correct? Correct me if I’m wrong
Any suggestions welcome
Thanks
Hello all I have a question relating to x86. In the Intel manual some
Share
Yes, the register that is used as an operand resolves the ambiguity. (Note, however, that
axis a 16-bit register, not an 8-bit register — that would beahoralfor the high or low byte, respectively.)If you’re only referring to memory operands, you need to use a
BYTE PTR,WORD PTRorDWORD PTRspecifier to resolve the ambiguity, like this:This example sets the 32-bit quantity (“double word”) at the address contained in
eaxto 0.