Next Previous Contents

## 3. Memory layout

cc65 generated programs with the default setup run with the kernal and basic banked in. This gives a usable memory range of $1000 - $4000 (or $8000 if the machine is equipped with 32K RAM or more). Having the kernal and basic ROMs banked in means, that ROM entry points may be called directly from user code.

Special locations:

Text screen

  The text screen is located at $C00 (as in the standard setup).

Color RAM

  The color RAM is located at $800 (standard location).

Stack

  The C runtime stack is located at $3FFF ($7FFF in case of a machine with 32K of memory or more) and growing downwards.

Heap

  The C heap is located at the end of the program and grows towards the C runtime stack.

Next Previous Contents