In addition to the ANSI storage classes SDCC allows the following 8051 specific storage classes.
Variables declared with this storage class will be placed in the extern RAM. This is the default storage class for Large Memory model .
eg. xdata unsigned char xduc;
This is the default storage class for Small Memory model. Variables declared with this storage class will be allocated in the internal RAM.
eg. data int iramdata;
Variables declared with this storage class will be allocated into the indirectly addressable portion of the internal ram of a 8051 .
eg.idata int idi;
This is a data-type and a storage class specifier. When a variable is declared as a bit , it is allocated into the bit addressable memory of 8051.
Like the bit keyword, sfr / sbit signifies both a data-type and storage class, they are used to describe the special function registers and special bit variables of a 8051.
sfr at 0x80 P0; /* special function register P0 at location 0x80 */
sbit at 0xd7 CY; /* CY (Carry Flag) */