Next Previous Contents

4. Memory layout

cc65 generated programs with the default setup run with the I/O area and the kernal enabled, which gives a usable memory range of $200 - $C037.

Special locations:

  0000 - 00FF Zero page
  0100 - 01FF Machine stack

  A058 - C037 Collision buffer
  C038 - E017 Screen buffer 1
  E018 - FFF7 Screen buffer 0
  FFF8 - FFFF Hardware vectors

Text screen

No conio support is currently available for the Lynx.


The Lynx "flabode" keys, Opt 1, Pause and Opt 2 are implemented using the conio interface. The only characters the keyboard is able to produce are 'R' for Restart (Opt 1 + Pause), 'F' for flip (Opt 2 + Pause), 'P' for pause, '1' for Opt 1, '2' for Opt 2, '3' for Opt 1 + Opt 2 and '?' for all keys down at the same time.


The C runtime stack is located at $C037 (or $A057 if collision detection is enabled) and growing downwards.


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


The collision detection screen is at $A058 if it is enabled. The double buffered screens are at $C038 and $E018.

Next Previous Contents