Author Topic: An instruction quick-reference  (Read 3381 times)

Offline Devoum

  • Jr. Member
  • *
  • Posts: 13
An instruction quick-reference
« 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 =)

Offline Mol_Bolom

  • Jr. Member
  • *
  • Posts: 4
Re: An instruction quick-reference
« Reply #1 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.

Offline Devoum

  • Jr. Member
  • *
  • Posts: 13
Re: An instruction quick-reference
« Reply #2 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.

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2381
  • Country: us
Re: An instruction quick-reference
« Reply #3 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