So I am working on a native x86 port (both 32-bit and x64) and am not clear on what should be on the task stack in InitialiseStack. In particular, which stack frame am I trying to create? In this particular case, I cannot use an interrupt to do the yield (because this port will also be run in a hosted environment where software INTs are restricted), so I’ll be using a CALL (no in-line assembly for the 64-bit Visual Studio compiler).
I started by copying the 16-bit DOS port and am very familiar with that environment.
Also, what is the traditional stance on saving/restoring floating-point regs? Don’t use? Flag as being used? Flag when first FP exception occurs? Always save? The current Windows emulator port avoids this by using Windows threads.