Last night what I thought was a bug but not the only bug. I fixed it but multitasking support is still not complete. Clearly its a case of currupt stack and I am finding myself going through the gcc generated assembly code and doing the stack calculation manually. This is something I have not done before. Its time consuming but interesting. I am sure that eventually I will make it work.