[cc65] non-contiguous code

From: Egan Ford <egan1sense.net>
Date: 2012-05-12 17:46:27
Hello all,

I am trying to recompile code that I originally wrote for a 12k or 20k
Apple-1.  Apple-1s were most commonly 8k with the first 4k assigned to
$0 and the second assigned to $E000.  The later was used to load BASIC
from tape.  As RAM prices dropped it was possible to replace the lower
RAM with 8k or 16k.  Most emulators and replicas support more than 4k
at $0.  However I would still like to get my code to run on the 4+4
configuration.

My code segment is 4k + ~600 bytes.  Here is my config file:

MEMORY {
ZP:     start = $0020, size = $00C0, define = yes;
HEADER: start = $0000, size = $0004, file = %O;
RAM1:    start = $0280, size = $0D80, file = %O;
RAM2:    start = $E000, size = $1000, file = %O;
}
SEGMENTS {
EXEHDR:   load = HEADER, type = ro;
STARTUP:  load = RAM1,    type = ro, define = yes;
LOWCODE:  load = RAM1,    type = ro,               optional = yes;
INIT:     load = RAM1,    type = ro, define = yes, optional = yes;
CODE:     load = RAM2,    type = ro;
RODATA:   load = RAM1,    type = ro;
DATA:     load = RAM1,    type = rw;
BSS:      load = RAM1,    type = bss, define = yes;
HEAP:     load = RAM1,    type = bss, optional = yes;
ZEROPAGE: load = ZP,     type = zp;
}
FEATURES {
CONDES: segment = INIT,
type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__;
CONDES: segment = RODATA,
type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__;
CONDES: type = interruptor,
segment = RODATA,
label = __INTERRUPTOR_TABLE__,
count = __INTERRUPTOR_COUNT__;
}
SYMBOLS {
__STACKSIZE__ = $800;
}

Clearly my code is not going to fit into RAM2.

Suggestions?

Thanks.

BTW, I am still using 2.13.2, I have not had time to check the Apple1
patches with the latest release.  Thanks again.
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sat May 12 17:47:24 2012

This archive was generated by hypermail 2.1.8 : 2012-05-12 17:47:28 CEST