大会JLE JMP指令为例 [英] Assembly JLE jmp instruction example
问题描述
如何使用href=\"http://www.laynetworks.com/assembly%20tutorials3.htm#jump\">跳转指令家庭的 这是他们得到了什么: 我的问题是的是什么它的这句话?说我在 具体我感兴趣的使用 86 跳家族的说明 跳转本身会检查EFL寄存器中的标志。这些通常是设定测试或CMP(或其他许多指令的副作用)。
JL标签
它跳,如果它小于或如果它不大于或等于。
块引用> EBX
的变量,我想跳到标签有:
如果 EBX
是< = 10
CMP EBX,10
JLE有
- CMP对应于计算所述操作数的差异,更新标志和废弃的结果。通常用于大于/小检查
- 测试对应的操作数和计算的二进制文件,更新标记和丢弃的结果。通常用于相等检查。
参见:<一href=\"http://books.google.com/books?id=094tYob7ipQC&pg=PA378&lpg=PA378&dq=CMP+instruction&source=bl&ots=e687FSncG9&sig=jVzoRmeztIOsniN9wfQQLYhVI1E&hl=en&ei=ZJEbTY6gG8Ttsga82e3YDA&sa=X&oi=book_result&ct=result&resnum=2&ved=0CBYQ6AEwATgK#v=onepage&q=CMP%20instruction&f=false\">The在CMP 汇编语言的艺术
一点题外话:你应该得到英特尔的参考手册的。尤其是两部分的英特尔®64和IA-32架构软件开发人员手册卷2:指令集。这说明了所有的x86指令
How do you use the jump family of instructions?
This is what they've got:
JL label
"It" jumps if it is less than or if it is not larger than or equal to.
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指令为例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!