1) Add to compiler command line, or make sure that -D__FAR_DATA is present in compiler command line
2.a) In case you are too lazy to edit prm file, and don't plan to use more than 4k (the size of RPAGE window) of paged RAM
#pragma DATA_SEG __RPAGE_SEG PAGED_RAM
char p1,p2;
char arr[100];
#pragma DATA_SEG DEFAULT
That's all. Just access variables, defined between DATA_SEG pragmas. In case you need to export variables, extern declarations for your varriables also should placed between identical DATA_SEG pragmas in header file.
2.b) In case you are too lazy to edit prm file, but want to use more than 4k of paged RAM. Do the same like in 2.a), but additionally add -PSegObj switch to compiler command line. This is important, because without -PSegObj, compiler assumes that all objects from the same placement are on the same page, which won't be always true for default prm file with PAGED_RAM placement consisting of several RAM page segments. -PSegObj forces compiler to set up RPAGE before each paged variable access.
2.c) You are familiar with prm, want safe compiler optimizations of redundant page switchings, don't like -PSegObj.
So you edit PRM file and add your own placements, each using only one RAM page. Like this
PAGED_RAM_FB INTO RAM_FB;
PAGED_RAM_FC INTO RAM_FC;
PAGED_RAM_FD INTO RAM_FD;
You stop using PAGED_RAM placement and place your paged vars into PAGED_RAM_FB. When there's no room in PAGED_RAM_FB (linker will tell you with error), you start filling PAGED_RAM_FC and so on
#pragma DATA_SEG __RPAGE_SEG PAGED_RAM_FB
char arr1[4096];
#pragma DATA_SEG DEFAULT
#pragma DATA_SEG __RPAGE_SEG PAGED_RAM_FC
char arr2[4096];
#pragma DATA_SEG DEFAULT
3) Try to not use paged variables in interrupts and routines, called from interrupt handlers. But if you need to, then you need to save/restore RPAGE on entry/exit from interrupt. Alternatively you may make compiler saving/restoring RPAGE for you, but compiler will do this for each interrupt handler you have. Option to save restore RPAGE in interrupts is this -CpRPAGE=0x16