“测试”指令如何工作?

发布于 2024-10-08 01:38:31 字数 153 浏览 0 评论 0原文

如果我们有:

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

dword ptr [eax] 中除了 0 之外是否还有其他值可以使跳转发生?

If we have:

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

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

人间不值得 2024-10-15 01:38:31

指令test的工作方式类似于and指令,唯一的区别是结果不存储回目标操作数。
所以答案是肯定的。所有未在内存地址 [eax] 上设置第 13 位的二进制数,或所有存在的数字,如 b'xxxxxxxx xxxxxxxx xx0xxxxxx xxxxxxxx',其中 x 为 0 或 1,则正好有 2^31 个数字。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文