I don't know if it's a compiler bug or (most likely) I'm doing something wrong.
I have to pass some data to a sub including, as an option, a byte variable and a string.
When I go to compile this message comes out:
Error: GCASM: Symbol 00 has not been defined at MOVLW LOW SALTRO
Error: GCASM: Symbol 00 has not been defined at MOVLW HIGH SALTRO
Where am I wrong?
I don't insert the source because there are over 6000 lines of code ...
This is the offending routine:
' -' -' ========================================================================' Stampa il messaggio alla locazione n' ------------------------------------------------------------------------SubPrintMes(InNumMesAsByte, OptionalInNumCrLfAsByte=0, OptionalInsAltroAsString="")DimLmAsByteDimMCntAsByte' -Lm=LeggiMessaggio(NumMes)ForMCnt=0toLm-1HSerPrintMESSAGGIO(MCnt)NextMCnt' -IfsAltro<>""ThenHSerPrintsAltroEndIf' -IfNumCrLfThenRepeatNumCrLfhserprintcrlfEndRepeatEndIfEndSub
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Try this, as I not idea what is happening but it may be related the optional. I have added 'erv to the code pieces.
Sub PrintMes (In NumMes As Byte, Optional In NumCrLf As Byte = 0, Optional In sAltro As String = "")
Dim Lm As Byte
Dim MCnt As Byte
'ERV
Dim sAltro As String
' -
Lm = LeggiMessaggio (NumMes)
For MCnt = 0 to Lm -1
HSerPrint MESSAGGIO (MCnt)
Next MCnt
' -
'erv
if sAltro(0) <> 0 then
If sAltro <> "" Then
HSerPrint sAltro
End If
end if
' -
If NumCrLf Then
Repeat NumCrLf
hserprintcrlf
End Repeat
End If
End Sub
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I don't know if it's a compiler bug or (most likely) I'm doing something wrong.
I have to pass some data to a sub including, as an option, a byte variable and a string.
When I go to compile this message comes out:
Error: GCASM: Symbol 00 has not been defined at MOVLW LOW SALTRO
Error: GCASM: Symbol 00 has not been defined at MOVLW HIGH SALTRO
Where am I wrong?
I don't insert the source because there are over 6000 lines of code ...
This is the offending routine:
Need the ASM please.
This is the ASM
This is the call to test:
For MCnt = 0 to Lm -1
Does gcb always start at 1?
Messaggio is an array of byte. Start at address 0.
Try this, as I not idea what is happening but it may be related the
optional
. I have added 'erv to the code pieces.Sub PrintMes (In NumMes As Byte, Optional In NumCrLf As Byte = 0, Optional In sAltro As String = "")
Dim Lm As Byte
Dim MCnt As Byte
'ERV
Dim sAltro As String
' -
Lm = LeggiMessaggio (NumMes)
For MCnt = 0 to Lm -1
HSerPrint MESSAGGIO (MCnt)
Next MCnt
' -
'erv
if sAltro(0) <> 0 then
If sAltro <> "" Then
HSerPrint sAltro
End If
end if
' -
If NumCrLf Then
Repeat NumCrLf
hserprintcrlf
End Repeat
End If
End Sub
The exact same error occurs.
If I remove optional the exact same error occurs
I am guessing, so, I need the complete project. You know my email address.
OK, I'll prepare everything and send it to you
@Anobium:
I sent you the files