PreviousNext
Parameter mapped to W
Help > Appendix > Code Optimization > Parameter mapped to W

FLASH-                        RAM-               Speed+

 

When the content of the W register is not modified then the very last function parameter can be mapped to it.

 

void Method ( uns8 value )

{

  switch ( value )

  {

  case 1:

  case 2:

       _LEDG = 1;

       break;

 

  case 4:

  case 8:

       _LEDG = 0;

       break;

  }

}

void Method ( uns8 value @ W )

{

  switch ( value )

  {

  case 1:

  case 2:

       _LEDG = 1;

       break;

 

  case 4:

  case 8:

       _LEDG = 0;

       break;

  }

}