Page 1 of 1

Trouble with opcodes

Posted: Thu Dec 31, 2009 7:53 pm
by Karlosoft
Hi! A very easy and fast question: what is the complete hex code of mov Ev, Iv where Ev=AX and Iv is 12? Trying with nasm is completely not-usefull because it use the opcode mov AX, Iv that doesn't require MOD R/M byte.

Re: Trouble with opcodes

Posted: Thu Dec 31, 2009 8:17 pm
by Gigasoft
C7 C0 12 00

Re: Trouble with opcodes

Posted: Thu Dec 31, 2009 8:19 pm
by Karlosoft
Thank you! The mem bits are empty?

Re: Trouble with opcodes

Posted: Thu Dec 31, 2009 8:36 pm
by Gigasoft
Well, it's the register bits that are ignored. The memory bits are 11xxx000, meaning AX.

Re: Trouble with opcodes

Posted: Thu Dec 31, 2009 9:15 pm
by thepowersgang
Karlosoft wrote:Hi! A very easy and fast question: what is the complete hex code of mov Ev, Iv where Ev=AX and Iv is 12? Trying with nasm is completely not-usefull because it use the opcode mov AX, Iv that doesn't require MOD R/M byte.
For future reference, look at the end of Volume 2A of Intel Manuals for the mov instruction.