Hi, > How would you implement an array using MicroChip assembly? > > For example > > In a higher level language I can write > > While x < 10 > Piclist(x) = stuff; > x = x + 1; > End > > Is there a way to do something similar using Pic assembly? > You can use indirect addressing. This is done through the FSR and INDF special function registers. Load the address of the register you want to access into FSR. When you then access INDF (read from it or write to it), the actual file register used will be the one whose address is in FSR. For example, if you load 20 into FSR and then do a movf INDF, W you will actually read the contents of register 20 into W. Your routine could be done like this: movlw PicList ;Get address of first byte in array movwf FSR ;Use indirect addressing movlw 10 ;Repeat for 10 elements movwf x Loop: movlw stuff ;Get whatever you want in the array into W movwf INDF ;Store in array incf FSR, F ;Next byte in the array decfsz x, F goto Loop ;Repeat until x=0 Niki