Re: 6809 assembly knowledge needed

From: Ethan Dicks <>
Date: Wed, 6 Jan 2010 19:55:32 -0500
Message-ID: <>
On 1/6/10, Josef Angstenberger <> wrote:
> wrote:
>> How can I use the Program Counter as index if its content is only known
>> after compilation?
> The 6502 has also PC relative addresses. But only for its branch
> instructions.
> This form of LDA can be used to create relocatable code....
> Since a CPU designer could hardly guarantee where this code would be
> located in a future system, the 6809 design focused heavily on support
> of position-independent, reentrant code that could be freely located
> anywhere in the memory map.

The first machine I used that had a full suite of position-independent
instructions was the PDP-11.  I'd been programming the 6502 for about
5 years at that point and I was amazed at what you could get away with
when your code wasn't nailed down to the address map (like
multiprocessing/multiuser - MMUs are handy, but they just make things
pretty and safe - PIC instructions make it possible in the first place
if you can't make each process think it owns 0000000 and up).


       Message was sent through the cbm-hackers mailing list
Received on 2010-01-07 01:00:24

Archive generated by hypermail 2.2.0.