PIC Microcontoller Memory Method

Moving data blocks

From: Dmitry Kiryashov

 ; for ( i = num_of_elements; i != 0; ) { i--; b[i] = a[i]; } 
        movlw   num_of_elements 
        movwf   i 
loop: 
        decf    i, W 
        addlw   a 
        movwf   FSR     ; (a+i) 
        movfw   INDF 
        movwf   temp 

        movlw   (b-a) 
        addwf   FSR, F  ; (b+i) 
        movfw   temp 
        movwf   INDF 

        decfsz  i, F 
        goto    loop 
 

Questions:

Isaac Marino Bavaresco Says: " I wrote an assembly 'memcpy' routine for use with Hi-Tech PICC Compiler/Assembler. It was tested and work OK, but may have bugs yet. "