Re: [cc65] Platform specific docs

Date view Thread view Subject view

From: Shawn Jefferson (shawnjefferson_at_24fightingchickens.com)
Date: 2003-10-07 22:34:17


Hi,

Ok, I've started typing up a little documentation for the Atari
platform, using the c64.sgml as a template.  Here's the text I've
added so far (for comments, especially from those responsible for the
Atari library):

Binary format:

The standard binary output format generated by the linker for the
atari target is a machine language program with a standard executable
header (FF FF <start address> <length in bytes>). These values are
calculated in the crt0.s file from the __CODE_LOAD__ and __BSS_LOAD__
values, so keep this in mind if you create a custom linker config file
and start moving segments around.  You can override this behaviour by
creating your own crt0.s file and linking it into your program.  A run
vector is added to the end of the file (02E0 <run vector>) and is
calculated using __CODE_LOAD__ in crt0.s also.

Memory layout:

cc65 generated programs with the default setup run with the assumption
that BASIC ROM is disabled, which gives a usable memory range of $2E00
- $BC1F. $2E00 was chosen as the load address to accommodate having a
DOS loaded and a driver that resides in low memory such as the 850 R:
handler.  You can override this behaviour by creating a custom linker
config file.

Special locations:

Stack:
  The C runtime stack is located at MEMTOP and grows downwards,
regardless of how your linker config file is setup.  This accomodates
the different memory configurations of the atari machines, as well as
having a cartridge installed.  You can override this behaviour by
writing your own crt0.s file and linking it to your program.

Heap:
  The C heap is located at the end of the program and grows towards
the C runtime stack.  The location of the C heap is placed at the end
of the BSS segment.  To override this behaviour you would have to
write a custom _heap.s (in libsrc/common/) and link it to your
program.

That's all I have right now.  I'm wondering if I should talk about how
to create a binary file with multiple load segments with cc65 in the
binary format section?

Additions/Comments/Death threats?

--
Shawn Jefferson
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2003-10-07 22:39:42 CEST