How to prevent MPLABX and XC16 from polluting my assembly program on 16-bit PIC24?
Those routines form part of the crt0, the system initialization routines.  They are standard routines.  Briefly they:


Erase the empty memory to a default of 0 throughout
Copy the pre-defined data from Flash into RAM


Without those routines the basic C system won't function.  They are required for any program written in C.

I know your program isn't written in C, but the whole environment is C. You're using a C compiler, for instance.

Because of that you get the C routines.

You can try adding the linker option -nostartfiles to prevent the inclusion of the crt0.  You can also use -nostdlib and -nodefaultlibs to prevent inclusion of standard library functions.

Note that this will completely break compilation of any C files.

Alternatively, you can keep the start files in there and instead of executing your program starting at the reset vector, define a "main" function in assembly which the crt0 will call for you after the system initialization has taken place.

By the way - XC16 is based on GCC 4.5.1.