5.6 __extended_load_program_memory Intrinsic Function
The IAR __extended_load_program_memory
intrinsic function returns one byte from
program memory.
Suggested Replacement
There is no equivalent MPLAB XC8 built-in function, but standard C code using an MPLAB XC8 qualifier can perform a similar task.
Cast the address to a const __memx unsigned char *
type and
dereference it in the usual way.
Caveats
None
Examples
Consider migrating IAR code such
as:
volatile char x;
void foo(void) {
x = __extended_load_program_memory(0x10000);
}
to
MPLAB XC8 code similar
to:#include <xc.h>
volatile char x;
void foo(void) {
x = *((const __memx char *)0x10000);
}
Further Information
See the Special Type Qualifiers section in the MPLAB XC8 C Compiler User's Guide for AVR MCUs for more information on this qualifier.