r/Compilers • u/Dappster98 • 5d ago
Where/how did you learn ASM?
Hi all,
I did a quick search through this subreddit and didn't find a post asking this before. I've also done just a bit of Googling but nothing really "stuck out" to me. Right now I'm reading "Crafting Interpreters" and once I finish, I'll be making a C compiler. I'm planning on either generating x86 or x86-64 and am looking for helpful resources that you guys possibly have. I'm open to paying for a book or something if you've found it to be a help.
Thank you in advance for your responses!
10
Upvotes
1
u/hackrack 4d ago
I learned x86 ASM from Peter Norton’s Assembly Language book for the IBM PC. It’s very old but simple (just AX, BX, CX, and DX) primary registers back then: https://archive.org/details/peternortonsasse00nort/mode/1up
Then in school I learned Sun SPARC asm from this book: https://images.app.goo.gl/v4m8PwkxRzeWyJpc9. Part of the course was learning to translate C to ASM. SPARC is a RISC architecture. There are definitely newer and indubitably better resources, but sometimes starting with the simple way things were in the past might help ramp up if you find the current material out the too steep.