Re: [cc65] mem segments et al

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2008-05-11 17:03:33
On Sat, May 10, 2008 at 06:43:10PM +0100, S M wrote:
> I wanted to test the lib and add a file to the resulting prg, and to make
> this I created a new segment in my config file like this:
>
> GFX:       load = RAM, type = ro, start = $5C00;
>
> Then I have written a .s file with .segment "GFX" .incbin "file" . Then I
> compiled an dliked it along my c program and was having problems because the
> data was not showing at 5c00 or anywhere else. I have found that the data
> shows if I put that line where I define the segment last(in the config
> file). But for the data to show up at $5c00, the segment must be defined as:
> GFX:       load = RAM, type = ro, start = $5C06; (notice: $5c06 not $5c00!)
> I am finding this very odd. I must be doing something wrong....

I'm not able to verify this. A short program using the start attribute shows
the expected behaviour. Can you please send me a short(!) but complete(!)
program that enables me to reproduce the problem?

> Other thing is I would like to use the ram from $d000 to $ffff and I don't
> know how to do it, I have tried to creat a mem area + segment, but no data
> is showing there. I would like to use a incbin, so the resulting prg will
> have the data there without need to load it from disk.

The linker will relocate the date that it runs in the given memory area, but
it will not place it there. If your data is not part of the actual program
(for example, because it must be loaded elsewhere), it is your responsibility
to move the data to this location.

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 Sun May 11 17:03:42 2008

This archive was generated by hypermail 2.1.8 : 2008-05-11 17:03:44 CEST