jmp short 0x0导致永远循环

编程入门 行业动态 更新时间:2024-10-27 00:23:10
本文介绍了jmp short 0x0导致永远循环的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

有人告诉我,转换为目标代码 xeb\xfe的指令 jmp short 0x0会导致一个过程永远循环。

I am told that the instruction "jmp short 0x0" which translates to the object code '\xeb\xfe' causes a process to loop forever. How exactly does this work?

推荐答案

这个问题看似模棱两可,但值得怀疑的是,原因是该指令会引起自己跳回去。 \xeb\xfe 的字面意思是从下一条指令的开头向前跳转-2个字节。由于该指令本身是2个字节长,因此跳转目标将是跳转指令本身。

This question seems disingenuous, but giving the benefit of the doubt, the reason is that the instruction will elicit a jump back to itself. \xeb\xfe translates literally to "Jump ahead -2 bytes from the start of the next instruction." Since this instruction is itself 2 bytes long, the jump destination will be the jump instruction itself.

更多推荐

jmp short 0x0导致永远循环

本文发布于:2023-07-27 16:04:32,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1223296.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:jmp   short

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!