| |||||
Technical Support On-Line Manuals Cx51 User's Guide | Data PointersThe Infineon C515C, C517, C517A, and C509 provide 8 data pointers which may be used to speed-up memory access. Using multiple data pointers can improve the execution of library functions such as: memcpy, memmove, memcmp, strcpy, and strcmp. The 8 data pointers of the C515C, C517, C517A and C509 may also reduce the stack load of interrupt functions. The Cx51 Compiler uses only 2 of the 8 data pointers at a time. In order to keep the stack load in the interrupt routines low, the Cx51 Compiler switches to 2 unused data pointers when switching the register bank. The contents of the register DPSEL are saved on the stack and a new pair of data pointers is selected. Saving the data pointers on the stack is no longer required. If an interrupt routine does not switch to another register bank (for example, the function is declared without the using attribute), the data pointers must be saved on the stack (using 4 bytes of stack space). To keep the size of the stack as small as possible, use the MOD517(NODP8) directive to compile the interrupt routine and the functions it calls. This generates code for the interrupt using only one data pointer and only 2 bytes of stack space. | ||||
| |||||