@tiny and @far Qualifier for Variables

Some compiler vendors provide special keywords to place variables in absolute locations. Such absolute locations can be expressed in ANSI-C as constant pointers:

  #ifdef __HIWARE__

  
    #define REG_PTB (*(volatile char*)(0x01))

  
  #else /* other compiler vendors use non-ANSI features */

  
    @tiny volatile  char REG_PTB    @0x01; /* port B */

  
  #endif

  

The Compiler does not need the @tiny qualifier directly. The Compiler is smart enough to take the right addressing mode depending on the address:

  /* compiler uses the correct addressing mode */

  
  volatile char REG_PTB @0x01;