Hi I have a COUNT variable. When power up the PIC don’t know what value in it. (It depends on the last saved value in EEPROM)
I want to check whether it is ZERO or other. If it is zero I want to goto NORMAL program. If not zero I want to goto UPDATE routine.
Here is my code please tell me am I right?
I want to check whether it is ZERO or other. If it is zero I want to goto NORMAL program. If not zero I want to goto UPDATE routine.
Here is my code please tell me am I right?
Code:
movf COUNT,W ;get the count value
xorlw 00h ;compare with zero
btfss STATUS,Z ;check the ZERO bit
goto UPDATE ;NO, it is not ZERO
goto NORMAL ;YES, it is ZERO