Defining a Function in a Specific Segment

To define a function in a specific segment, use the CODE_SEG pragma, as shown in the following listing.

Listing: Defining a Function in a Specific Segment


/* This function is defined in segment `int_Function'*/
#pragma CODE_SEG Int_Function

#pragma TRAP_PROC

void INCcount(void) {

  tcount++;

}

#pragma CODE_SEG DEFAULT /* Back to default code segment.*/