Ask HN: Good resources for learning x86 assembly?

  • Here's a free ebook - though it's x64: https://www.syncfusion.com/succinctly-free-ebooks/assemblyla...

    I thought Peter Norton's Assembly Language was a good book and you might still be able to find a copy to order for a decent price.

  • I'm no x86 assembly expert but what I learned, I learned by reverse engineering. I don't know if that will teach you what you want to learn but I thought it was useful - I'd learned Atmel AVR assembly years ago so I knew the concepts. I looked at some short functions of Visual C++/gcc-generated assembly then I looked up the instructions and before too long I was familiar enough with the 20 to 30 instructions that most modern compilers use.

  • The Art of Assembly Language is IBM PC based. Alternatively, if you learn any Assembly language, you'll probably be ok to start from the reference materials for x86, depending on how into the weeds of early boot you're going to go. (Personally, I say, make your kernel multiboot compatible, and let someone else worry about loading your kernel; plenty of stuff to do without writing a bootloader)

  • I would read some intro on x86 instructions, and then use Compiler Explorer [1] to create assembler instructions for code from a language I know (e.g. C, Pascal, etc) to learn how their primitives (method calls, loops, branching, etc) translate into actual assembler.

    [1] https://godbolt.org/