SetMCGA

Started by
9 comments, last by Rickmeister 18 years, 8 months ago
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?
The best thing to do is just choose whatever you think you'd prefer, and go for it. -Promit
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++.
Grrrrrr.... how would you do it in Dev-C++?
The best thing to do is just choose whatever you think you'd prefer, and go for it. -Promit
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.
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?
The best thing to do is just choose whatever you think you'd prefer, and go for it. -Promit
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.
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
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?
The best thing to do is just choose whatever you think you'd prefer, and go for it. -Promit
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.
you can even get borland at borland.com

This topic is closed to new replies.

Advertisement