开发者

How does the `test` instruction work?

开发者 https://www.devze.com 2023-01-31 08:55 出处:网络
If we have: test dword ptr [eax], 2000h je label1: Is there any value other than 0 in dword p开发者_JAVA技巧tr [eax] that would make the jump take place?Instruction test works like and instruction,

If we have:

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

Is there any value other than 0 in dword p开发者_JAVA技巧tr [eax] that would make the jump take place?


Instruction test works like and instruction, the only difference is that result is not stored back in to the destination operand. So the answer is yes. All binary numbers which not have set the 13th bit on memory address [eax], or all numbers present like b'xxxxxxxx xxxxxxxx xx0xxxxx xxxxxxxx', where x is 0 or 1, there is exactly 2^31 numbers.

0

精彩评论

暂无评论...
验证码 换一张
取 消