The HC08 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) | X:A |
| pointers/arrays | X:A |
| function pointers | X:A |