Re: [cc65] 6502 runtime relocation

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2005-06-22 23:24:48
Hi!

On Wed, Jun 22, 2005 at 01:58:23PM +0100, Jonathan Graham Harston wrote:
> On the BBC you do not know the upper and lower bounds of memory
> until runtime. I've got some code that relocates a 6502 program
> loaded into the middle of memory to the bottom and jumps to it.
> Before I start adapting it to be suitable to work with a compiled
> 'C' program is there already any code that is already suitable?

There are some other platforms with a variable lower memory bound, but
on these systems, the solution was to use the "highest" low memory
address available for the general purpose builtin configuration. 

Probably the most versatile solution would be to generate o65 output and
write a relocator that runs on arbitrary memory addresses. I don't know
how your relocator works, but if it disassembles the code, there are
pieces of code it won't handle correctly.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Wed Jun 22 23:25:02 2005

This archive was generated by hypermail 2.1.8 : 2005-06-22 23:25:05 CEST