Hello, I have a quick question about using the linker config file. Please let me know if you have some ideas.... Here is what I have: I have some code that uses the Atari 130XE bank switching to do some things. In my link.cfg file, I have basically defined all code to be placed between the 0x8000 and 0xbc1f address space. However, my code has grown to a point where it will no longer fit in this space. The Atari 130XE allows you to bank switch the address space from 0x4000-0x7fff, so initially I do not want to put any code here. I would like to place code in the address spaces: 0x2800-0x3fff and 0x8000-0xbc1f. I am not sure exactly how to break this up. Here is my link.cfg file (more comments below): MEMORY { ZP: start = $82, size = $7E, type = rw, define = yes; HEADER: start = $0000, size = $6, file = %O; RAM28: start = $2800, size = $1800, file = %O; RAM: start = $8000, size = $3c1f, file = %O;# $8E1F: matches up bound $BC1F } SEGMENTS { EXEHDR: load = HEADER, type = wprot; CODE: load = RAM, type = wprot, define = yes; RODATA: load = RAM, type = wprot; DATA: load = RAM, type = rw; BSS: load = RAM, type = bss, define = yes; ZEROPAGE: load = ZP, type = zp; AUTOSTRT: load = RAM, type = wprot; } 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__ = $200; # 512B stack (was 2K stack) } --------------------------------------------------- I have tried changing the DATA line to: DATA: load = RAM28, type = rw; This compiles, but when I load the code, the computer crashes. Does anyone know why this would be? Also, a related question: Is there a way to specify which structures are placed into which address space? For example, say I want to use the 0x4000-0x7fff address space for code. I would then want to place a piece of code to handle the bank switching outside of this address space. But, how do I place one function at a certain location? Thanks for the help, and sorry for the long post. Cheers, --Chris ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo@musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.Received on Thu Mar 4 01:39:18 2004
This archive was generated by hypermail 2.1.8 : 2004-03-04 01:39:24 CET