For the assembly fanatics, the Holy Grail must surely be a copy of Michael Abrash's
Graphics Programming Back Book, Special Edition, with the all important CD-ROM - important because it holds two of Abrash's earlier books,
The Zen of Assembly Programming and
Zen and the Art of Code Optimization, as well as the whole of the massive
Black Book itself, and a vast library of source code examples.
If you can find a copy of it, especially a copy with the CD, consider yourself fortunate indeed - for it is now so precious a tome that it sells for upwards of $380 on Amazon. Even without considring the price, it is not a casual purchase by any stretch of the imagination, for the book weighs in at over 1500 pages, and is over 3 inches thick - and every page is filled with code optimization lore for assembly and C coders of all kinds, especially graphics programmers (naturally). Despite it's increasing aging information, it remains an important resource for it's overall emphasis on this subject, combined with Abrash's glib and easily-followed writing style.
The good news is, some time back, Dr. Dobb's Journal Online released the
Black Book (but not the other two) as PDFs on their site; the bad news is, it's no longer there. It remains on at least one
mirror site, but I have no idea of the legality of downloading it from there, since the DDJ release seems to have been subscription-only.
Hopefully, Michael will put us all out of our collective misery by releasing a newer volume, but given how he remains busy
in dark Mordor crafting Rings of Power for Sauron in Redmond working on X-Box development for MS, this seems sadly unlikely.
As an aside, one of the things I like about this book is that Abrash, while among the hardest of the hard-core assembly programmers, is not a fanatic about assembly - indeed, he goes out of his way to point out that it is far easier to write
inefficient code in assembly than in higher-level languages, if you are careless. If you learn the lessons of this book, then you may never need to write more than a few dozen lines assembly code in your whole system - but they will be the
right code. When I finally get around to writing Thelema (LoIS is primarily a warm up exercise, to practice at important skills such as OS coding, assembly language, and code documentation), I mean to write most of the system in Scheme, yet, I expect that it will outperform most of the OSes written entirely in 'blazingy fast' assembly language, simply because I will be able, with profiler and zen timer and the other tools of the trade, to find out where the assembly code
should go, and save the rest of my effort at making the system I want.
YMMV, of course; it is concievable, if unlikely, that a truly butch assembly coder could write tightly optimized code that is always correct. It is also true, IMAO, that a programmer who doesn't know any assembly will always be only half what they could be, if only because they don't know what the computer is actually doing when their C or Pascal or whatever code runs. But consider this: even highly respected assembly programmers like Abrash, or net.guru
Paul Hsieh, use high-level languages for most of their day-to-day coding projects. The lesson is, put your effort where it will do the most good. Thus endeth the sermon.