PreviousNext
Avoiding MOVLP #2
Help > Appendix > Code Optimization > Avoiding MOVLP #2

FLASH-                        RAM                Speed-

 

If there are repeated calls of some function residing on another page, then create a function at the current page that calls this function.

 

#pragma origin __EXTENDED_FLASH

 

...

  pulseLEDG();

  // Do something

  pulseLEDG();

  // Do something

  pulseLEDG();

  // Do something

  pulseLEDG();

 

#pragma origin __EXTENDED_FLASH

 

  void pulseLEDGfromExtendedFlash()

  {

       pulseLEDG();

  }

 

...

  pulseLEDGfromExtendedFlash();

  // Do something

  pulseLEDGfromExtendedFlash();

  // Do something

  pulseLEDGfromExtendedFlash();

  // Do something

  pulseLEDGfromExtendedFlash();