07-28-2012, 08:58 AM
Update: Notice the compiler crash at syntax_error function. In fact, your program effectively has a syntax (semantic) error. BASIC is not C: cad$(i) is not a char; it's a String of length 1. You're trying to coerce cad$(i) into Ubyte. Use CODE(cad$(i)) for that, or ASC:
Code:
Sub Fastcall tdPutChar (c as uByte)
Asm
rst 16
End Asm
End Sub
Sub tdPrint (cad As String)
Dim i As uByte
For i = 1 To Len (cad)
tdPutChar(CODE(cad(i))) ' <= Here
Next i
End Sub