I already know that some registers are used for different operations like mul and div. I have searched for a good cheat sheet with all registers and there usage but couldn't find any. Could someone give me a quick overview over all registers and their usage?
Asked
Active
Viewed 21 times
0
-
See also http://www.swansontec.com/sregisters.html. Basically use whatever register is available, especially if you don't need to save/restore it, to minimize instruction count. Write comments to keep track of what's where. See also links in the [x86 tag wiki](http://stackoverflow.com/tags/x86/info) for stuff like register diagrams. – Peter Cordes Nov 02 '16 at 16:36
-
1Links from Peter are never instruction related (treating mul/div from your question explicitly), which is good thing. For that purpose have some Instruction reference guide at hand, and check detailed description of the instruction, not only registers usage. Most of the time, when I'm coding in asm, I want all the info (modified flags, opcode length, etc). So "cheat sheet" would hardly cover that. After few weeks of ASM coding you will recall those few peculiar instructions like mul/div/xlat/stos/movs/lods from head anyway (I mean registers, I still keep checking Ins. reference guide anyway). – Ped7g Nov 02 '16 at 22:27