C38 - Special Page Access

C38

The MELPS740 family of microcontrollers is based on the 6502 instruction set. The basic instruction set has been extended and enhanced. One interesting enhancement is the ability to reserve the last page of memory as a special page to hold commonly used subroutines or subroutines that require quick access.

The C38 compiler supports this hardware feature with the special modifier SP_PAGE. This modifier tells the compiler to locate a subroutine in the last page of memory and routines that call these functions will use short calling sequences for the function call.

char c1,c2,c3;

void SP_PAGE test(void);

void main(void)
{
     c1=4;
     c2=2;
     test();
     if ((c1=c1-c2)>=3) NOP();
     if ((c1-c2)>=0) NOP();
}

void SP_PAGE test1(void)
{
     NOP();
     NOP();
}

void SP_PAGE test(void)
{
     NOP();
     NOP();
}