Kamikaze,
Ok, let's try this one more time. I think this is what you're after. And, since you're using it in an interrupt, it save/restores the FSR so it doesn't interfere with normal PBP operations.
Code:fsave var byte ASM movf FSR, W ; save current FSR value movwf _fsave movlw low _array ; load FSR with address of the array movwf FSR movf _index,W ; get index value addwf FSR, F ; add index to FSR movf _my_data, W ; get my_data.Byte0 movwf INDF ; put it in the array movf _fsave, W ; restore the original FSR movwf FSR ENDASM




Bookmarks