augustinetez
Active Member
Having a "Seniors Moment", could somebody please confirm I've got this right for the 16F1827 - clearing the GPR's without doing the clrf xxxx ad infinitum at the begining of the program:-
Code:
start
movlw LOW 0x20 ; initialize pointer
movwf FSR0L ; to RAM
movlw HIGH 0x20 ; initialize pointer
movwf FSR0H ; to RAM
next
clrf INDF0 ; clear INDF register
incf FSR0L ; inc pointer
btfss FSR0L,7 ; all done?
goto next; no clear next
; yes continue