I would like to learn the x86 Instruction Set Architecture. I don’t meaning learning an assembly for x86. I want to understand the machine code baby.
The reason is that I would like to write an assembler for x86. Then I want to write a compiler that compiles to that assembly.
I know that there are the Intel manuals and AMD manuals that cover the x86 instruction set. But those are very large and dense.
I’m wondering if there is a more approachable (possibly tutorial) approach to learning the x86 instruction set architecture.
At some point you will have to cope with a bit of complexity. The x86 instruction set is large.
But you can make things substantially simpler by reading the documentation for an older CPU. Intel and AMD seem to add dozens of new instructions to each submodel. Try to read the Intel manual for the 80386, which is substantially smaller and yet covers much of what you will use.
I know a good (old) book but it is in French. It is called “Programmation du 80386” by J.-M. and M. Trio. I am not sure it is still edited nowadays (I bought mine nearly 20 years ago).