Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PRINT AT 23,0 and FOR NEXT Loop not working after Fastcall
#5
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="http://jgmalcolm.com/z80/intermediate/pcsp.htm#gsc.tab=0">http://jgmalcolm.com/z80/intermediate/p ... #gsc.tab=0</a><!-- m -->
I found this one:
;SafeExit:
ld sp,(SavedSP) ;get back saved sp
ret ;exit
;SaveSP:
ld (SavedSP),sp ;save sp
ret ;go back
;SavedSP: .dw 0 ;memory to save sp

I tried this with:

Code:
LD (SavedSP),SP
PUSH IX
...
CALL 15357                        ;TR-DOS v4 #3BFD = 15357 dez
POP IX
LD SP,(SavedSP)
RET

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.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)