 | C251 User's Guide |  |
|
|
| Function Return ValuesMCU registers pass function return values. The following table lists the return types and the registers used for each. | Return Type | Register | Description |
|---|
| bit | Carry Flag | Single bit returned in the carry flag | char/unsigned char, 1-byte pointer | R11 | Single byte type returned in R11 | int, unsigned int, 2-byte pointer | WR6 | MSB in R6, LSB in R7. | | long, unsigned long | DR4 | MSB in R4, LSB in R7 | | float | DR4 | 32-Bit IEEE format: 'exponent' and 'sign' in WR4 | | double | DR0, DR4 | 64-Bit IEEE format: 'exponent' and 'sign' in WR0 | | 4-byte pointer | DR0 | MSB in R0, LSB in R3. |
For parameter passing to C51 functions; 3 byte pointers are returned in the registers R1/R2/R3. Refer to PARM51 or PARM251 for more information. |
|