Page 1 of 1

op code explaination required

Posted: Thu Jan 15, 2004 3:22 am
by shahzad
according to listing file generated by nasm the op code for instruction

Code: Select all

mov [120h],bx
is

Code: Select all

891E2001
89 is for moving r16 to r/m16 (r is register and m is memory)

2001 is memory location

can you please give description of middle byte 1E

Re:op code explaination required

Posted: Thu Jan 15, 2004 5:54 am
by Jamethiel
It's a mod/rm byte. In the case of 1E, it specifies a reg of bx and an r/m of [offs16].

Now do me a favor and hit up Intel's website for the pdfs of the Pentium manuals? They cover this sort of stuff in far more detail than I'm prepared to.