op code explaination required

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
shahzad

op code explaination required

Post 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
Jamethiel

Re:op code explaination required

Post 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.
Post Reply