Hi Joe,
ASM
movlw 0x05
movwf _YourArray + 7
ENDASM
This snippet should place 5 in the eighth element of YourArray.
If you need the index to be a variable, you'll need to use the FSR and INDF registers. FSR is your index and INDF will contain the element pointed.
This program should clear your array.
YourArray VAR BYTE[16]
LoopCounter VAR BYTE
ASM
clrf _LoopCounter
movlw _YourArray
movwf FSR
Loop
clrf INDF
incf FSR
incf _LoopCounter
btfss _LoopCounter,4
goto Loop
ENDASM
/Ingvar
Bookmarks