Banked and non banked memory
In the 68HC12A4, for example, there are two areas are available for data banking, the first from 0x7000 to 0x7fff (4KB) using the DPAGE register, and 0x0000 to 0x03ff or 0x0400 to 0x07ff (1K) using the EPAGE register.  Apparently the two EPAGE areas overlap (bit 10 of the address is a don't care).

With the Cosmic C Cross Compiler for the HC12/HCS12, a variable in the DPAGE area can be specified using the @far modifier on the declaration.  A variable in the EPAGE area can be specified using @epage and @far.  For example,

@far int i;          // DPAGE area
@epage @far int j;   // EPAGE area


I don't think the compiler automatically starts using banked RAM after filling up non-banked RAM, you must use these keywords.

A variable can be located in the code bank using @far with the const keyword:

@far const int k;        // PPAGE area


Such a variable can only be accessed in a function located in a non-banked area.

Similarly, functions are located in a banked area using the @far keyword.

@far int func(void)
{
...
}


The syntax for other compilers (such as CodeWarrior) may vary, but they would have to use a similar mechanism.  Check your compiler manual.