Tag: LSP BSP cell greater than state comparison border order overflow
EAX > EBX
Of=0 sf=0 zf=0 af=0 pf=0 cf=0
EAX = ebx
Of=0 sf=0 zf=1 af=0 pf=1 cf=0
EAX < EBX
Of=0 sf=1 zf=0 af=1 pf=1 cf=1
Among them, focus on CF,ZF, ( SF andof)
The JCC directive has 10 instructions for each of the 10 states of the five status flags, as follows:
Sign |
State |
Instructions |
Description |
Zf |
Zf=1 |
JZ |
Equal/equal to zero |
Zf=0 |
Jnz |
---- |
SF |
Sf=1 |
Js |
Symbol is negative |
Sf=0 |
JNS |
---- |
Pf |
Pf=1 |
Jp |
The number of "1" is even |
Pf=0 |
JNP |
---- |
Of |
Of=1 |
JO |
There is overflow |
Of=0 |
Jno |
---- |
Cf |
Cf=1 |
Jc |
With carry/Less |
Cf=0 |
JNC |
---- |
! There are multiple mnemonics for directives, and only one is listed here to indicate
Instructions |
State |
Description |
JA |
Cf=0 & Zf=0 |
Higher than |
JNA |
cf=1 | Zf=1 |
---- |
JL |
SF = of |
Less than |
JNL |
Sf≠of |
---- |
Jg |
(SF = of) & (ZF = 0) |
Greater than |
JNG |
(sf≠of) & (ZF = 1) |
---- |
JA is the unsigned integer, JL, JG is a signed integer, the reference state whether the SF can be identified.
It is easy to make judgments, combined with the EAX and EBX comparisons described earlier.
Another: Above can also be described as not less than, less than can also be described as not greater than, because the same instruction will have multiple mnemonics, so specifically how to understand, depending on the situation.
Some mnemonic of the "branch structure" JCC