3.26 __tiny Keyword

The IAR __tiny keyword places and accesses objects in tiny data memory, which has an addressable range 0x0-FF. Pointers qualified with this keyword are 8 bits wide and can point to any address in this range.

Suggested Replacement

Remove the keyword, but note the different operation of such code.

MPLAB XC8 does not provide support for 8-bit data pointers. Without the __tiny keyword, MPLAB XC8 will use 16-bit pointers and addresses to access objects.

Caveats

Programs will execute correctly with this keyword removed, unless the program makes explicit assumptions that addresses are 8-bits wide.

Examples

Consider migrating IAR code such as:
__tiny 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;
}