<p>I am trying to understand some assembly.</p>

<p>The assembly as follows, I am interested in the <code>testl</code> line:</p>

<pre><code>000319df  8b4508        movl   0x08(%ebp), %eax  
000319e2  8b4004        movl   0x04(%eax), %eax  
000319e5  85c0          testl  %eax, %eax  
000319e7  7407          je     0x000319f0  
</code></pre>

<p>I am trying to understand that point of <code>testl</code> between <code>%eax</code> and <code>%eax</code>? I think the specifics of what this code isn't important, I am just trying to understand the test with itself - wouldn't the value always be true?</p>

It tests whether
```
eax
```
is 0, or above, or below. In this case, the jump is taken if
```
eax
```
is 0.