I use the ANSI standard SetJmp.h for stack saving.
Here is how the task is loaded:
---------------------------------
1. A task class is allowcated.
2. The memory address is of this class, as well as the memory address of a jump buffer is put in a file.
3. The OS starts the exe, the exe uses the class pointer to setup its task class (pointing to the same memory address).
3. the exe sets up the jump buffer in the task class
4. it uses the jump buffer to return control to the OS
5. as soon as the OS starting multitasking <CRASH>
-----------------------------------------------\
now this all works fine and dandy under real mode, but DOS 4/G gives me a general protection fault under PMODE. Is there anyway to disable this general protection checking or.. help

Thanks in advance
-VoidLogic