10.3.4.1 Output Section .reset

On dsPIC33C/E/F architectures, section .reset contains a GOTO instruction, created at link time, from output section data commands:

/*
** Reset Instruction
*/
.reset __RESET_BASE :
{
       SHORT(ABSOLUTE(__reset));
       SHORT(0x04);
       SHORT((ABSOLUTE(__reset) >> 16) & 0x7F);
       SHORT(0);
} >reset

Each SHORT() data command causes a 2 byte value to be included. There are two expressions which include the symbol __reset, which by convention is the first function invoked after a device reset. Each expression calculates a portion of the address of the Reset function. These declarations encode a GOTO instruction, which is two instruction words long.

The ABSOLUTE() function specifies the final value of a program symbol after linking. If this function were omitted, a relative (before-linking) value of the program symbol would be used.

The >reset portion of this definition indicates that this section should be allocated in the Reset memory region.

On dsPIC33A architectures, section .reset contains a vector (address) that points to the location of symbol __reset, which by convention is the first function invoked after a device reset.

 /*
  ** Reset Vector
  */
  .reset :
  {
    LONG(ABSOLUTE(__reset));
  } >reset

The LONG() data command causes a 4 byte value to be included.

The ABSOLUTE() function specifies the final value of a program symbol after linking. If this function were omitted, a relative (before-linking) value of the program symbol would be used.

The >reset portion of this definition indicates that this section should be allocated in the Reset memory region.