Having a look to gcbasic.bas, i found the error coming from line 3276, in FUNCTION CompileCalcLogic ( last update yesterday ) :
CurrLine = LinkedListInsert(CurrLine, " clr" + AV + "_H")
I changed to this:
CurrLine = LinkedListInsert(CurrLine, " clrf " + AV + "_H")
Not sure if this is correct, but the "clr" comes from there.
But is something weird, that asm code comes from this basic code:
if ctrl_output = 1 and pant_blink = 1 then
locate 1,15
PRINT "*"
End if
Just from the "and"
but i only have the problem depending on the previous code…
Here i don't have the error:
locate 1,8
PRINT amp1 : PRINT " mA"
if ctrl_output = 1 and pant_blink = 1 then
locate 1,15
PRINT "*"
End if
And here i have the error:
locate 1,8
if amp1 < 1000 then PRINT "0"
if amp1 < 100 then PRINT "0"
if amp1 < 10 then PRINT "0"
PRINT amp1 : PRINT " mA"
if ctrl_output = 1 and pant_blink = 1 then
locate 1,15
PRINT "*"
End if
Regards.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There were a few bugs in the logic operator code. There was the typo arcachofo mentioned above, plus a couple of missing Ifs that were sometimes trying to put AVR code on PICs or PIC code onto AVRs, and a problem with the XOR operator in GCBASIC's assembler on 18F PICs.
Using pic16f876a i have this line in the .asm:
clr SysTemp2_H
Having a look to gcbasic.bas, i found the error coming from line 3276, in FUNCTION CompileCalcLogic ( last update yesterday ) :
CurrLine = LinkedListInsert(CurrLine, " clr" + AV + "_H")
I changed to this:
CurrLine = LinkedListInsert(CurrLine, " clrf " + AV + "_H")
Not sure if this is correct, but the "clr" comes from there.
But is something weird, that asm code comes from this basic code:
Just from the "and"
but i only have the problem depending on the previous code…
Here i don't have the error:
And here i have the error:
Regards.
I'm having the same issue with this "clr" opcode; but I can't find the source. It only happens when I use signed integer math.
There were a few bugs in the logic operator code. There was the typo arcachofo mentioned above, plus a couple of missing Ifs that were sometimes trying to put AVR code on PICs or PIC code onto AVRs, and a problem with the XOR operator in GCBASIC's assembler on 18F PICs.
Hopefully these are all fixed by the update at http://gcbasic.sourceforge.net/newfiles/update.zip