Jump to content
  • Advertisement
Sign in to follow this  
orcfan32

SetMCGA

This topic is 4844 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok, I found this on cprogramming.com, where you can go into fullscreen dos. But the code gives me the error '_AX is not defined'. I want to try this so bad: void SetMCGA() { _AX = 0x0013; geninterrupt ( 0x10 ); } Any help?

Share this post


Link to post
Share on other sites
Advertisement
That looks like Borland's Turbo C/C++ syntax for accessing the ax register and triggering an interrupt for their DOS based compilers. In order to use it, you'll need to have a copy of Turbo C or Turbo C++.

Share this post


Link to post
Share on other sites
You don't. DevCpp uses a Win32 targetting gcc version. It does not create DOS programs. And a non-DOS program trying to trigger an interrupt like the video mode interrupt is not something that the operating system appreciates. You'll need to get a DOS compiler like Turbo C or Turbo C++ for DOS in order to do the equivalent of that code.

Share this post


Link to post
Share on other sites
Isn't a DOS window like a console window? If you use this code:

#include <iostream>
using namespace std;

int main()
{
cout<<"Isn't this DOS?";
cin.get();
return 0;
}


Isn't that a DOS window?

Share this post


Link to post
Share on other sites
No, that's a console window. It looks much like what DOS looked like, but is not the same. DOS programs essentially had free rein over the hardware, which modern versions of windows emulates. However, it only emulates it for actual DOS programs, not for Win32 programs that operate in the console subsystem.

Share this post


Link to post
Share on other sites
Quote:
Original post by orcfan32
Isn't a DOS window like a console window? If you use this code:

#include <iostream>
using namespace std;

int main()
{
cout<<"Isn't this DOS?";
cin.get();
return 0;
}


Isn't that a DOS window?


That's a console (or command prompt) window. It's confused with being a "dos window" because it resembles the old MS-DOS version of the unix command prompt.

However, newer Windows operating systems (such as XP, which I'm guessing you're using) don't really like to play nice with old interrupt-style programming (and protected mode, for that matter). An application created as a win32 console app is not the same as an old school ms-dos application.

To create those kinds of applications, you'll most likely need an old TurboC/C++ or (very old) DJGPP type compiler, and an emulator (such as "DOSBox") to get the maximum possible compatibility under these Windows OSes.

[edit]
Yeah, what SiCrane said :P

Share this post


Link to post
Share on other sites
Hmm.. is there a way to do it in the console window? Even a small copy? Isn't there a way for a fullscreen console window?

Share this post


Link to post
Share on other sites
You can get a full screen console window by pressing alt-enter when a console window has focus. You can also get a full-screen DOS emulation window, but you can only get a full-screen DOS emulation window iff the program being executed is a genuine DOS program. You can't do it with a normal Win32 console application.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!