10.8. Including other segments

You can include the memory blocks from other segments into the a segment by using the 'segments' parameter when defining the segment:

        .segmentdef Upstart [start=$0801]
        .segmentdef Code    [start=$1000]
        .segmentdef Data    [start=$3000]  
        .segmentdef Combi1  [segments="Code, Data"]
        .segmentdef Combi2  [segments="Code, Data, Upstart"]

A segment can be included in multiple other segment as seen by the 'Code' and 'Data' segment in the above example.

This can be combined freely with adding code from other sources or directly using commands (lda, sta) inside the segment.