Syntax and Functions

CCS C Compilers include Standard C Constructs, numerous Pre-Processor Functions, and hundreds of Built-In Functions. All practical ANSI C standard requirements are implemented. C syntax and special functions have a uniform syntax across all chip families, allowing for migration to a new chip trivial.

Data Types

  • int1
  • int8
  • int16
  • int32
  • int48*
  • int64*
  • float
  • float48*
  • float64*
  • short
  • char
  • int
  • long
  • double*
  • _fixed(n)
  • unsigned
  • signed
  • void
Items marked with * are for 24-bit parts only.

Standard C Syntax

  • if, else, while, do, switch, case, for, return, goto, break, continue
  • ! ~ ++ -- * = = , & |
  • * / % << >> ^ && || ?:
  • <= < > >= == !=
  • = += -= *= /= %= >>= <<= &= ^=m |=
  • typedef, static, auto, const, enum, struct, union
  • Arrays up to 5 subscripts
  • Structures and Unions may be nested
  • Custom bit fields (1-8 bits) within structures
  • Enumurated types
  • Constant variables, arrays, structures and strings
  • Full function parameter support (any number and kind)
  • C++ reference parameters and comments allowed

Pre-Processors

Built-In Libraries (+show)

#ocs
#use capture
#use delay
#use dynamic_memory
#use fast_io
#use fixed_io
#use i2c
#use profile
#use pwm
#use rs232
#use spi
#use standard_io
#use timer
#use touchpad

Compiler Control (+show)

#case
#ignore_warnings
#line
#module
#opt
#priority
#profile

Device Specification (+show)

#device
#fuses
#hexcomment
#id
#pin_select
#serialize
#todo

Linker (+show)

#build
#export
#import

Memory Control (+show)

#asm
#asm asis
#bank_dma
#bank1
#bankx
#banky
#bit
#byte
#endasm
#fill_rom
#locate
#org
#reserve
#rom
#type
#word
#zero_local_ram
#zero_ram

Pre-Defined Identifiers (+show)

_ _address_ _
_ _buildcount_ _
_ _date_ _
_ _device_ _
_ _file_ _
_ _filename_ _
_ _line_ _
_ _pcb_ _
_ _pcd_ _
_ _pch_ _
_ _pcm_ _
_ _time_ _

Function Qualifiers (+show)

_ _attribute_ _
#inline
#int_xxxx
#int_default
#int_global
#recursive
#separate
_ _unicode_ _

RTOS (+show)

#task
#use rtos

Standard C (+show)

#define
defined()
definedinc()
#elif
#else
#endif
#error
#if
#ifdef
#ifndef
#include
#list
#nolist
#pragma
#undef
#warning

Built-In Functions



C-Aware IDE Demo
Embedded C Learners Kit
C Workshop Compiler