> Using indirect addressing allows one routine to be called with pointers > to the data to be moved, so a small amount of code space can serve many > purposes. Here's a general purpose move routine which isn't optimized at > all but it should work. My personal "taste" is to have one version coded for either each source or each destination, which takes a pointer to the "other" operand as input. Thus, for example, if variables are four bytes... stow_var1: movwf FSR movf var1,w movwf INDF incf FSR movf var1+w movwf INDF incf FSR movf var1+w movwf INDF incf FSR movf var1+w movwf INDF retlw 0 etc. for each variable to be moved. Then, to do var3 := var1 you would simply code: movlw var3 call stow_var1 To minimize the code required by the assorted load and stow functions, you may give some variables both load-and-store capabilities and others neither. In the event that you need, e.g., var3 := var2 and you don't have a load function for var3 or a stow for var2, and time is not critical (but space is) and var1 is available, you could code: movlw var2 call load_var1 movlw var3 call load_var1 This would take more than twice as long to execute as doing the move directly, but only require half as much code space.