Overlaying Segments

If the overlay process is executed during program linking and locating, it is important that each assembler subroutine have a unique program segment. This is necessary so that during the overlay process, the references between the functions are calculated using the references of the individual segments. The data areas of the assembler subprograms may be included in the overlay analysis when the following points are observed:

All segment names must be created using the C51 segment naming conventions.

Each assembler function with local variables must be assigned its own data segment. This data segment may be accessed only by other functions only for passing parameters. Parameters must be passed in order.