In addition to the ANSI storage classes SDCC allows the following MCS51 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,
e.g.:
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, e.g.:
data int iramdata;
Variables declared with this storage class will be allocated into
the indirectly addressable portion of the internal ram of a 8051,
e.g.:
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, e.g.:
bit iFlag;
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, eg:
sfr at 0x80 P0; /* special function register P0 at location
0x80 */
sbit at 0xd7 CY; /* CY (Carry Flag) */