Tuesday, 15 February 2011

assembly - Opcode Constancy rules -



assembly - Opcode Constancy rules -

so whenever run command on assembly , view on cpu mode, have segment:offset , right afterwards have opcode resembles command. instance, run command mov ax, 1a1bh , shows me this:

cs:0005 b81b1a mov ax, 1a1bh

so question is, why 1a1bh show 1b1a in opcode?

and whenever run mov ax, dx shows me this:

cs:0095 8bc2 mov ax, dx

from understood opcode 'mov' b, , ax 8, why show 8bc2?

x86 little-endian, means low byte of multi-byte integer stored @ lower address. hence why bytes of immediate value show in opposite order.

x86 instruction encoding not straightforward - can't pick out various nibbles , "this must mov". if want understand instruction encoding need @ x86 instruction set reference.

http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-instruction-set-reference-manual-325383.pdf

assembly x86 opcode

No comments:

Post a Comment