gpt4 book ai didi

assembly - NASM在组装时将JNZ更改为JNE?为什么?

转载 作者:行者123 更新时间:2023-12-04 22:48:21 25 4
gpt4 key购买 nike

我有一段使用 JNZ 的代码。当我组装和链接二进制文件时,我看到我的 JNZ 被 JNE 替换。据我所知,它们基本上是相同的。但是为什么 NASM 会改变它呢?

另外,是否有任何配置选项可用于阻止在组装时发生这种变化?

最佳答案

I understand that both of them fundamentally are the same


JNEJNZsame opcodes ( 0x75 用于短跳转, 0x0f 0x85 用于近跳转),因此汇编器将创建 相同的机器码 对于他们俩。

反汇编时,反汇编器不再知道源代码中使用了哪一个,它必须使用其中的一个。

Also, is there any config option available to stop this change from happening while assembling?



不,因为它不是真正的“替代品” - JNEJNZ只是相同操作码的不同助记符。

关于assembly - NASM在组装时将JNZ更改为JNE?为什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14807033/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com