decoding single instruction - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

decoding single instruction

vlad777vlad777 Posts: 53Member
I want to make a function that decodes
any single instruction.

Opcode Instruction Description
89 /r MOV r/m16,r16 Move r16 to r/m16

this is from intels INSTRUCTION SET REFERENCE

So I am wondering is this opcode same for
evry procesor from 8086 to P4
or does for example 386 have diferent opcode
even if the instuction has the same mnemonic
and does the same thing.
In other words do same instructions have diferent opcodes
depending on the processor generation.
I am thinking like there could be an old and a new
version with new processor supporting both.

What other documentation do you recommend.

Thanks.

Comments

  • AsmGuru62AsmGuru62 Posts: 6,519Member
    : I want to make a function that decodes
    : any single instruction.
    :
    : Opcode Instruction Description
    : 89 /r MOV r/m16,r16 Move r16 to r/m16
    :
    : this is from intels INSTRUCTION SET REFERENCE
    :
    : So I am wondering is this opcode same for
    : evry procesor from 8086 to P4
    : or does for example 386 have diferent opcode
    : even if the instuction has the same mnemonic
    : and does the same thing.
    : In other words do same instructions have diferent opcodes
    : depending on the processor generation.
    : I am thinking like there could be an old and a new
    : version with new processor supporting both.
    :
    : What other documentation do you recommend.
    :
    : Thanks.
    :
    [color=Blue]It should be same opcode for all x86 CPUs. Otherwise old code will not run on a new CPUs.[/color]
Sign In or Register to comment.