在 2016年04月06日 18:37, One Thousand Gnomes 写道:
Even that would still be wrong for the smaller parity values. The CPU
supports 8bit parity directly going back to the 8086 so the
implementation for 8bit and I think 16bit is still wrong.

Alan

I don't know where the errors. X86 is new to me.

The definition of the parity flag on x86 from Wikipedia:

In x86 processors, the parity flag reflects the parity only of the least 
significant
byte of the result, and is set if the number of set bits of ones is even. 
According to
80386 Intel manual, the parity flag is changed in the x86 processor family by 
the
following instructions:
    All arithmetic instructions;
    Compare instruction (equivalent to a subtract instruction without storing 
the result);
    Logical instructions - XOR, AND, OR;
    the TEST instruction (equivalent to the AND instruction without storing the 
result).
    the POPF instruction

Reply via email to