3.13 __near Keyword
The IAR __near
keyword places qualified objects in near memory (0-64 KB).
Pointers qualified with this keyword are 16-bits wide and can point to any address in
this range.
Suggested Replacement
The keyword can be removed.
When using MPLAB XC8, data memory pointers are always 16-bits wide, and only 0-64 KB of data memory can be addressed.
Examples
Consider migrating IAR code such
as:
__near int mode;
volatile int x;
int main(void) {
x = mode;
}
to
MPLAB XC8 code similar
to:int mode;
volatile int x;
int main(void) {
x = mode;
}