title: How many ways to set a register to zero?
body: <p>I'm curious how many ways are there to set a register to zero in x86 assembly. Using one instruction. Someone told me that he managed to find at least 10 ways to do it.</p>
  
  <p>The ones I can think of are:</p>
  
  <pre><code>xor ax,ax
  mov ax, 0
  and ax, 0
  </code></pre>