Hi all,
I am doing a program where a value is moved to REG1 (in the example below the value is 1 decimal), and the program will go to different call routines according to the value moved in REG1.
In the above example, the program is suppose to go to the CALL_3 routine, but for some reason its not working.
Does anyone know what is the problem please?
Thanks in advance.
I am doing a program where a value is moved to REG1 (in the example below the value is 1 decimal), and the program will go to different call routines according to the value moved in REG1.
Rich (BB code):
CLRF REG1
MOVLW .1
MOVWF REG1
MOVLW REG1
SUBLW .3
BTFSC STATUS,Z
GOTO CALL_1
MOVLW REG1
SUBLW .2
BTFSC STATUS,Z
GOTO CALL_2
MOVLW REG1
SUBLW .1
BTFSC STATUS,Z
GOTO CALL_3
Does anyone know what is the problem please?
Thanks in advance.