Re: A86: Parity Flag


[Prev][Next][Index][Thread]

Re: A86: Parity Flag




David Phillips wrote:
> 
> The parity flag is also the overflow flag.  It's context is determined by
> the last instruction that modified it.  If it has a V, then it means that
> the instruction will set it if an overflow occurs.  If it has a P, then the
> instruction will set or reset it depending on parity.  It's probably not
> very useful, unless you're writing some _very_ optimized code, or an
> emulator, etc.  I've never had a use for it in my code, but who knows, maybe
> you will.

LDI, CPIR, and similar instructions will return parity odd if bc hits
0.  I use this a lot for optimization; often when you use bc as a
counter cpi / ret po will save a few bytes.


References: