I'm just starting C++, currently in college learning it.
I use MS Visual Studio 2010, but I want to compile a program to run on MS-DOS 6.22, and the only thing I got from googling is that I can't do what I want using Visual Studio.
Can someone recommend a compiler that can do it? Also, since I'm spoiled by all-in-one Visual Studio, I'd need a basic tutorial on how to open .cpp file and compile it into .exe file in that compiler.
Nothing really major in that program that would make it not work on older compilers, except maybe the use of c++ strings.
Almost forgot to mention, I'm looking for a free compiler version, even if it's not for commercial use
In general, the system calls will be different and you'll have to "port" it to Windows Platform SDK. Direct screen access won't work in the same way, access to ports will be different. if you're using high-res graphics, they work either.
There may be some work to do, but you can certainly do it in Visual Studio.
i've read that Visual Studio does not compile 16-bit applications for DOS.
In general, the system calls will be different and you'll have to "port" it to Windows Platform SDK. Direct screen access won't work in the same way, access to ports will be different. if you're using high-res graphics, they work either.
And as I said, i'm just learning, so I don't really know most of what you just said. My program is simple console application (text only, runs in DOS window). But the .exe file that gets compiled "cannot run in DOS mode" - when I launch it in MS-DOS 6.22 on my other computer.
How can I compile it to run in DOS? is there a certain setting in VS for that or do I need a different compiler?(and back to my original topic, how to use that compiler?)
From your original post it sounded like you want to port a DOS application to Windows. Which is the more reasonable thing to do, because there's no reason to create DOS programs in this day and age.
Was 6.22 16-bit? I thought DOS was always 8-bit, but it's been so long since I worked with DOS. I kind of miss those days because it felt more like we were pioneering.
If you want a DOS compiler, you could use Borland. That was one of the compiler's of choice back in the day. It had the best debugger and a better C++ implementation than Microsoft.
Watcom is still going, they were known for their kick-ass optimisation.