PreviousNext
W as a temporary variable
Help > Appendix > Code Optimization > W as a temporary variable

FLASH-                        RAM                Speed

 

When the content of the W register is preserved, it can be used as a temporary variable.

 

if ( byte & mask )

  bufferCOM[ 0 ]  = 0xAB;

else

  bufferCOM[ 0 ]  = 0xCD;

if ( byte & mask )

  W = 0xAB;

else

  W = 0xCD;

bufferCOM[ 0 ] = W;