12-27-2015, 10:00 PM
OK.
I´ll paste the called FASTCALL down under.
I´ve tried to save IX register by a PUSH IX and restore it with POP IX, but this changed nothing,
The problem seems to me the TR-DOS-ROM (=Spectrum Betadisk-System) Routine
which is called with the FASTCALL.
But I cannot imagine yet, why this can bring your ZX Basic "out of running correct".
Here´s my used FASTCALL:
I´ll paste the called FASTCALL down under.
I´ve tried to save IX register by a PUSH IX and restore it with POP IX, but this changed nothing,
The problem seems to me the TR-DOS-ROM (=Spectrum Betadisk-System) Routine
which is called with the FASTCALL.
But I cannot imagine yet, why this can bring your ZX Basic "out of running correct".
Here´s my used FASTCALL:
Code:
FUNCTION FASTCALL MCodeDIRDOSv4 (number as uByte) as uInteger
ASM
;BDUC-Newsletter No.5 Page 5 Brothaers TR-DOS v4.XX Example for CAT to SCREEN
CALL 15366 ;TR-DOS v4 #3C06 = 15366 dez = DOS ON
PUSH HL ;Put the DOS OFF return adress on the stack - Needed by TR-DOS v4
LD A,2 ;Select Stream 2 (screen)
LD C,7 ;Set DOS Routine 7 (catalogue)
CALL 15357 ;Call TR-DOS v4 Central Functions adress #3BFD = 15357 dez
RET ;This one jumps to the adress PUSHed with PUSH HL, put DOS Off and returns
END ASM
END FUNCTION