Start call Update
[COLOR="Red"]btfss PORTA,1
goto Edit ;yes, button has pressed[/COLOR]
---
---
[COLOR="Red"]Edit btfss PORTA,1 ;wait until button relesed
goto $-1
call Update
movf Data,W
call EEwrite
goto Start ;goto begin of the program[/COLOR]
Update btfsc PORTA,0 ;check the Pulse
goto Getpulse ;yes, pulse coming
btfss PORTA,1 ;check the edit button
[COLOR="Red"]return [/COLOR] ;yes, it is pressed
goto Update ;no,
Getpulse btfss PORTA,0 ;check the Pulse
goto Process ;yes,it is pressed
--- ;a small delay
--- ;no,then call a delay
goto Getpulse ;
return
Process call Che_Flag ;this is done 15 times
---
---
movwf Data ;final data
goto Getpulse