In Shellcoder's Handbook: Discovering and Exploiting Security Holes, I found a comparison between this C
code example:
int number;
if (number<0)
{
...more code...
}
and its compiled assembly
code (IA 32 architecture):
number dw 0
mov eax,number
or eax,eax
jge label
<no>
label :<yes>
what is the purpose of the or eax,eax
command? Shouldn't it be comp eax,0
?