Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What's wrong with this? (*solved*)
#6
na_th_an Wrote:Maybe I'm just being thick:

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 (cad (i))
    Next i
End Sub

Compiler output:

[code]H:\Dev\Speccy\mt64x32lib\zxbasic>c:\zxb\zxb textdongle.bas
Traceback (most recent call last):
File "zxb.py", line 312, in <module>
Despite of the syntactic/semantic error, this is a compiler bug: the compiler should *NEVER* crash, regardless of the input source code. This is something to be fixed. Also, check for IX/IY when using your routines or IM, since ZX BASIC requires IX for functions, and IY are used for some ROM routines called by ZX BASIC (even for Timer/Interrupt routines). So if you're experiencing some strange crashed, try to push/pop IX and IY on your routines to see if it works.

Also, remember the stack is at 32767 or even lower, so when it reaches the BASIC or ROM Variables zone, it could also crash your program.

PD: I'm on vacation (yes in the Canaries 8) ) => <!-- m --><a class="postlink" href="http://p.twimg.com/AykD5bpCMAA7Fhp.jpg">http://p.twimg.com/AykD5bpCMAA7Fhp.jpg</a><!-- m -->
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)