Table of Contents Previous topic Next topic
C/C++ COMPILER->Scratch Registers
The scratch registers differ depending upon whether or not the Advanced Features of the compiler are enabled.
If Advanced Features are not enabled:
Scratch registers are data registers D0, D1, D2 and address registers A0 and A1.
Floating point scratch registers are pseudo registers __CW68D002, __CW68D003 and __CW68D004 or, if the chip has a floating point unit, in floating point register FP0, FP1 and FP2.
The values of the scratch registers will be saved, if necessary, before a function is called.
If Advanced Features are enabled:
Scratch registers are data registers D0, D1 and address registers A0 and A1. If the chip has a floating point unit, floating point register FP0 and FP1 are also scratch registers.
The compiler will ensure that scratch registers are not in use when a function is called (unless they are being used to pass parameters to the function).