Defining a Function in a Specific Segment

In order to define a function in a specific segment, use the CODE_SEG pragma.

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.*/