4DOS Color Prompt?

Getting old software/games running on older hardware.

Re: 4DOS Color Prompt?

Postby Dacobi » 2019-4-04 @ 19:35

Thanks for the answer.

I actually did something like this with pipes many many years ago.
I made a GUI program to run a cli cdrom burner tools in Linux.
But here I only piped the output and then used system() for the cli command.

So I think I understand the windows example you linked.
The problem seems to be to find docs regarding this process in DOS/C
Everything on Google is Windows oriented.
Dacobi
Newbie
 
Posts: 29
Joined: 2019-2-18 @ 05:50

Re: 4DOS Color Prompt?

Postby Dacobi » 2019-4-04 @ 21:28

For instance the pipe command from unistd.h doesn't exist in the BorlandC I'm using.
Dacobi
Newbie
 
Posts: 29
Joined: 2019-2-18 @ 05:50

Re: 4DOS Color Prompt?

Postby spiroyster » 2019-4-04 @ 21:57

Yeah you might need to find an old book. Standard streams are a unix thing from a looooong time ago. If anything, in MSDOS, it's an afterthought. I don't know at what point support was added to MSDOS, but there stands a good chance that it is later DOS. Someone else may know.

Only the last code example is DOS specific. Change the include from #include <cstdlib.h> to #include <stdlib.h>, and the command syntax from 'dir' to 'ls' and it will work in nix. There are many examples of this for unix, and there are subtle behavioural differences, although most of the concept is the same. You would need to use fork() instead or CreateProcess(). I don't really use them in programs, only in scripts, but I learned from the unix way as opposed to the Windows way, and I don't remember the transition being too difficult to Windows redirection. Good luck.
User avatar
spiroyster
Oldbie
 
Posts: 509
Joined: 2015-10-12 @ 12:26

Previous

Return to Software

Who is online

Users browsing this forum: No registered users and 1 guest