News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Assembler Instructions and References

Started by Glenn9999, November 23, 2010, 10:18:20 PM

Previous topic - Next topic

Glenn9999

Is there a reference out there for assembler instructions, in terms of what is available, expected inputs and results?  When I worked with mainframes, I ended up acquiring the IBM yellow card, which is a good reference in this regard for the CPUs they put on the mainframe, and am finding a good need for an Intel/AMD equivalent. 

Also, I figured out pretty quickly that assembler programmers tend to prefer something like XOR EAX, EAX to clear the EAX register as opposed to MOV EAX, 0 for speed reasons.  How do you find out information about these kinds of things (i.e. "doing things this way is faster than doing things this way") to know what you gain and lose by doing something a particular way?

brethren

install masm32 and look in \masm32\help\

you'll find a file called opcodes.chm

using xor eax, eax instead of mov eax, 0 and other small optimizations are something you just pick up as you gain experience. Also i find MichaelW's code timing macros invaluable for optimizing my own code and trying out different ideas
http://www.masm32.com/board/index.php?topic=770.msg5281#msg5281

Gunther

Quote from: Glenn9999, November 23, 2010, at 10:18:20 PMIs there a reference out there for assembler instructions,

Yes, there is. Start your search engine and check out the manuals made by Intel and/or AMD. You'll get a complete instruction reference and a lot of optimization tricks. Moreover, the following link could be interesting for you: http://agner.org/optimize/

Good luck
Gunther
Forgive your enemies, but never forget their names.


hutch--

Glen,

Do yourself a favour and go to the Intel site and download their current set of manuals and optimisation guide, there is the best and the rest, the Intel manuals are the best.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php