# Configuration for ProDOS 8 system programs (allowing for 3KB in LC) SYMBOLS { __EXEHDR__: type = import; __FILETYPE__: type = weak, value = $00FF; # ProDOS file type __STACKSIZE__: type = weak, value = $0800; # 2k stack __LCADDR__: type = weak, value = $D400; # Behind quit code __LCSIZE__: type = weak, value = $0C00; # Rest of bank two __PRODOS_NUMFILES__: value = 4, type = weak; # max. # files open at a time } MEMORY { ZP: file = "", define = yes, start = $0080, size = $0080; #ProDOS's file buffers, large enough for four files. PDIO: start = $1000, size = $1000, define = yes; HEADER: file = %O, start = $2000 - $003A, size = $003A; MAIN: file = %O, define = yes, start = $2000, size = $BF00 - $2000; BSS: file = "", start = __ONCE_RUN__, size = $BF00 - __STACKSIZE__ - __ONCE_RUN__; LC: file = "", define = yes, start = __LCADDR__, size = __LCSIZE__; #Keyboard buffer and BASIC's ML buffer. Probably not used by most cc65 programs. KEYBUF: file = "keyb", start = $0200, size = $0200, define = yes; #Unused memory between the screen buffer and the beginning of the #file buffers. LOWBUF: file = "lowmem", start = $0800, size = $0800, define = yes; AUXMEM: file = "auxro", define = yes, start = $0800, size = $B800; } SEGMENTS { ZEROPAGE: load = ZP, type = zp; EXEHDR: load = HEADER, type = ro, optional = yes; STARTUP: load = MAIN, type = ro; LOWCODE: load = MAIN, type = ro, optional = yes; CODE: load = MAIN, type = ro; RODATA: load = MAIN, type = ro; DATA: load = MAIN, type = rw; INIT: load = MAIN, type = rw; ONCE: load = MAIN, type = ro, define = yes; LC: load = MAIN, run = LC, type = ro, optional = yes; BSS: load = BSS, type = bss, define = yes; KEYBRO: load = KEYBUF, type = ro, define = yes, optional = yes; KEYBRW: load = KEYBUF, type = rw, define = yes, optional = yes; KEYBBSS: load = KEYBUF, type = bss, define = yes, optional = yes; LOWCO: load = LOWBUF, type = ro, define = yes, optional = yes; LOWRO: load = LOWBUF, type = ro, define = yes, optional = yes; LOWRW: load = LOWBUF, type = rw, define = yes, optional = yes; LOWBSS: load = LOWBUF, type = bss, define = yes, optional = yes; AUXRO: load = AUXMEM, type = ro, define = yes, optional = yes; AUXRW: load = AUXMEM, type = rw, define = yes, optional = yes; AUXBSS: load = AUXMEM, type = bss, define = yes, optional = yes; } FEATURES { CONDES: type = constructor, label = __CONSTRUCTOR_TABLE__, count = __CONSTRUCTOR_COUNT__, segment = ONCE; CONDES: type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__, segment = RODATA; CONDES: type = interruptor, label = __INTERRUPTOR_TABLE__, count = __INTERRUPTOR_COUNT__, segment = RODATA, import = __CALLIRQ__; }