firstname.lastname@example.org wrote: > How can I use the Program Counter as index if its content is only known > after compilation? The only thing I can think of is that you can program > a piece of code that loads something from a table and both code and > table have to be relocatable on the fly. The 6502 has also PC relative addresses. But only for its branch instructions. This form of LDA can be used to create relocatable code. Just like the branch instructions are used instead of JMP in some 6502 programs. According to http://en.wikipedia.org/wiki/6809 this was one of their design intention: 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. Josef Message was sent through the cbm-hackers mailing listReceived on 2010-01-07 01:00:19
Archive generated by hypermail 2.2.0.