汇编中常用的判断条件语句的指令有哪些?
发布网友
发布时间:2022-05-01 07:40
我来回答
共1个回答
热心网友
时间:2022-06-26 05:37
条件转移指令分三大类:基于无符号数的条件转移指令、基于有符号数的条件转移指令和基于特殊算术标志位的条件转移指令。
一、无符号数的条件转移指令(Jumps
Based
on
Unsigned
(Logic)
Data)
指令的助忆符
检测的转移条件
功能描述
JE/JZ
ZF=1
Jump
Equal
or
Jump
Zero
JNE/JNZ
ZF=0
Jump
Not
Equal
or
Jump
Not
Zero
JA/JNBE
CF=0
and
ZF=0
Jump
Above
or
Jump
Not
Below
or
Equal
JAE/JNB
CF=0
Jump
Above
or
Equal
or
Jump
Not
Below
JB/JNAE
CF=1
Jump
Below
or
Jump
Not
Above
or
Equal
JBE/JNA
CF=1
or
AF=1
Jump
Below
or
Equal
or
Jump
Not
Above
二、有符号数的条件转移指令(Jumps
Based
on
Signed
(Arithmetic)
Data)
指令的助忆符
检测的转移条件
功能描述
JE/JZ
ZF=1
Jump
Equal
or
Jump
Zero
JNE/JNZ
ZF=0
Jump
Not
Equal
or
Jump
Not
Zero
JG/JNLE
ZF=0
and
SF=OF
Jump
Greater
or
Jump
Not
Less
or
Equal
JGE/JNL
SF=OF
Jump
Greater
or
Equal
or
Jump
Not
Less
JL/JNGE
SF≠OF
Jump
Less
or
Jump
Not
Greater
or
Equal
JLE/JNG
ZF=1
or
SF≠OF
Jump
Less
or
Equal
or
Jump
Not
Greater
三、特殊算术标志位的条件转移指令(Jumps
Based
on
Special
Arithmetic
Tests)
指令的助忆符
检测的转移条件
功能描述
JC
CF=1
Jump
Carry
JNC
CF=0
Jump
Not
Carry
JO
OF=1
Jump
Overflow
JNO
OF=0
Jump
Not
Overflow
JP/JPE
PF=1
Jump
Parity
or
Jump
Parity
Even
JNP/JPO
PF=0
Jump
Not
Parity
or
Jump
Parity
Odd
JS
SF=1
Jump
Sign
(negative)
JNS
SF=0
Jump
No
Sign
(positive)