60
Section 2: Compiler
TI
-
89 / TI
-
92 Plus Sierra C Assembler Reference Manual
Not for Distribution
Beta Version February 2, 2001
Character
char a = 0x12;
msb (sign)
7
lsb
0
1 2
0
address
Integer or Short Integer
short int b = 0x1234;
msb (sign)
15
lsb
0
1 2
3 4
0
low address
+1
high address
Long Integer
long int c = 0x12345678;
msb (sign)
31
lsb
0
1 2
3 4
5 6
7 8
0
low address
+1
+2
+3
high address
Figure 2.1: Internal Integer Representations
2.9.3. Floating-Point
Types
The Sierra C compiler has been modified by Texas Instruments to support the
TI BCD floating-point format, removing all other previously supported
floating-point formats and coprocessors, except for an IEEE format which is used
in special cases and exists only in the compiler, not on the TI-89 / TI-92 Plus.
(See section 2.12.2 Internal Floating-Point Functions for more information on
the IEEE format.)
There are two forms of the TI BCD floating-point values, differing only in the
number of significant digits retained in the mantissa. Both have a size of ten
bytes, with double keeping 16 BCD digits in the mantissa, while float rounds the
accuracy to 14 digits. There is not a separate representation for long double,
which is interpreted as double when encountered. The floating-point values
available to the users of the TI-89 and TI-92 Plus calculators have 14 digit
mantissas. It is highly recommended to always use the double format when
coding the applications to take advantage of the increased accuracy provided by
the extra two digits. See chapter 16. Working with Numbers in the
TI-89 / TI-92 Plus Developers Guide for information on how and when to round to
the 14 digits required by the calculator user floating-point representation. The
float format will not usually be used in TI-89 / TI-92 Plus applications. In the