C251 User's Guide

Data Storage Formats

This section describes the storage formats of the data types available in the C251 compiler. The C251 compiler offers a number of basic data types to use in your C programs. The following table lists these data types along with their size requirements and value ranges.

Data TypeBitsBytesValue Range
bit10 to 1
signed char81-128 to +127
unsigned char810 to 255
enum162-32768 to +32767
signed short162-32768 to +32767
unsigned short1620 to 65535
signed int162-32768 to +32767
unsigned int1620 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
data *, idata *, pdata *810x00 to 0xFF
code*, xdata *, near*1620x0000 to 0xFFFF
far*, huge*324linear 16Mbyte address 0x000000 to 0xFFFFFF

Other data types, like structures and unions, may contain scalars from this table. All elements of these data types are allocated sequentially and are byte-aligned due to the 8-bit architecture of the 251 family.