Re: [cc65] ca65 for stand-alone asm projects

From: Daniel Pralle <>
Date: 2010-11-09 07:52:12
On 11/08/2010 08:47 PM, Shawn Jefferson wrote:
> ----- Original Message -----
> From: Agent Friday <>
> Date: Sunday, November 7, 2010 11:02 pm
>  > I looked up the Atari file format. It is, BTW, rather advanced
>  > compared to the C64...). For those not familiar, they can
>  > containan arbitrary number of segments, each specifying its own load
>  > address. It's can also run an Initialization routine after each
>  > section is loaded, whould would be cool for decompression. See
>  >
> None of those features are used with the default cc65 linker config for
> the Atari either, just one load segment with no init address. But, yes,
> the Atari is awesome. :)
> Cartridges also have both an Init address and a Run Address that can be
> used, just like executables.

Talking about the default Atari linker config...
Beeing an Atari guy myself, however, mostly concenrd with using the suit 
for asm projects, what about using the INIT feature for the startup 
code? This code would be execute only once (clearing BSS and what not). 
So we put it into a segment in the RAM area, after that an init to its 
start and then put the rest of the code into another RAM area and put it 
after the init part. Maybe like this ("pseudo config"):

   HEAD_I:	start=0		len=6	 # 255,255,$00,$20,$xx,$20+XX
   RAM_I:	start=$2000	len=XXxx
   INIT1:	start=0		len=6	 # $e2,$02,$e3,$02,$00,$20
   HEAD:		start=0		len=4	 # $00,$20, yy,$20+YY
   RAM:		start=$2000	len=YYyy

	CODE:	 load=RAM

Is it even ossible to use teh same start address fro different RAM 
areas? SEcond, I guess the startup-code calls "main" at the end. This 
has to be removed and the call to main has to be done via teh AUTOSTART 
part of teh COM-file. However, as teh SSTARTUP code is taregt specific 
anyway it could be changed for this idea.

Did I overlook something? Hmmmm.. does teh STARTUP code use the 
C-Runtime? This could be tricky then :(
To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Nov 9 07:52:17 2010

This archive was generated by hypermail 2.1.8 : 2010-11-09 07:52:19 CET