[cc65] Problem with linker config files

From: Carlos <shangri-la1teleline.es>
Date: 2009-02-24 19:13:42
Hi,

I'm a bit newbie with cc65 but i don't understand this behaviour with the linker config files. I'm trying to define a memory area (at $8000) to load my bitmap, if i define it as:

MEMORY {
    ZP:  start = $0002, size = $001A, type = rw, define = yes;
    RAM: start = $07FF, size = $C801, file = %O, define = yes;
}
SEGMENTS {
    STARTUP:  load = RAM, type = ro;
    LOWCODE:  load = RAM, type = ro,               optional = yes;
    INIT:     load = RAM, type = ro, define = yes, optional = yes;
    CODE:     load = RAM, type = ro;
    RODATA:   load = RAM, type = ro;
    DATA:     load = RAM, type = rw
    BITMAP:   load = RAM, type = ro, start = $8000;
    BSS:      load = RAM, type = bss, define = yes;
    HEAP:     load = RAM, type = bss, optional = yes; # must sit just below stack
    ZEROPAGE: load = ZP,  type = zp;
}
...

all seems to work fine in my program, but when i try to define it like:

MEMORY {
    ZP:  start = $0002, size = $001A, type = rw, define = yes;
    RAM: start = $07FF, size = $7800, file = %O, define = yes;
    RAM2: start = $8000, size = $5000, file = %O, define = yes;
}
SEGMENTS {
    STARTUP:  load = RAM, type = ro;
    LOWCODE:  load = RAM, type = ro,               optional = yes;
    INIT:     load = RAM, type = ro, define = yes, optional = yes;
    CODE:     load = RAM, type = ro;
    RODATA:   load = RAM, type = ro;
    DATA:     load = RAM, type = rw;
    BITMAP:   load = RAM2, type = ro;
    BSS:      load = RAM, type = bss, define = yes;
    HEAP:     load = RAM, type = bss, optional = yes; # must sit just below stack
    ZEROPAGE: load = ZP,  type = zp;
}
...

i get weird results in my program. Are not both ways supposed to be equal?

Regards,


----------------------------------------------------------------------
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 Feb 24 19:13:47 2009

This archive was generated by hypermail 2.1.8 : 2009-02-24 19:13:49 CET