Assembly book for a beginner

Started by
17 comments, last by Cromulent 16 years, 1 month ago
Hello everyone, I recently decided to seriously study the Assembly language, so I did some quick search on Amazon to see what books I could find. Sadly, I don't have a computer atm, so I hardly have the time to do a search or to examine every seemingly interesting book that popped out on Amazon, hence this post. I already know C++ language, Basic and some scripting languages, so I'm not new to programming. On the other hand, all that my Assembly knowledge allows me to do is to perform basical operations on 16 bits Intel machines. What I'd like to learn is the modern Intel instruction set, along with the problematics and techniques around the Assembly languages in general. If there are OS specific books, I'd prefer Windows related textes. I don't know if there are substantial differencies between 32 and 64 bit Assemblies, but if that's the case, please suggest me where to start from. So, can anyone can point me a good book, or some downloadable e-book?
[ King_DuckZ out-- ]
Advertisement
Try the "Write Great Code" series. They give you a nice introduction to assembly from a high level programmer's perspective. They don't really teach you how to write assembly but just make you more aware of what C++ is doing in the background.

I am a little curious as to why you would want to 'seriously study' assembly. While it is very handy to have a solid knowledge of what goes on under the hood, you are unlikely to ever use assembly professionally unless you are writing a HAL (Hardware Abstraction Layer), which needless to say, is a very rare thing on modern PCs.

If you are interested in embedded programming, assembly often plays a much larger part, as you do not typically have an OS to insulate you from the hardware, and you have very limited CPU power which may benefit from hand optimisation of the assembly.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

you can try Assembly Language for Intel-Based Computers.
"A human being is a part of a whole, called by us,universe, a part limited in time and space. He experiences himself, his thoughts and feelings as something separated from the rest... a kind of optical delusion of his consciousness. This delusion is a kind of prison for us, restricting us to our personal desires and to affection for a few persons nearest to us. Our task must be to free ourselves from this prison by widening our circle of compassion to embrace all living creatures and the whole of nature in its beauty."A. Einstein
What about trying an online tutorial first? I wanted to start learning assembly a couple of weeks ago and found this:

http://drpaulcarter.com/pcasm/

You can download the entire tutorial in the form of a pdf. There are also example programs. You just need to download NASM and you can get started writing assembly right away after reading a couple of introductory chapters. I found it excellent. After you learn some basic things you can also download the IA-32 instruction set reference from intel's site and start experimenting with SSE (IMHO you shouldn't bother too much with the x87 floating point instructions, you can just use scalar SSE which is waaay easier).
I recommend focusing less on "assembly language", and focusing more on high level computer architecture/organization. Knowledge of how a computer works translates directly to knowledge of assembly language. It is then simply a matter of looking up the instructions for whichever chipset you are using.

I would start with one of these books.
http://drpaulcarter.com/pcasm/

is what I am currently reading seems to be pretty good so far.
i wouldn't waste my money buying a book. just find a little asm tutorial for visual c++ on the net on how to use inline assembly and go from there. if you want to continue, proceed to download the following documents from intel and amd:

Intel 64 and IA-32 Architecture Manuals
AMD64 Architecture Manuals

intel's volumes I, IIA, and IIB are particularly useful for learning all the assembly language instructions. you can also generate assembly when you compile your C++ programs to see what visual studio generates.

then once you have inline assembly down pat, have some fun with MASM.
Quote:Original post by yadango
i wouldn't waste my money buying a book.


I don't recommend buying a book for assembly language either. But I also don't recommend setting out to learn assembly language. Learn the basics of computer organization... any book on the topic will include assembly language.
i agree for most people it's a waste to fully learn it. but you never know, the OP may one day fall in love with backend compiler design or something ;). all cs majors should have at least a little experience with asm (and know at least a few general, conditional, and string instructions).

but yeah, i tried for example, sprinkling a little assembly in a Herbert simulator i wrote for the imagine cup. and no matter how hard i tried i couldn't get my assembler code to run faster than what visual studio generated he he he. you have to be really pimp at asm to make it run faster than what a compiler usually generates. you just can't *sprinkle* your code with simple inline assembly and expect it to run faster.

This topic is closed to new replies.

Advertisement