[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 6502 flag behaviour
- Subject: Re: 6502 flag behaviour
- From: mjmahon@aol.com (MJMahon)
- Date: 1997/04/27
- Newsgroups: comp.sys.apple2
- Organization: AOL http://www.aol.com
- References: <5j5grd$jr9@newsserv.zdv.uni-tuebingen.de>
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/