Famicoman Posted November 4, 2006 Share Posted November 4, 2006 I recenty made a simple program in C++ that outputs some binary digits in the command prompt on my windows box. It has no purpose, but It was cool and simple. The problem is that when I take the .exe and try to execute it on an older DOS lappy I have, I get an error, "This program cannot be run in DOS mode". It is made to be ran in command prompt, and I can successfully run it in command prompt in Windows, but it just won't work in DOS. Any ideas what I'm doing wrong? Quote Link to comment Share on other sites More sharing options...
moonlit Posted November 4, 2006 Share Posted November 4, 2006 Is it a console application? There are programs that you can write which can run in what appears to be a Windows 'DOS' box but in fact they are Windows programs with no GUI and not true DOS programs. Because of this, they won't run in pure DOS because they are actually the same as any other Windows app, you just can't see any windows or buttons. These are often called console applications. Quote Link to comment Share on other sites More sharing options...
Famicoman Posted November 4, 2006 Author Share Posted November 4, 2006 Yes, its a console app. Quote Link to comment Share on other sites More sharing options...
moonlit Posted November 4, 2006 Share Posted November 4, 2006 That would be why you can't run it in pure DOS :) Quote Link to comment Share on other sites More sharing options...
Famicoman Posted November 4, 2006 Author Share Posted November 4, 2006 Grrrrrr... IS there any work-around what so ever for this? Quote Link to comment Share on other sites More sharing options...
moonlit Posted November 4, 2006 Share Posted November 4, 2006 Not really, what are you using to write the program? Since you're using C++ though you could grab a pile of old C++ programming apps from around the net though, I've seen old versions of C++ for MSDOS floating around, should be easy enough to find 'em. Quote Link to comment Share on other sites More sharing options...
Famicoman Posted November 4, 2006 Author Share Posted November 4, 2006 Used Dev++ and MSVS 2005 without any luck. I'll look for some period software, though. Quote Link to comment Share on other sites More sharing options...
moonlit Posted November 4, 2006 Share Posted November 4, 2006 Yeah VS2k5 doesn't really allow for DOS dev but go take a looksee and grab some period software like you say, that's got more of a chance of working since it was made to create DOS binaries :) Quote Link to comment Share on other sites More sharing options...
cooper Posted November 4, 2006 Share Posted November 4, 2006 *cough*Borland Turbo C*cough* Quote Link to comment Share on other sites More sharing options...
Guest Posted November 5, 2006 Share Posted November 5, 2006 there should be an option you can set on the compiler to make it MS-DOS Quote Link to comment Share on other sites More sharing options...
jool Posted November 5, 2006 Share Posted November 5, 2006 The problem you're having is most likely caused by the "real" ms-dos being 16-bit while everything created with newer visual studio is (at least) 32-bit. You will need an older compiler to make 16-bit executables. There might also be a hidden compiler switch somewhere but if there is I don't know it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.