Click here to Skip to main content
14,420,468 members
Rate this:
Please Sign up or sign in to vote.
See more:
I know DOS doesn't have built-in capability for scheduling or multithreading but Is There any way to do..? I need to write client and server applications for MS-DOS using C language.in this application I need handle multiple client at a time as well as without stuck my main process my client should wait for server response.so How can we do it on MS-DOS.?

What I have tried:

I am finding client and server applications for MS-DOS using C language.
Posted
Updated 19-Dec-18 22:19pm
v2
Comments
Mohibur Rashid 19-Dec-18 22:27pm
   
What's your OS? MS-DOS? I repeat OS!
Dave Kreskowiak 19-Dec-18 23:36pm
   
MSDOS 6.22? The same MSDOS 6.22 that was released some 25 years ago? Why on this earth is anyone still booting a machine in DOS today?! There is ZERO reason for this!
Rate this:
Please Sign up or sign in to vote.

Solution 1

Quote:
How can we do it on MS-DOS.?
You can't do it on MS-DOS.
   
Rate this:
Please Sign up or sign in to vote.

Solution 2

In order to perform the required task you should use asynchronous I/O in the single thread program. That is, roughly, emulating parallel behaviour (this is how, for instance, single threaded microcontroller programs works: state machines and the like...).
But I really don't see the point of programming for such an ancient OS.
   
Comments
Rick York 20-Dec-18 13:15pm
   
That's a good idea actually. I think this is really the only possible option but I really don't know if it could be done. A better question is why would you really want to? I know that's what the OP asked but I think there are better options available than MS-DOS. Linux for one example.
Rate this:
Please Sign up or sign in to vote.

Solution 3

But ... the primary question is:
Why you have to write a multi-thread application with DOS?

Gianluca
   
Rate this:
Please Sign up or sign in to vote.

Solution 4

For this old DOS you may not find a solution, but a Console Applications in Visual C++ is the best way to solve your problems.

Read also about Multithreading with C.

Maybe you must find some older version of Visual Studio for the old MS-DOS.
   
Comments
Rick York 20-Dec-18 13:19pm
   
There was a version of Visual C++, v1.51, that could build 16-bit programs. It ran on Windows 95.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100