Atmel CAVR-4 Manual De Usuario

Descargar
Página de 323
CAVR-4
Part 2. Compiler reference
Data representation
141
The value of a denormalized number is:
(-1)
S
 * 2
(1-BIAS)
 * 0.Mantissa
where 
BIAS
 is 127 and 1023 for 32-bit and 64-bit floating-point values, respectively.
Note: The IAR CLIB Library does not fully support the special cases of floating-point 
numbers, such as infinity, 
NaN
, and subnormal numbers.
Pointer types
The AVR IAR C/C++ Compiler has two basic types of pointers: function pointers and 
data pointers. 
FUNCTION POINTERS
The size of function pointers is always 16 or 24 bits, and they can address the entire 
memory. The internal representation of a code pointer is the actual address it refers to 
divided by two.
The following function pointers are available:
DATA POINTERS
Data pointers have three sizes: 8, 16, or 24 bits. The following data pointers are 
available:
Keyword 
Address range
Pointer size
Index type
Description
_ _nearfunc 0–0x1FFFE
2 bytes
signed int
Can be called from any part of the 
code memory, but must reside in 
the first 128 Kbytes of that space.
_ _farfunc
0–0x7FFFFE
3 bytes
signed long No restrictions on code placement.
Table 33: Function pointers
Keyword
Pointer size Memory space Index type
Range
_ _tiny
1 byte
Data
signed char 0x0–0xFF
_ _near 
2 bytes
Data
signed int
0x0–0xFFFF
_ _far
3 bytes
Data
signed int
0x0–0xFFFFFF
 
(16-bit arithmetics)
_ _huge 
3 bytes
Data
signed long 0x0–0xFFFFFF
_ _tinyflash
1 byte
Code
signed char 0x0–0xFF
_ _flash
2 bytes
Code
signed int
0x0–0xFFFF
Table 34: Data pointers