本文介绍了大会JLE JMP指令为例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用href=\"http://www.laynetworks.com/assembly%20tutorials3.htm#jump\">跳转指令家庭的
这是他们得到了什么:
My question is what is it in this sentence? Say I have a variable in ebx
and I want to jump to label there:
if ebx
is <= 10
.
Specifically I'm interested in using the x86 jump family of instructions
解决方案
The jump itself checks the flags in the EFL register. These are usually set with TEST or CMP(or as a side effect of many other instructions).
CMP ebx,10
JLE there
- CMP corresponds to calculating the difference of the operands, updating the flags and discarding the result. Typically used for greater/smaller checks
- TEST corresponds to calculating the binary AND of the operands, updating the flags and discarding the result. Typically used for equality checks.
See also: The art of assembly language on CMP
As a sidenote: You should get the Intel reference manuals. In particular the two part "Intel® 64 and IA-32 Architectures Software Developer's Manual Volume 2: Instruction Set Reference" which describes all x86 instructions.
这篇关于大会JLE JMP指令为例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!