C166 User's Guide

Function Return Values

Function return values are always passed using MCU registers. The following table lists the possible return values and the registers used for each.

Return TypeRegisterDescription
bitR4.0Single bit returned in R4.0.
char,
unsigned char
RL4Single byte type returned in RL4.
int,
unsigned int,
near pointer
R4Two byte (16-bit) type returned in R4.
long,
unsigned long,
far pointer,
huge pointer
R4 & R5LSB in R4, MSB in R5.
floatR4 & R532-Bit IEEE format.
doubleR4-R764-Bit IEEE format.