HCS08 Return Values (used for the -Cs08 Option)

The HCS08 returns function results in registers, unless the function returns an object with a size greater than two bytes. The register used depends on the return type, as shown in the following table.

Table 1. HCS08 Return Values
Return Type Registers
char (signed or unsigned) A
int (signed or unsigned) H:X
Pointers or arrays H:X
Function pointers H:X