C166 User's Guide

Function Declarations

The C166 Compiler provides a number of extensions for standard C function declarations. These extensions allow you to:

  • Declare a function as an interrupt procedure.
  • Choose the register bank used.
  • Select the memory area where the function is stored.
  • Declare a function as a real-time task function.

You may include these extensions or attributes (many of which may be combined) in the function declaration. Use the following standard format for your C166 Compiler function declarations.

<[>type<]> funcname (<[>args<]>) <[>interrupt vector<]> <[>using bankname<]>

Where

typeis the type of the value returned from the function. If no type is specified, int is assumed.
funcnameis the name of the function.
argsis the argument list for the function.
interruptindicates that the function is an interrupt function.
vectoris the interrupt vector name or trap number.
usingspecifies which register bank the function uses.
banknameis the register bank name.

Descriptions of these attributes and other features are described in detail in the following sections.