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

Re: 6502 flag behaviour



zxmpj02@hp16.zdv.uni-tuebingen.de (Klaus Syttkus) replied to...

> Sasha Cimermanis (scim@erols.com) wrote:
>
>: Hi,
>
>: Thanks for the info everyone. 
>
>: Sasha
>
>Oh, not so quick! The Z flag *will* be zero after ORA #$80.
>Look for a jump to BNE (was it inserted to extend a branch to >128byte?)
>or into the operand (is it a valid 1-byte opcode?)
>Just thinking...

Whoops--think again...   When the Z flag is zero, it means that the
accumulator _isn't_ zero, so a BNE is always taken.

Hint:  Never think about the value of the Z flag, just the state of 
the accumulator on the most recent flag-setting instruction.


-michael

 Email:  mjmahon@aol.com
 Home page:  http://members.aol.com/MJMahon/