Jump to content

Not able to use program on DOS comp


Famicoman

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...