PreviousNext
Using FSRx to copy between buffers and variables
Help > Appendix > Code Optimization > Using FSRx to copy between buffers and variables

FLASH-                        RAM-               Speed+

 

It is efficient to use FSRx to repeatedly access (copy, compare) the content of buffers and variables to avoid MOVLBs.

 

 RX = bufferRF[0];

 RTDT3 = bufferRF[10];

 var0 = bufferRF[20];

 var1 = bufferRF[30];

 

 FSR0 = bufferRF;

 // or even better (shorter, but not faster)

 setFSR0( _FSR_RF );

 

 RX = FSR0[0];

 RTDT3 = FSR0[10];

 var0 = FSR0[20];

 var1 = FSR0[30];