Quote Originally Posted by Nominal Animal View Post
On x86, test does a binary AND between the operands, just does not save the result anywhere. cmp subtracts the second operand from the first without actually modifying the first operand.

In other words, if you wanted to check if bit 6 (01000000b = 26 = 64) is set in register ch, then you'd use test ch, 64. If you wanted to see if ch is less than/equal to/greater than 64, then you'd do cmp ch, 64.

Ah, that makes sense. Is it possible to use "cmp ch,64" instead of "test ch, 64" to test equality since you know that if ch and 64 are equal, their difference is simply 0.

In another words, are the follow codes the same?:

Code:
cmp ch,64
je .L7
Code:
test ch,64
je .L7

Thank-you again!