Example: Defining one RAM and one ROM area.

When all constant and code sections as well as data sections can be allocated consecutively, the PRM file used to assemble the example above can be defined as the following listing displays.

Listing: PRM file for defining one RAM area and one ROM area
LINK  test.abs/* Name of the executable file generated.     */
NAMES test.o  /* Name of the object file in the application */

END

SECTIONS

/* READ_ONLY memory area.             */

  MY_ROM  = READ_ONLY  0x8000 TO 0xFDFF;

/* READ_WRITE memory area. */

  MY_RAM  = READ_WRITE 0x0100 TO 0x023F;

END

PLACEMENT

/* Relocatable variable sections are allocated in MY_RAM.          */

  DEFAULT_RAM, dataSec  , SSTACK INTO MY_RAM;

/* Relocatable code and constant sections are allocated in MY_ROM. */

  DEFAULT_ROM, constSec          INTO MY_ROM; 
END

INIT     entry /* entry is the entry point to the application. */

VECTOR ADDRESS 0xFFFE entry /* Initialization for Reset vector.*/

The linker PRM file contains at least:

According to the PRM file listed above: