- FAE/Client Login
- product registration
- > Download <
- Our products
- Support
- FAQs
- technical support
- Installation
- Application Notes
- Device List
- Hints and Tips
- C38 - Special Page Access
- C6805 - Filling Unused ROM
- C6805 - Setting Multiple MORs
- C6805 - Working with MMEVS05/MMDS05
- C6808 and Emulators
- COP8C - Executing Initialization Code
- COP8C - S Register Support
- Debugging: Using Macros to Monitor Program Flow
- Declaring SPECIAL Memory
- eTPU - Function Set Support
- LCD Interface
- LOCAL Memory
- Low Cost, Low Speed A/D conversion for Embedded Systems
- MPC - Branch Islands on the PIC16C5x
- MPC - Constant ROM Arrays
- MPC - Named Address Space
- MPC - Setting Configuration Fuses
- Non-linear Data Transformations
- Using the CodeWright(TM) Editor
- Product-specific Notes
- Resources
- CODSupport
- Fixed Point
- Fuzzy Logic
- Publishing
- What's New
- About Us
- more information
C38 - Special Page Access
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();
}

eTPU_C:
C6808: