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

Re: 6502 flag behaviour



MJMahon (mjmahon@aol.com) wrote:
: David Schmidt <anonymous@fight.spam> wrote:
: 
: <quote>
: >lda $FE
: >ora #$08
: >bne <somewhere I don't want it to bne>
: >
: >From all the sources on 6502 it appears that the Z flag will always be
: >reset at the time of BNE, as we do ORA with a non-zero number. But then,
: >this fragment of code loses any sense. Does anyone know how Z flag
: >behaves
: >in such situation?
: 
: The Z flag will be set only if the last operation (bit, add, subtract,
: cmp,
: etc)
: yielded a 0 result, so the branch above will always be taken.

WHOA.

Flashback.

Thanks. Brought back memories.