Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PRINT AT 23,0 and FOR NEXT Loop not working after Fastcall
boriel Wrote:You have to save both the SP (stack) and the IX register. FASTCALL is faster and does nothing of this, it's just a pure ASM code (the ubyte parameter is passed in the A register).
I haven't examined what TR-DOS do. Also, ZX BASIC uses the classic 48k ROM variables (i.e.236XX addresses). It might also be that.
I think you maybe right with this. I have to try a little further.

OK. As I´m not very experimented with ASM, can you please show me the way ? Do you think this should be enough (=save IX and SP):

On <!-- m --><a class="postlink" href=""> ...</a><!-- m -->
I found this one:
ld sp,(SavedSP) ;get back saved sp
ret ;exit
ld (SavedSP),sp ;save sp
ret ;go back
;SavedSP: .dw 0 ;memory to save sp

I tried this with:

LD (SavedSP),SP
CALL 15357                        ;TR-DOS v4 #3BFD = 15357 dez
LD SP,(SavedSP)

DEFB 0,0
but this doesn´t changed anything.
boriel Wrote:Where can I find the TR-DOS asm listings? maybe I can have a look.
You mean TR-DOS ROM-Listing ? I have one commented in portoguese for TR-DOS v4 compatible CBI-DOS v2.4
but I think it´s not yet worth to do time-consuming debugging on it.

Messages In This Thread

Forum Jump:

Users browsing this thread: 2 Guest(s)