I've been trying to get a good hold on the x86 assembly language, and was wondering if there was a quick-and-short equivalent of movl $1, %eax
. That's when I thought that a list of idioms used frequently in the language would perhaps be a good idea.
This could include the preferred use of xorl %eax, %eax
as opposed to movl $0, %eax
, or testl %eax, %eax
against cmpl $0, %eax
.
Oh, and kindly post one example per post!