MEMORY
{
  ZP:  start = $0,    size = $100,  type = rw, define = yes;
  RAM: start = $0200, size = $7D00, type = rw, define = yes;
  ROM: start = $8000, size = $8000, fill = yes, fillval = $ff, file = %O;
}

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

FEATURES {
  CONDES: segment = STARTUP,
          type = constructor,
          label = __CONSTRUCTOR_TABLE__,
          count = __CONSTRUCTOR_COUNT__;
  CONDES: segment = STARTUP,
          type = destructor,
          label = __DESTRUCTOR_TABLE__,
          count = __DESTRUCTOR_COUNT__;
}

SYMBOLS {
  __STACKSIZE__: value = $0200, type = weak;
}
