$OPTIMIZER ON and $OPTIMIZER OFF directives

Purpose:

To control optimization in a program. If optimization has been turned on in the C compiler command line


 $OPTIMIZER OFF

can be used before a code section to turn optimization off and


 $OPTIMIZER ON

after the code section to turn optimization back on.

Example:


 $OPTIMIZER OFF
  ...Code not to be optimized is here.
 $OPTIMIZER ON