PreviousNext
Pointer parameters mapped to FSRx
Help > Appendix > Code Optimization > Pointer parameters mapped to FSRx

FLASH-                        RAM-               Speed+

 

When a function pointer parameter is later used as FSRx, then it is better to directly map this parameter to FSRx.

 

void ZeroMemory (uns16 from, uns8 length)

{

  FSR0 = from;

  do

  {

       setINDF0( 0 );

       FSR0++;

  }

  while ( --length != 0 );

}

void ZeroMemory (uns16 from@FSR0, uns8 length)

{

  do

  {

       setINDF0( 0 );

       FSR0++;

  }

  while ( -- length != 0 );

}