NASM - The Netwide Assembler

NASM Forum => Using NASM => Topic started by: Devoum on March 09, 2010, 10:45:12 AM

Title: An instruction quick-reference
Post by: Devoum on March 09, 2010, 10:45:12 AM
Hey, this is a very short question:

Is there a good quick-reference for instructions anywhere on the Internet? I know the NASM documentation has one, but it doesn't quite express what each instruction does, but rather just how it is written.

I have alot of time on my hands, so if there aren't any quick-references out there, maybe i'd write one and share =)
Title: Re: An instruction quick-reference
Post by: Mol_Bolom on March 09, 2010, 06:23:51 PM
Depends on what arch your programming.  There's the intel manuals at http://www.intel.com/products/processor/manuals/ as well as http://faydoc.tripod.com/cpu/ .  As for any others I don't know.
Title: Re: An instruction quick-reference
Post by: Devoum on March 09, 2010, 10:14:25 PM
Depends on what arch your programming.  There's the intel manuals at http://www.intel.com/products/processor/manuals/ as well as http://faydoc.tripod.com/cpu/ .  As for any others I don't know.

Ah yes. Thank you.

Bah, I forgot about those.
Title: Re: An instruction quick-reference
Post by: Frank Kotler on March 10, 2010, 04:53:00 AM
There are many instruction set references available. Depends on what you want for a "quick" reference, I guess. Some people recommend, for an introduction to the "32-bit stuff" without the more advanced complications, a 386 manual.

http://pdos.csail.mit.edu/6.828/2005/readings/i386/toc.htm

Perhaps "too obsolete", at this point.

As you know, current Nasm manuals are more of a "list" than a description. In "the good old days", however, the Nasm manual contained a more nearly complete description. This was eliminated for two reasons. First, it was argued while Nasm must have a list of supported instructions (we can't say "all of 'em", 'cause they keep adding new ones), it is "not Nasm's job" to tell you what they do - that's the manufacturer's job. Second, and more influential, I believe, was that we didn't have anyone willing to maintain it! I split what we had off into a separate file, and put it up for those (like me) who miss it.

http://home.myfairpoint.net/fbkotler/nasmdocr.html

Also available as "nasmiref.zip" from the same place. It is "as is", errors and all. If you think this version is bad, you should have seen the 0.98 version! "push" and "pop" had exactly the same description. An apparent case of "copy, paste, and forget to modify". Deb Wiles fixed that, and many other blatant errors (Thanks again, Debs!), but we believe that some may remain (elusive little buggers!). A major shortcoming is that there's no mention of the effect of instructions on flags, in this document.

I've often thought, but never done anything about it, that a "newbie's index" into this (or given the lack of flags info, some other) instruction set reference would be helpful. Keep us from having to scroll through a bazillion instructions we're not using at the moment to find what we want. A couple dozen instructions cover most programming needs. I guess most books and tutorials have already got something like that...

Another good source of CPU info - more than just an instruction set reference - is Christian Ludloff's place:

http://www.sandpile.org/

Best,
Frank