Flavio Cappelli wrote: >Hello All, >I need to have autoincrement enabled and I need double indirect >addressing (to get a pointer in a vector of pointers). Can I use this ? > >movfp index,FSR0 >movfp INDF0, FSR0 > >or autoincrement modifies FSR0 after last instruction ? >In this case I should resolve with: > >movfp index, FSR0 >movfp INDF0, WREG >movfp WREG, FSR0 > >Can anybody confirm this ? >Tanks in advance. It does not work. The instruction "movfp INDF0, FSR0" writes the value of INDF0 to index; since the INDF0 file is not phisically implemented, it is read as "0", according with the data sheet, then this instruction indirectly writes a "0" to the "index" location. If you want to get a pointer in a pointer array, you must add the list number of the pointer to the pointer array's base, then transfer that value to FSR0, then read INDF0, something like this: movfp index,WREG ; index is the position of the pointer in the ar ray, I ;assume 8-bit pointers addlw pointer_base ; pointer_base is the address of the first point er in the ;array, i.e., the address of the array movwf FSR0 movpf INDF0, WREG ; WREG is loaded with the desired pointer If you now need to recover the value of the location this pointer addresses to, you must movwf FSR0 movpf INDF0,WREG ; result is in WREG This works even if autoincrement is enabled, but take into account that the final value of FSR0 may be different from the value you need; if so, you must save it before this chunk of program, and restore after. Regards Leonardo Perretti l.perretti@isnet.it