Keil™, An ARM® Company

C166 User's Guide

Data Storage Formats

The C166 Compiler offers a number of data types you may use in your C programs. The following table lists these types along with size requirements and value ranges.

Data TypeBitsBytesValue Range
bit1-0 to 1
signed char81-128 to + 127
unsigned char810 to 255
enum162-32768 to +32767
signed int162-32768 to +32767
unsigned int1620 to 65535
signed short162-32768 to +32767
unsigned short1620 to 65535
signed long324-2147483648 to 2147483647
unsigned long3240 to 4294967295
float324±1.175494E-38 to ± 3.402823E+38
double648±1.7E-308 to ±1.7E+308
near pointer16216-bit near address
far pointer32432-bit far address
huge pointer32432-bit huge address
xhuge pointer32432-bit xhuge address

Other data types, such as structures and unions, may contain scalars from this table. Furthermore, because of the 16-bit architecture of the C16x/ST10 family, each variable (except signed/unsigned char) must be word-aligned. For example, in structures, a one-byte gap is necessary between a char and an int member.