OVERLAP and NOOVERLAP

Set up overlapping section.

Introduced in AVRASM 2.1. These directives are for projects with special needs and should normally not be used.

These directives only affect the currently active segment (CSEG, DSEG, and ESEG).

The .overlap/nooverlap directives mark a section that will be allowed to overlap code/data with code/data defined elsewhere, without any error or warning messages being generated. This is totally independent of what is set using the #pragma, General Purpose directives. The overlap-allowed attribute will stay in effect across .org directives, but will not follow across .cseg/.eseg/.dseg directives (each segment marked separately).

The typical use of this is to set up some form of default code or data that may or may not later be modified by overlapping code or data, without having to disable assembler overlap detection altogether.

Syntax
.OVERLAP
.NOOVERLAP
Example
.overlap 
.org 0 ; section #1 
rjmp default 
.nooverlap 
.org 0 ; section #2 
rjmp RESET ; No error given here 
.org 0 ; section #3 
rjmp RESET ; Error here because overlap with #2