How does the test statement work?

If we have:

test dword ptr [eax], 2000h je label1: 

Is there any value other than 0 in dword ptr [eax] that will make the jump?

+6
assembly x86 bit-manipulation bitwise-operators instructions
source share
1 answer

The test statement works like a command and the only difference is that the result is not saved back to the destination operand. So yes. All binary numbers that did not specify the 13th bit at the memory address [eax], or all numbers represented as b'xxxxxxxx xxxxxxxx xx0xxxxx xxxxxxxx ', where x is 0 or 1, there are exactly 2 ^ 31 numbers.

+9
source share

All Articles