Hi,
I am using code warrior for S12XEP100 target.
I am having problem with pointers to unsigned long location, when I enable Banked Memory model.
Eg:
unsigned long * src, *dest;
Function_Copy (length)
{
src=(unsigned long *) 0x100000;
do
{
*dest = *src;
counter++;
} while( counter < length)
}
The SW works fine, in Large Memory Model. But once I switch to Banked Memory Model it doesn't.
Can anyone help me with this problem?
Solved! Go to Solution.
Even though the S12 is a 16 bit MCU, the large model probably allows pointers larger than 16 bits, while the banked model doesn't. You have to use non-standard far pointers for addresses larger than 16 bits, or alternatively write inline assembler to handle the page registers.
Even though the S12 is a 16 bit MCU, the large model probably allows pointers larger than 16 bits, while the banked model doesn't. You have to use non-standard far pointers for addresses larger than 16 bits, or alternatively write inline assembler to handle the page registers.