Hacker News new | ask | show | jobs
by moreice 1116 days ago
I can see the value of writing an emulator, but what was the benefit of translating from machine code to assembly instructions?
2 comments

> but what was the benefit of translating from machine code to assembly instructions

In order to read it, I suppose? There's no reason for memorizing binary encoding schemes. I mean, you will learn that 0x90 is NOP on x86 but that doesn't help you a whole lot.

x86 performance is usually better with smaller instructions, which can be accomplished by writing code that doesn't require prefex bytes and also using certain instructions that sometimes have alternative shorter encodings for specific registers.