title: Understanding cmp instruction
body: <p>I'm very new to assembly and now I'm trying to understand how <code>cmp</code> works. Here is what's written in <a href="https://en.wikibooks.org/wiki/X86_Assembly/Control_Flow#Comparison_Instructions" rel="noreferrer"><em><strong>wiki</strong></em></a>:</p>
  <pre><code>cmp arg2, arg1
  </code></pre>
  <blockquote>
  <p>Performs a comparison operation between arg1 and arg2. The comparison
  is performed by a (signed) subtraction of arg2 from arg1, the results
  of which can be called Temp. <strong>Temp is then discarded</strong>.</p>
  </blockquote>
  <p>What does it mean <em>&quot;Temp is then discarded&quot;</em>? Where is it stored? How can I access this result of the comparison? Can someone explain it?</p>