tags:

views:

5709

answers:

14

What's the best "beginner" book for Assembly Language?

+8  A: 

Assembly Language Step-by-step.

Robert Gamble
+4  A: 

As dry as it may sound, if you're going to do any serious work, I've always found the manufacturer's or architect's assembler manual indispensable when working with assembler. If you don't have one on hand they are many times available from the manufactorer's site.

Edit: As OJ mentions a "Manual" isn't a beginners book as such, however unlike other languages, that have basic syntax, advanced syntax, best practices, patterns, etc... Assembler really just boils down to instructions. 90+% of understanding assembler is knowing what instructions you have at hand, and the other 10% is figuring out how to remember what your app is doing (extensive commenting is a plus!).

Unfortunately each machine has its own instruction set (and just as important a manufacturer dependent hardware performance/cost associated with that instruction, which you SHOULD care about since you chose assembler in the first place, otherwise you'd use a higher level language).

Hence, as before, instead of a beginner's guide which doesn't exist for assembler in a general sense, I really recommend the "Manual" as your best friend, no other book will do you as much good, because you'll be talking directly with the metal, and no-one knows the metal better than the one who made it.

On a side note, if you are just learning for the fun of it, start out with a machine that uses a RISC (reduced instruction set computing) instruction set, as that is both easier to understand and also commercially a valuable skill to have (ie. ARM or PowerPC programming).

Robert Gould
While valuable, the manufacturer's ASM manual is hardly a book for beginners. References manuals don't help beginners learn. AoA (recommended by cdv) is a much better option. The instructions aren't what needs to be learned at first, it's the concepts behind ASM Programming that are key.
OJ
+15  A: 

The Art of Assembly Language.

cdv
The most important thing to realize for someone considering this book is that despite its title it doesn't cover assembly language but rather "High Level Assembly", an teaching tool invented by the author that I personally find quite unattractive and have yet to see used in the real world.
Robert Gamble
Exactly my point Robert.
Robert Smith
This is really a good book, sure they are taling about the HLA but they show how to use pure X86 e.g in 7.8.2 and elsewhere. However the book is very comprehensive, so 1+ from me. RegardsFriedrich
Friedrich
I think the 16-bit edition uses assembly language
John T
Wonder whats the application of Assembly Language in modern computing? Do we use it in embedded systems? What's the hot area in programming assembly?
Maxood
@Maxood Reverse engineering.
CptAJ
+8  A: 

(1)There is no single assembly language. Each processor has its own, and even then there are different syntaxes(eg, gcc versus visual studio)

(2)Assembly languages are pretty straightforward. You'd be better off picking up an Assembler(the program that reads assembly files) and the CPU reference manual and writing some code, than buying a book.

Paul Nathan
(1) Most people, esp beginners, will start with x86 these days. (2) I agree. After my first class in machine architecture, where we were taught some PDP-11 assembler, this is how I learned every other machine.
Craig S
I wouldn't start out with something as complicated as x86. In university, we used the Motorola 68000 processors. They aren't advanced, but they are simple enough that you can easily work with them.
Kibbee
I suppose you could use an emulator to run your code. But most people will have ready access to an actual x86 in the form of their own computer. Personally, I think x86 assembler stinks, but machines are readily had.
Craig S
I like the IA-32 assembly language. It's very usable. Well, IMO. ;)
Paul Nathan
Any good book, or online resource to learn Motorola 68000, PDP-11 and IA-32 assembly languages?Thanks
Maxood
@Maxood: Intel gives away PDFs of its ia32 manual. It's comprehensive; the version 10 years ago is what I learned ASM from. I believe I've seen the 68K manuals here and there in PDF form as well. For the PDP, you may have to find a university library or haunt used bookstores; it's quite out of date now. Do some googling. :)
Paul Nathan
+1  A: 

If you're really serious about learning assembler, then consider getting something like an old KIM-1 system. That had a 6502 processor and a nice simple instruction set. Although a quick look on e-bay and I have to say, that one is not worth 350 bucks: )

But there were a bunch of systems made "back in the day". A Z-80 system, one of the old 6800 Heathkit ET-3400 trainer might be nice. I see one for a couple of bucks on e-bay.

These old systems are real simple but have a nice LED display, a monitor ROM and some I/O to get you started with a couple of simple projects.

John Dyer
Z80 isn't a good starting point, being a hacked-up version of the 8080, which is already not a clean architecture. The sweetest chip I programmed in assembly in those days was the Motorola 6809.
David Thornley
+2  A: 

In my earlier years I played around with nasm, which has some very comprehensive documentation. It is still under active development.

Jamie Love
+1  A: 

I used Microcontrollers and Microcomputers in one of my Computer Architecture classes and found it to be very good.

Aaron Maenpaa
+3  A: 

In spite of everyone's vote for Art of Assembly, I don't know how many of those who voted for it really read the book from top to bottom.
Instead of teaching you a nearly standard Assembly dialect, the book attempts to teach you HLA (High Level Assembly), an assembly dialect invented by the author of the book himself, aimed at giving people an easier introduction to Assembly language.
So instead of learning some useful dialect (for ex. NASM or GNU Assembler), which you might actually use or need some time, you'll find yourself learning a barely known non-standard assembly dialect which you will more than probably never use nor need.
There is however another edition of the Art of Assembly book which is worth reading and that is Art of Assembly - DOS 16 bit Edition. Unfortunately, as the title says it treats only DOS 16 bit but other than that it can give you a nice introduction into Computer Architecture and Assembly Language.
Now, a book that I would recommend you on this subject is Introduction To Assembly Language Programming which I think will get you started pretty fast. It treats both CISC and RISC architectures so you will really have what to learn from it.

Robert Smith
A: 

I highly recommend you check out Webster. This is the home of the Art of Assembly book. It teaches you the internals of the CPU and the basics of assembly that you need to know no matter what assembler you decide to use. The book teaches HLA (High Level Assembler) which is actually a great language for learning assembly. It provides a framework for your code so you can jump right in making real programs right from the start. You can easily move on to other assemblers after you learn the fundamentals with HLA. (I recommend GoAsm). Other great resources are Hutch's web site and the Iczelion tutorials.

pro3carp3
A: 

I learned with Zen of Assembly Language (Abrash). Though I suspect this is more of a collector's item by now, it does have some great material that is relevant today.

Clayton
A: 

Like John Dyer said, learning assembly on a 6502 or 6502 variation is a good way to go for beginners. The chips were designed so that a human could program them with assembly language. Modern chips are insanely complex.

My personal recommendation would be to grab a Commodore 64 emulator and learn using Machine Language for the Commodore 64 and other Computers. This book is long out of print, but it's fairly easy to track down a used copy or a PDF online.

Daniel Auger
+1  A: 
DrJokepu
A: 

When I was in school, I learned Motorolla 68000 assembly using this book.

The processor architecture is such that it's very assembly-programmer friendly: there are lots of memory addressing modes which makes operations take less lines of assembly code.

The drawback is that it's very unlike modern RISC processor architecture, which have few addressing modes and are designed for speed and simplicity rather than a rich "API" for assembly programmers.

Josh Kodroff
A: 

The Art of Assembly Language* is a fantastic book by Randall Hyde from No Starch press.

I bought it a couple years ago and it does a really good job of introducing the user gently to the various aspects of assembly programming, and ends up with fairly advanced information too.

This book also introduces a slightly higher level version of Assembly Language that the author developed in many years of teaching assembly. It gets converted to x86 assembly primarily, but it is sufficiently high level also that you learn the transferable parts of assembly too.

*and if you buy from this link I get a (small) commission :)

John Weldon