1

I have the following hex machine code:

25 25 A1 A1 C3 C3

and my goals is to convert this sequence into symbolic instructions. I know the assembler converts a series of sequential symbolic instructions into a series of sequential hex machine code instructions. I converted this hex sequence into a binary sequence:

1001010010010110100001101000011100001111000011

From this, I am trying to figure out how many instructions are present. Does anyone have any tips on how to decode this and understand how many instructions are present? I am trying to use a table of conversions such as http://www.gabrielececchetti.it/Teaching/CalcolatoriElettronici/Docs/i8086_instruction_set.pdf but I am not sure I am doing this efficiently. Thank you in advance.

Peter Cordes
  • 328,167
  • 45
  • 605
  • 847
user10335564
  • 133
  • 3
  • 16
  • 2
    Converting to binary will not help. You will need to consult opcode maps and decode the bytes to find out the instruction count. – Jester Mar 13 '19 at 15:56
  • See also other questions tagged with [tag:disassembly], beyond the ones I market as duplicates of this. x86 machine code is byte-oriented: instructions will always start at byte boundaries. But you have to (partially) decode an instruction to find the start of the next one. (This is one reason high-performance hardware decoding uses so much power to decode in parallel, and pre-decode is a whole separate pipeline stage to find instruction boundaries.) – Peter Cordes Mar 13 '19 at 16:02

0 Answers0