It means that an error is somehow getting through to the assembler of GCBASIC. This can happen because of a bug in GCBASIC, or because there is an error in your program that the compiler isn't detecting properly.
Could you post enough of the code to reproduce the error? Also, what version of the compiler are you using?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
After some troubleshooting, it appears the problem is with the "BTFSC Rec_1" statement BUT "BTFSC Rec_2" seems to work.
'This section gives error
If T_Sel = 1 then
AnemNS:
BTFSC Rec_1; PROBLEM APPEARS TO BE WITH THIS LINE
Goto Anem1b
A_Cnt = A_Cnt + 1; # of times Inst. Cycles repeated
If A_Cnt = 1000 then; To eliminate endless loop if Transducer is blocked
Goto Anem1b
End If
Goto AnemNS
End If
'This section does not give error
If T_Sel = 2 then
AnemSN:
BTFSC Rec_2; THIS LINE DOES NOT GIVE THIS ERROR
Goto Anem1b
A_Cnt = A_Cnt + 1
If A_Cnt = 1000 then
Goto Anem1b
End If
Goto AnemSN
End If
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem here is the mixture of assembly and GCBASIC syntax in a single line. In GCBASIC, PORTA bit 0 is called PORTA.0, and in assembly it is called PORTA,0. (One uses , and the other uses .). There are two ways to fix this. One option is to change Rec_1 to PORTA,0. The other option is to change this code:
AnemNS:
BTFSC Rec_1 ;PROBLEM APPEARS TO BE WITH THIS LINE
Goto Anem1b
A_Cnt = A_Cnt + 1
To this:
AnemNS:
If Rec_1 = 1 Then
Goto Anem1b
End If
A_Cnt = A_Cnt + 1
That will result in almost the same assembly code, except that the second one will translate the bit name properly and it hopefully easier to read!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Does Anyone know the meaning of this error message?
"Error: GCASM: Symbol 5.0 has not been defined"
It means that an error is somehow getting through to the assembler of GCBASIC. This can happen because of a bug in GCBASIC, or because there is an error in your program that the compiler isn't detecting properly.
Could you post enough of the code to reproduce the error? Also, what version of the compiler are you using?
I'm using version 0.9 14/2/2010.
After some troubleshooting, it appears the problem is with the "BTFSC Rec_1" statement BUT "BTFSC Rec_2" seems to work.
'This section gives error
If T_Sel = 1 then
AnemNS:
BTFSC Rec_1; PROBLEM APPEARS TO BE WITH THIS LINE
Goto Anem1b
A_Cnt = A_Cnt + 1; # of times Inst. Cycles repeated
If A_Cnt = 1000 then; To eliminate endless loop if Transducer is blocked
Goto Anem1b
End If
Goto AnemNS
End If
'This section does not give error
If T_Sel = 2 then
AnemSN:
BTFSC Rec_2; THIS LINE DOES NOT GIVE THIS ERROR
Goto Anem1b
A_Cnt = A_Cnt + 1
If A_Cnt = 1000 then
Goto Anem1b
End If
Goto AnemSN
End If
Here's an update.
Rec_1 refers to PORTA.0. ( #define Rec_1 PORTA.0)
If I change this to PORTA.4, PORTB.3 or PORTC.5, the error does NOT occur.
If I go back to PORTA.0, the error occurs.
I'm using a PIC16F876
The problem here is the mixture of assembly and GCBASIC syntax in a single line. In GCBASIC, PORTA bit 0 is called PORTA.0, and in assembly it is called PORTA,0. (One uses , and the other uses .). There are two ways to fix this. One option is to change Rec_1 to PORTA,0. The other option is to change this code:
AnemNS:
BTFSC Rec_1 ;PROBLEM APPEARS TO BE WITH THIS LINE
Goto Anem1b
A_Cnt = A_Cnt + 1
To this:
AnemNS:
If Rec_1 = 1 Then
Goto Anem1b
End If
A_Cnt = A_Cnt + 1
That will result in almost the same assembly code, except that the second one will translate the bit name properly and it hopefully easier to read!
Thanks! I'll try it.
I Just tried it and it worked! Thanks!
Is the use of a comma only for the Zero PORT.
In the code above that did NOT give an error Rec_2 referred to PORTA.1 (with a period). Why is the periodm okay here?