www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Good learning book on x86 assembly

reply Kai Backman <kai shorthike.com> writes:
 As there seems to be a few asm guru's around I'd love to know
if you can recomend a good x86 assembly learning book. I
already have the Intel materials for reference, and I have ~10
years of experience on other instruction sets (m68k, PPC). And
if there is a better reference than the Intel material I'd love to know.

 I'm specifically interesting in learning to understand compiler
produced code and to be able to do platform specific hacks when
the compiler doesn't let me (ie. structured exceptions in Win32).

 Or just speed freaking .. :-)

 Kai

--
Kai Backman, programmer, kai shorthike.com
http://www.ShortHike.com - space station game
Oct 27 2005
next sibling parent Sean Kelly <sean f4.ca> writes:
In article <20051027223512.796606 birch>, Kai Backman says...
 As there seems to be a few asm guru's around I'd love to know
if you can recomend a good x86 assembly learning book. I
already have the Intel materials for reference, and I have ~10
years of experience on other instruction sets (m68k, PPC). And
if there is a better reference than the Intel material I'd love to know.
Sadly, the Intel material is the best reference for most things. Randall Hyde's "The Art of Assembly Language" is an excellent overview of many assembly programming concepts, but I feel that the latest version relies too heavily on his High Level Assembly rather than teaching the reader to use actual x86 instructions. Still, you can find an online version here (can't beat free): http://webster.cs.ucr.edu/AoA/DOS/ Here's a link to the x86 assembly faq: http://www.frontiernet.net/~fys/faq/index.htm And a tutorial you might find useful: http://www.drpaulcarter.com/pcasm/ Sean
Oct 27 2005
prev sibling next sibling parent Don Clugston <dac nospam.com.au> writes:
Kai Backman wrote:
  As there seems to be a few asm guru's around I'd love to know
 if you can recomend a good x86 assembly learning book. I
 already have the Intel materials for reference, and I have ~10
 years of experience on other instruction sets (m68k, PPC). And
 if there is a better reference than the Intel material I'd love to know.
 
  I'm specifically interesting in learning to understand compiler
 produced code and to be able to do platform specific hacks when
 the compiler doesn't let me (ie. structured exceptions in Win32).
 
  Or just speed freaking .. :-)
For speed freaking, visit www.agner.org, and download Agner Fog's "Optimising for the Pentium Microprocessors". There's a lot of info in there which is not in the Intel manuals, based on hundreds of experiments he's performed. You need to know x86 asm already, but with 68K, PPC experience that shouldn't take long.
Oct 27 2005
prev sibling next sibling parent Mike Parker <aldacron71 yahoo.com> writes:
Kai Backman wrote:
  As there seems to be a few asm guru's around I'd love to know
 if you can recomend a good x86 assembly learning book. I
 already have the Intel materials for reference, and I have ~10
 years of experience on other instruction sets (m68k, PPC). And
 if there is a better reference than the Intel material I'd love to know.
 
  I'm specifically interesting in learning to understand compiler
 produced code and to be able to do platform specific hacks when
 the compiler doesn't let me (ie. structured exceptions in Win32).
 
  Or just speed freaking .. :-)
 
  Kai
 
 --
 Kai Backman, programmer, kai shorthike.com
 http://www.ShortHike.com - space station game
 
I really liked Jeff Duntemann's book Assembly Language Step-by-Step. The first part covers 16-bit on DOS, while the second part moves on to 32-bit on Linux. He uses NASM for both. At the end of the books is a partial 8086/8088 instruction set reference with notes on the instructions covered. I came from a background of limited experience with asm, but it got me up to speed. It *is* geared toward beginners. Kip Irvine's Assembly Language for Intel-Based Computers is more college text-bookish (terse and to the point), and works mostly with 16-bit through MASM.
Oct 28 2005
prev sibling parent Kai Backman <kai shorthike.com> writes:
 Thanks for the tips Sean, Don and Mike. Especially the Paul Carter
tutorial turned out to be a goldmine. I skimmed through it and was
able to get most of the calling convention and other platform
specific stuff covered.

 And you were right Don, it was pretty quick to get up to speed
with the asm. I'm already looking at compiler output with a critical
eye .. :-)

 --
Kai Backman, programmer, kai shorthike.com
http://www.ShortHike.com - space station game
Oct 29 2005