On 09/03/2013 12:17, Vincent Rivière wrote:
I suspect that FreeMiNT's Fsfirst() use much more stack than the EmuTOS one, so the private stack overflows.
Indeed, that EmuTOS private AES stack overflowed. I increased it, that will be available in next EmuTOS snapshot.Now we can safely (*) use FreeMiNT with GEM=ROM and run xaloader.prg from the EmuTOS desktop. Even exiting XaAES works fine.
BTW, it seems that when calling from supervisor mode, FreeMiNT's Fsfirst() uses about 1.5 kB of stack. That seems quite a lot. Even though EmuTOS is now patched to cope with that, I wonder how much Atari TOS likes that, with GEM=ROM.
(*) The next issue is to ensure that xaaes.km has a valid USP. As we seen, this is mandatory before calling the AES from supervisor mode.
-- Vincent Rivière