Keil Logo

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 Type Register Description
bit R4.0 Single bit returned in R4.0.
char,
unsigned char
RL4 Single byte type returned in RL4.
int,
unsigned int,
near pointer
R4 Two byte (16-bit) type returned in R4.
long,
unsigned long,
far pointer,
huge pointer
R4 & R5 LSB in R4, MSB in R5.
float R4 & R5 32-Bit IEEE format.
double R4-R7 64-Bit IEEE format.
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.