Debug flag Space Comparison Table [from search engine]

Source: Internet
Author: User
Tags comparison table

For full or simplified English (~ To the simplified part.
When the flag name is 1, the flag is 0.
Of [overflow flag] ov [overflow] NV [not overflow]
DF [Direction Flag] DN [Down] up [Up]
If [interrupt flag] ei [enable I ~ T] di [disable I ~ T]
SF [sign flag] ng [negative sign] pl [plus sign]
ZF [zero flag] Zr [zero] NZ [not zero]
AF [Auxiliary carry flag] AC [Auxiliary carry] Na [not aux ~]
PF [parity flag] PE [parity even] po [parity odd]
Cf [carry flag] CY [carry] NC [not carry]

 

addition command: add, ADC, Inc, and xadd all affect the condition Flag except that INC does not affect the CF flag.
CF, ZF, SF, of
indicates whether the maximum bit of CF has a forward number.
If the two operands have the same symbol, the result symbol is opposite to the result symbol of = 1, otherwise, of = 0.

subtraction commands: Sub, SBB, Dec, neg, CMP, cmpxchg, and cmpxchg8b
the first six types of commands affect the CF flag, except that DEC does not affect the CF flag. Cmpxhg8b only affects ZF.
CF indicates the overflow of the unsigned number subtraction, and it is indeed the maximum valid position of the subtrahend to the high level.
of BITs indicates that the number of BITs overflows.
if the number of BITs is reduced, cf = 1 is used; otherwise, cf = 0.
of if the two numeric symbols are the opposite, and the result symbols are the same as the subtrahend, then of = 1. otherwise, of = 0.

Multiplication command: Mul, imul
Mul: if the product's first half is 0, both the CF and of BITs are 0; otherwise, both CF and of are 1.
Imul: if the first half is the extension of the lower half, the CF bit and of bit are both 0, otherwise they are all 1.

Division command: div and idiv are not defined for all condition bits.

Logical commands: And, or, not, XOR, test
Not allows immediate count. The other four commands must be stored in the register unless the source operand is an immediate number. Another operand can be any addressing method.
Not does not affect the flag space. The remaining four types of CF, of, set to 0, and AF are not defined. SF, ZF, and PF are determined by the situation.

Positioning scan command: BSF forward bit scan and BSR reverse bit Scan
The source operand can be any addressing method except the immediate number. The destination operand must be a register and affect the ZF bit.

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.