Keil Logo

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 Type Bits Bytes Value Range
bit 1 - 0 to 1
signed char 8 1 -128 to + 127
unsigned char 8 1 0 to 255
enum 16 2 -32768 to +32767
signed int 16 2 -32768 to +32767
unsigned int 16 2 0 to 65535
signed short 16 2 -32768 to +32767
unsigned short 16 2 0 to 65535
signed long 32 4 -2147483648 to 2147483647
unsigned long 32 4 0 to 4294967295
float 32 4 ±1.175494E-38 to ± 3.402823E+38
double 64 8 ±1.7E-308 to ±1.7E+308
near pointer 16 2 16-bit near address
far pointer 32 4 32-bit far address
huge pointer 32 4 32-bit huge address
xhuge pointer 32 4 32-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.

  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.