FLASH- RAM- Speed+
When there is no risk of memory conflict then IQRF OS variables and function parameters can be used to save RAM and to avoid MOVLBs as these variables reside at the share core RAM area. Such variables can be used when no IQRF functions are not called.
uns16 Squared ( uns8 value ) { uns8 tempValue = value; uns16 squared = (uns16)value * tempValue; return squared; } |
uns16 Squared ( uns8 value @ param2 ) { uns8 tempValue @ param3; tempValue = value; uns16 squared @ param4; squared = (uns16)value * tempValue; return squared; } |
param2, param3, param4 can be used with caution. It is much safer to use user dedicated userReg0 and userReg1.