Untested, off the top of my head. At least the F84 makes it easy, with only 1 bank of RAM<br>Code:ASM movlw low _array ; load FSR with address of the array movwf FSR rlf _index,W ; mult. index * 2 since array is WORDs addwf FSR, F ; add result to FSR movf INDF, W ; get the LowByte movwf _my_data incf FSR, F ; point to next byte movf INDF, W ; get the HighByte movwf _my_data + 1 ENDASM
Bookmarks