开发者

Assembler and Jump instruction (how does it work)

How does jump works ? Does it set the IP register or开发者_运维知识库 does it increase it ??

Is it relative or absolute change of place were we execute the code?


On Intel, there is both near jump that increments the IP, and far jump that uses an absolute address. So the answer is - both.

On other architectures, typically, both forms of jump are available as well, but not necessarily as the same command. On ARM, for example, for far jump you just assign to the PC register (mov pc, rx). Or load it from memory. The B (branch) command, on the other hand, adds an increment to the same PC register.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜