# memory map
MEMORY {
	HEADER:		start = $0000, size = $0010, file = %O, fill = yes;
	ROMST:		start = $8000, size = $1400, type = ro, file = %O, fill = yes, define = yes;
	ROMINFO_5k:	start = $9400, size = $0bfa, type = ro, file = %O, fill = yes, define = yes;
	ROMINFO_8k:	start = $9ffa, size = $0006, type = ro, file = %O, fill = yes, define = yes;
	ROMST_other:    start = $a000, size = $5ffa, type = ro, file = %O, fill = yes, define = yes;
	ROMINFO:	start = $fffa, size = $0006, type = ro, file = %O, fill = yes, define = yes;
	ROMCHR:		start = $0000, size = $2000, type = rw, define = yes;
	ZP:		    start = $0000, size = $0100, type = rw, define = yes;
	STACK:		start = $0100, size = $0100, type = rw, define = yes;
	DMA:		start = $0200, size = $0100, type = rw, define = yes;
	RAM:		start = $0300, size = $0500, type = rw, define = yes;
	SRAM:		start = $6000, size = $2000, type = rw, define = yes;
}

# segment map
SEGMENTS {
	HEADER:		load = HEADER,		type = ro;
	STARTUP:	load = ROMST,		type = ro,	define = yes;
	SEG_5K:		load = ROMINFO_5k,  type = ro,	define = yes;
	VECINFO_8k:	load = ROMINFO_8k,  type = ro,	define = yes;
	VECINFO:	load = ROMINFO,		type = ro,	define = yes;
	RODATA:		load = ROMST,		type = ro,	define = yes;
	DATA:		load = ROMST, run = RAM,type = rw,	define = yes;
	ZEROPAGE:	load = ZP,		    type = zp;
	BSS:		load = RAM,		    type = bss,	define = yes;
	CODE:		load = ROMST,		type = ro,	define = yes;
	CHARS:		load = ROMCHR,		type = ro;
}

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

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

