View Single Post
Old 7th October 2009
ephemera's Avatar
ephemera ephemera is offline
Knuth's homeboy
 
Join Date: Apr 2008
Posts: 537
Default

If you are programming on Dos, "Mastering Turbo Assembler" by Tom Swan is excellent but it's now out of print.
For Unix I found "Professional Assembly Language" by Richard Blum quite useful. "Asm step-by-step" by Jeff Duntemann is also good.

Along with a good book you will also need an OS specific guide/tutorial. Asm on Unix is not well documented so you will need to figure out some stuff by yourself.
I think the fbsd dev. handbook has a section on asm.

For x86 there is the AT&T/Unix syntax(as) & the Intel syntax(nasm). But the difference b/w them is just that; syntax. If you know assembly well in one of them you can figure out the other one too, besides asm is hard to read anyway.

IMO, Intel assembly kinda sucks and 16-bit x86 asm (segmented memory/DOS) is a pain in the *, 32-bit asm on Unix/Windows is a "lot" better.

Personally, I use GNU as - not great but it's ok.
I would suggest that you use whatever your instructor recommends. Once you get the hang of it you can try it on BSD.

Learning Asm is (still) useful. It can be used to optimize sections of code for speed/size, debugging/disassembly or for doing stuff you can't do in C.
It's even useful if you don't ever plan to write code in asm as it improves your understanding of the m/c.
Reply With Quote