首页
社区
课程
招聘
[求助]条件跳转指令含义
发表于: 2008-11-13 22:57 3841

[求助]条件跳转指令含义

2008-11-13 22:57
3841
...
call inet_addr
movsx edi,al
test edi ,edi
movsx ebx,ah
jge short loc_401f2b

jge跳转的条件是什么,或者说它是根据什么条件进行跳转的,

常见的是
test eax,tax
jn short loc_


cmp eax,ebx
jge short loc_

请教

[课程]Android-CTF解题方法汇总!

收藏
免费 0
支持
分享
最新回复 (4)
雪    币: 293
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
这种东西查一下手册就行了。

Jxx - Jump Instructions Table
Mnemonic Meaning Jump Condition
JA Jump if Above CF=0 and ZF=0
JAE Jump if Above or Equal CF=0
JB Jump if Below CF=1
JBE Jump if Below or Equal CF=1 or ZF=1
JC Jump if Carry CF=1

JCXZ Jump if CX Zero CX=0
JE Jump if Equal ZF=1
JG Jump if Greater (signed) ZF=0 and SF=OF
JGE Jump if Greater or Equal (signed) SF=OF
JL Jump if Less (signed) SF != OF
JLE Jump if Less or Equal (signed) ZF=1 or SF != OF
JMP Unconditional Jump unconditional

JNA Jump if Not Above CF=1 or ZF=1
JNAE Jump if Not Above or Equal CF=1
JNB Jump if Not Below CF=0
JNBE Jump if Not Below or Equal CF=0 and ZF=0
JNC Jump if Not Carry CF=0
JNE Jump if Not Equal ZF=0
JNG Jump if Not Greater (signed) ZF=1 or SF != OF

JNGE Jump if Not Greater or Equal (signed) SF != OF
JNL Jump if Not Less (signed) SF=OF
JNLE Jump if Not Less or Equal (signed) ZF=0 and SF=OF
JNO Jump if Not Overflow (signed) OF=0
JNP Jump if No Parity PF=0
JNS Jump if Not Signed (signed) SF=0
JNZ Jump if Not Zero ZF=0

JO Jump if Overflow (signed) OF=1
JP Jump if Parity PF=1
JPE Jump if Parity Even PF=1
JPO Jump if Parity Odd PF=0
JS Jump if Signed (signed) SF=1
JZ Jump if Zero ZF=1
2008-11-14 00:11
0
雪    币: 72
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
多谢!这个我查过了,但还是不明白这几句的含义
能不能具体分析一下,当al为0时跳转?
call inet_addr
movsx edi,al
test edi ,edi
movsx ebx,ah
jge short loc_401f2b
2008-11-14 11:33
0
雪    币: 2067
活跃值: (82)
能力值: ( LV9,RANK:180 )
在线值:
发帖
回帖
粉丝
4
al >= 0 时会跳转

f-.- 好像0~7F吧
有些翻成 jnb 变成0~FF都跳 (jmp)
等楼下的解答
2008-11-14 11:47
0
雪    币: 2368
活跃值: (81)
能力值: (RANK:300 )
在线值:
发帖
回帖
粉丝
5
movsx edi,al ;将al扩展到edi中,符号位填充.
test edi,edi ;edi edi 与运算 只修改标志位
movsx ebx,ah ; 不解释了.
jge short loc_401f2b ;当OF 和 SF 两个标志位相等的时候跳转

test 相当于AND操作 涉及的标志位包括了 SF 和 OF
OF 是被清零的。
SF 是和结果的最高位相同的!
当 Al < 1000 0000 B(二进制,16 制 为 AL < 80h)
跳转都会成功。

只是个人理解,高手指正。
2008-11-14 15:00
0
游客
登录 | 注册 方可回帖
返回
//