Some mnemonic of the "branch structure" JCC

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.