Example

A simple example illustrates placing code in the extended memory.

Listing: Placing Code in the Extended Memory

Place function f() in a far segment P5.
#pragma CODE_SEG __FAR_SEG P5
void f()
{
  ...
}

In PRM file, place segment P5 at the correct address.

//PRM file
SEGMENTS
...
PPAGE_5    =  READ_ONLY    0x058000 TO 0x05BFFF;
...
END
PLACEMENT
...
P2     INTO    PPAGE_5;
...
END