Download User Manual - v8.8 C166/ST10 C Compiler

Transcript
Language Implementation
3.1 INTRODUCTION
The TASKING C C166/ST10 cross−compiler offers a new approach to
high−level language programming for the C166/ST10 family. It conforms to
the ANSI standard, but allows the user to control the I/O registers, bit
memory, interrupts and data page architecture of the C166/ST10 in C. This
chapter describes the language implementation in relation to the
C166/ST10 architecture.
The extensions to the C language in c166 are:
_bit
You can use data type _bit for the type definition of scalars and for the
return type of functions.
_bitword
You can declare word variables in the bit−addressable area as fp. You can
access individual bits using the intrinsic functions _getbit() and
_putbit().
_sfrbit / _esfrbit
Data types for the declaration of specific, absolute bits in special function
registers or special absolute bits in the SFR address space.
_sfr / _esfr
Data types for the declaration of Special Function Registers.
_xsfr
Data type for the declaration of Special Function Registers not residing in
SFR memory but do reside in internal RAM. An example of these SFRs are
PEC source and destination pointers. The compiler will use a ’mem’
addressing mode for this data type whereas for an object of type _sfr a
’reg’ or ’mem’ addressing mode may be used.
These SFRs are not bitaddressable.
_at
You can specify a variable to be at an absolute address.
• • • • • • • •
3−3