xorl %eax – Instruction set architecture in IA-32

It’s probably:

xorl %ebx, %ebx

This is a common idiom for zeroing a register on x86. This would correspond with i = 0 in the C code.


If you are curious “but why ?” the short answer is that the xor instruction is fewer bytes than mov $0, %ebx. The long answer includes other subtle reasons.

I am leaving out the rest of the exercise since there’s nothing idiosyncratic left.

Leave a Comment

error code: 523