0

I am trying to understand 8086 instruction encoding. Even though I found a general instruction and a bulky reference I still don't get it.

Could you please explain me how the following "translations" from byte data are done?

Thanks in advance!

48 -> dec ax

EB0D -> jmp short 0xf

642120 -> and [fs:bx+si],sp
1

2 Answers 2

0

Your disassembler shows JMP SHORT offset from beginning of instruction when actual JMP SHORT counts from byte after instruction. Maybe you need other disassembler which does good decoding.

3
  • Perhaps you could recommend one?
    – uSlackr
    Feb 22, 2012 at 13:39
  • 1
    IDA? ollydbg? Visual studio?
    – ZaB
    Feb 22, 2012 at 23:38
  • NASM
    – m0skit0
    Feb 25, 2012 at 13:45
0

An (or this) unconditional jump is followed by data, either real data or alignment data. For 8086, 2 or 4 is a good alignment, so the next instruction could start at the 21 or 20 or beyond that.

1
  • Not to nitpick, but 64h is not a prefix byte on the 8086. At least not according to: electronicsandbooks.com/eab1/manual/… page 273 Its 4 years on but still
    – user592591
    May 10, 2016 at 21:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .