# Atari VCS 2600 linker configuration file for cc65
#
# Florent Flament (contact@florentflament.com), 2017

SYMBOLS {
    __STACKSIZE__: type = weak, value = $0010;   # 16 Bytes system stack
}

MEMORY {
    RAM: file = "", start = $0080, size = $0080 - __STACKSIZE__, define = yes;
    ROM: file = %O, start = $F000, size = $1000, fill = yes, fillval = $FF;
}

SEGMENTS {
    ZEROPAGE: load = RAM,            type = zp;
    STARTUP:  load = ROM,            type = ro;
    CODE:     load = ROM,            type = ro;
    RODATA:   load = ROM,            type = ro,  optional = yes;
    DATA:     load = ROM, run = RAM, type = rw,  optional = yes, define = yes;
    BSS:      load = RAM,            type = bss, optional = yes;
    VECTORS:  load = ROM,            type = ro,                                start = $FFFA;
}
