Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What's wrong with this? (*solved*)
#9
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
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)