CompuServe Messages

Math in processes

    02-Feb-95 18:02:52
Fm: Doug Walker 71165,2274
To: Shraddhan 70374,754
The math coprocessor has to be set up by your startup code. Chances are, when you run as a process your compiler system's startup code is setting it up correctly. When you're running as a task, your startup code probably isn't getting executed, so you need to duplicate it yourself. If you have SAS/C, the file SC:SOURCE/_FPINIT.C contains an autoinitializer function which initializes the coprocessor. Oh, there is another possibility, too – if you are using Commodore's IEEE library, you MUST do the OpenLibrary() on the math library from the task that is calling the library. OpenLibrary() does the chip initialization for you, but it does it only for the task/process that executes it. It is technically illegal for you to pass library bases between tasks/processes, and this is one of the reasons. –Doug