Re: [cc65] drive code with shared segments

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2005-04-19 14:29:23
On Tue, Apr 19, 2005 at 02:19:54PM +0200, MagerValp wrote:
> The main program determins which drive is connected, and then uploads
> the shared code, followed by the model specific code. The problem is
> that the size of the shared code is not known (it's under develop-
> ment), so I can't just make two different segments in the linker. Or,
> rather, I could, but it requires manual tweaking. Currently I'm
> working with a SHARED segment at $0500..$05ff, and a MODEL segment at
> $0600..$06ff, but if either segment grows I'll need to tweak the
> config again. I was hoping that ld65 would do that for me :) But I
> guess that would require expression support in ld65...

I'm feeling somewhat stupid, but I still don't get it. What is wrong with

MEMORY {
    RAM: start = $0400, size = $0400, file = %O;
}
SEGMENTS {
    RAMBUFFER:  load = RAM, type = rw;
    SHARED:     load = RAM, type = ro;
    SPECIFIC:   load = RAM, type = ro;
}

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 Tue Apr 19 14:29:32 2005

This archive was generated by hypermail 2.1.8 : 2005-04-19 14:29:34 CEST