PDA

View Full Version : multithreading



thedumbmutt
11-13-2002, 11:09 AM
How can I run multiple functions at once in dos, I know in theory how it would be done but all my attempts have failed.

heres how I would do it:

1. Hook a TaskSwitcher() function to some kind of timer (like 1C)
2. Have it save the state of all the registers, flags, and the stack.
3. Have it jump to the previously saved stuff.

Im not sure how to do this and any help is appreciated.

Salem
11-13-2002, 11:54 AM
http://www.ifi.unizh.ch/ailab/embedded/multitaskers/ctask.readme
http://www.ifi.unizh.ch/ailab/embedded/multitaskers/ctask22d.zip
Either use it, or read it for inspiration