So which ASM tutorials/books/etc are best?

Programming, for all ages and all languages.
Post Reply
User avatar
Hobin
Posts: 1
Joined: Wed Aug 01, 2012 12:37 pm
Location: The Netherlands

So which ASM tutorials/books/etc are best?

Post by Hobin »

Hi all,

I'm new here, and I'm interested in, well, OS development. That being said, although I have plenty of experience with C, Python, and computer science in general, I lack specific knowledge of (x86) assembly. I've searched around a lot, but I find it very hard to find any *good* books or tutorials on the subject. The 'Art of Assembly' for example, does not as far as I can see really teach assembly: it practically claims that you can do assembly similar to how you'd program in a high-level language, which is not very useful for OS development. Then there are the Intel and AMD manuals, which everyone likes to refer to so much. I'm sure they contain loads of useful information, but if you don't know assembly already (e.g. me), they're rather incomprehensible (at least it appears that way to me). They're more meant to look a few things up rather than teach a complete new subject, if I'm not mistaken. There are a few books to be found (surprisingly few!), but from what I can find they're all about user-level programming with system calls et al.

Basically, what I'm wanting to ask is what you used to learn assembly. Where did you start, and how did you ultimately learn the parts of assembly that allowed you to program lower-level programs? What would you recommend I'd start with? I've also searched the forums, but was unable to find much of anything. Again, this could just be me having a bad day as far as my search-fu is concerned, in which case some pointers to useful threads would of course be appreciated. :D

Thanks,
Robin
Tosi
Member
Member
Posts: 255
Joined: Tue Jun 15, 2010 9:27 am
Location: Flyover State, United States
Contact:

Re: So which ASM tutorials/books/etc are best?

Post by Tosi »

I learned by looking at instruction set references and writing my own code.
However when I started learning x86 assembly I already knew 6502 and z80 assembler which made it a little easier to learn. There are still a lot of tutorials on 8086 assembler floating around on the internet, but very few 386+ and x86_64 tutorials. You could try writing simple programs and C and then look at the generated assembly using -S.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: So which ASM tutorials/books/etc are best?

Post by Combuster »

I learned assembly mostly by hacking. Take existing small DOS thingies and investigate what they do, change them. Write pieces of inline assembly. Directly call BIOS interrupts. In the end, learning assembly is only about automating thought patterns to opcodes. You'll have to learn how to program to make sense of all of it.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Congdm
Member
Member
Posts: 48
Joined: Wed Aug 01, 2012 10:53 am

Re: So which ASM tutorials/books/etc are best?

Post by Congdm »

I learn how machines work first, after that, I learn the instructions set from manuals, that is my way of learning machine languages. I suggest you read "Computer Organization" by Carl Hamacher, Zvonko Vranesic and Safwat Zaky (it is my favourite book in my college's library). Or you can go to libraries to find some ancient books on Computer Architecture.

You think "The Art of Assembly" is not useful but have difficult at Intel manual, that is the sign of rushing for OS dev. Take time and don't rush. After reading such books, you will find programming in Assembly is not as hard as you think.
Post Reply