[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LDA C08C,X
On Mon, 24 Feb 2003, Bryan Parkoff wrote:
> Date: Mon, 24 Feb 2003 11:57:04 -0600
> From: Bryan Parkoff <BParkoff@satx.rr.com>
> Newsgroups: comp.sys.apple2
> Subject: Re: LDA C08C,X
>
> It makes sense that EOR #$D5 should be used instead of CMP because we
> don't want to use Carry Flag, but we want to use Zero Flag. For example,
> Accumulator receives #$D5 from LDA C08C,X before EOR #$D5. The result will
> be zero. BNE fails to execute. If it is not #$D5, BNE executes to find
> exact #$D5.
>
Well, yes, sure, but the CMP-instruction just sets the C flag in addition.
It also sets Z and N like EOR does. With N and Z, there is absolutely no
difference between the two. Whether the carry flag is set or not, does not
matter at all, especially, as you've seen, since the following instructions
do use CMP instead of EOR.
Holger