i come across a question when i read the page 149-150 of the book.
the code source below:
Code:
if (eax < ebx) || (eax == ecx) creates the following assembly language code:
if:
cmpl %eax, %ebx
jle else
cmpl %eax, %ecx
jne else
then:
< then logic code>
jmp end
else:
< else logic code >
end:
This If statement condition required two separate CMP instructions. Because the logical operator is
an OR, if either CMP instruction evaluates to true, the program jumps to the else label. If the logical
operator is an AND, you would need to use an intermediate label to ensure that both CMP instructions
evaluate to true.
i think it should use if (eax < ebx) && (eax == ecx) instead of if (eax < ebx) || (eax == ecx)