I want to know what this x86 register flag means in the DOS/Windows program Debug:
The auxiliary carry (AC = 1 or NA = 0)
Does it have the same meaning as the Common carry? (CY = 1 or NC = 0)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The auxiliary carry flag is set when an instruction causes a carry or borrow out of bit 3. Same idea as CY but for the upper bit of the lower nibble in a byte. The abbreviation AC is old style, the flag is named “AF” in the Intel processor manuals, short for “Adjust Flag”. It is used by a select few x86 instructions that perform BCD calculation adjustments, like AAC (Ascii Adjust after Addition) and DAA (Decimal Adjust after Addition). These instructions date from the stone age of computing, back when it was still common to supply operands in BCD encoding. Which encodes a decimal digit in a nibble. Like decimal 99 is 10011001 in BCD.
It was common back then for processors to have dedicated hardware support for calculations involving BCD. That’s ancient history, programmers got used to encoding numbers in binary. Well, compilers most of all. Notable is that these instructions are no longer present in the x64 instruction set. Making room for more useful 64-bit specific opcodes.