Re: [cc65] Bank Switching

Date view Thread view Subject view

From: Ullrich von Bassewitz (
Date: 2002-09-27 09:06:08

On Thu, Sep 26, 2002 at 07:26:51PM -0400, Greg King wrote:
> ld65 rejects both "type = empty" and "type =" (in both memory{} and segments{}).

OOPS, seems that you are right. And this is not a bug, there's no code
implementing the "empty" type in the linker. 

After some checking I came to the conclusion that the "empty" type is not
really needed, and this is probably the reason why the docs are wrong here (I
cannot remember correctly, but do assume that I planned to add the type and
then decided against it).

Discarding one or more segments (this is what the "empty" type was thought
for) can be easily done by assigning it to a memory are that is dropped:

    ZP: start = $02, size = $1A, type = rw, define = yes;
    RAM: start = $7FF, size = $c801, define = yes, file = %O;
    NULL: start = $0000, size = $10000, file = "";
    CODE: load = RAM, type = wprot;
    RODATA: load = RAM, type = wprot;
    DATA: load = RAM, type = rw;
    BSS: load = RAM, type = bss, define = yes;
    ZEROPAGE: load = ZP, type = zp;

Thanks a lot for the report, I've fixed the docs.



Ullrich von Bassewitz                        
To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.

Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2002-09-27 09:06:25 CEST