Next Previous Contents

6. Special segments

The builtin config files do contain segments that have a special meaning for the compiler and the libraries that come with it. If you replace the builtin config files, you will need the following information.

6.1 INIT

The INIT segment is used for initialization code that may be reused once execution reaches main() - provided that the program runs in RAM. You may for example add the INIT segment to the heap in really memory constrained systems.

6.2 LOWCODE

For the LOWCODE segment, it is guaranteed that it won't be banked out, so it is reachable at any time by interrupt handlers or similar.

6.3 STARTUP

This segment contains the startup code which initializes the C software stack and the libraries. It is placed in its own segment because it needs to be loaded at the lowest possible program address on several platforms.

6.4 ZPSAVE

The ZPSAVE segment contains the original values of the zeropage locations used by the ZEROPAGE segment. It is placed in its own segment because it must not be initialized.


Next Previous Contents