I am a beginner with asm and embedded systems. I was looking at code which is meant to clear memory locations using the "indirection" register (or something like that - not sure). The code goes like:
movlw 0x20
movwf FSR
loop clrf INDF
incf FSR, F
btfsc FSR, 7
goto loop
I don't get the incf FSR, F part. The instruction incf takes two operands; it increments value in the first location, and stores the result in the 2nd. In this case F will have the incremented value, then why do we do a test on FSR?