[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: General 6502 question
Nathan Mates wrote:
>
> In article <33FE0A70.7507@monmouth.com>,
> Daniel Webster <dwebster@monmouth.com> wrote:
> >I am trying to disassmble a program, and its been a while since I've
> >hacked 6502 code. I know that STA ($26),y is indirect addressing, but
> >what does LDA ($26,X) do?
>
> Think of it as lda ($26+X). Adds $26 to the X-register, and
> dereferences that zeropage 2-byte pointer.
>
> Nathan Mates
>
> --
> <*> Nathan Mates http://www.visi.com/~nathan/ <*>
> # What are the facts? Again and again and again-- what are the _facts_?
> # Shun wishful thinking, avoid opinion, care not what the neighbors
> # think-- what are the facts, and to how many decimal places? -R.A. Heinlein
Thanks Nate, but just so I am clear on this, it takes the contents of
the zero page address, adds the contents of the X register and loads
that number in the accumulator or does it load the contents of the
address at $26+X? The reason I am unclear on this is I am trying to
differentiate it from LDA $5000,X (a non zero page address)
Thanks again
Dan