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.
| Return Type | Registers |
|---|---|
| char (signed or unsigned) | A |
| int (signed or unsigned) | H:X |
| Pointers or arrays | H:X |
| Function pointers | H:X |