What's the easiest way to determine if a register's value is equal to zero or not?
<p>I'm using x86 assembly with the Irvine library.</p>

<p>What's the easiest way to check if a register value is equal to zero or not?</p>

<p>I used cmp instruction but i'm searching for alternative way.
This is my code using cmp instruction and the register is ebx </p>

<pre><code>    cmp ebx,0
    je equ1
    mov ebx,0
    jmp cont
equ1:
    mov ebx,1
    jmp cont
cont:
    exit
</code></pre>

<p>This "booleanizes" a value, producing a 0 or 1 like <code>int ebx = !!ebx</code> would in C.</p>