[cc65] Atari: Loading code with DOS 2.0 help?

From: Martin, Chris <cmartin1ti.com>
Date: 2004-07-29 18:43:46
Hi all, 

I have a piece of code that I have written and compiled with cc65 and am
having trouble getting it to load from DOS 2.0. It loads fine from
SpartaDOS 3.2, but I receive an ERROR 136 from DOS 2.0. The code is
supposed to load to 0x3400-0x3c30 and to 0x6000-0xa3d0. 



It looks like DOS 2.0 has some code loaded all the way up to 0x33xx, so
I modified my code to load past this.  I also adjusted the HEADER
location to no avail.

 

My linker command file looks like:

 

MEMORY {

    ZP: start = $82, size = $7E, type = rw, define = yes;

    #HEADER: start = $0000, size = $6, file = %O;

    HEADER: start = $33f0, size = $6, file = %O;

    RAM: start = $6000, size = $5c1f, file = %O;    # $8E1F: matches
upper bound $BC1F

    BANK: start = $4000, size = $4000, type = ro;

    #SECHDR: start = $0006, size = $4, file = %O;

    SECHDR: start = $33f6, size = $4, file = %O;

    #RAM28: start = $2800, size = $1800,  file = %O;    # $1800: matches
upper bound $3FFF

    RAM28: start = $3400, size = $1800,  file = %O;    # $1800: matches
upper bound $3FFF

 

}

SEGMENTS {

    EXEHDR: load = HEADER, type = wprot;

    CODE: load = RAM, type = wprot, define = yes;

    BSS: load = RAM, type = bss, define = yes;

    CHKHDR: load = SECHDR, type = wprot;

    CODE2: load = RAM28, type = wprot, define = yes;

    #DATA: load = RAM28, type = rw, align = $200;

    DATA: load = RAM28, type = rw;

    RODATA: load = RAM28, type = wprot;

    ZEROPAGE: load = ZP, type = zp;

    AUTOSTRT: load = RAM, type = wprot, define = yes;

}

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__ = $100; # 512B stack (was 2K stack)

}

 

 


Any ideas? 

Thanks, 
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 Jul 29 18:43:55 2004

This archive was generated by hypermail 2.1.8 : 2004-07-29 18:44:03 CEST