|
||
|
GP Mailing List
ATXGPSIG List
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: mcga/text modes
Hallo,
this should compile fine and work without problems.
Perhaps have a closer look to yours compiler settings to switch to "large
memory model".
#include <conio.h>
#include <dos.h>
#include <stdio.h>
#include <stdlib.h>
void SetMCGA();
void SetText();
void SetMCGA()
{
_AX = 0x0013;
geninterrupt (0x10);
}
void SetText()
{
_AX = 0x0003;
geninterrupt (0x10);
}
void main()
{
printf("Setting MCGA mode, press a key\n");
getch();
SetMCGA();
getch();
SetText();
printf("Back in text mode\n");
getch();
}
> I'm having some problems switching back to text mode after switching to
> MCGA
> mode. My system locks up and I have to restart my computer. I'm
> compiling
> this on Turbo C++ 3.1 and I don't know of any problems there might be
> with
> it. The program will switch to MCGA mode fine, but will not switch back
> to
> text mode.
>
> Thanks for the help,
> Brian
>
>
> //-----------MCGA test-----------------------------------
> #include <stdio.h>
> #include <conio.h>
> #include <dos.h>
> #include <stdlib.h>
>
> #define RAND_MAX 255
>
> void SetMCGA() {
> _AX = 0x0013;
> geninterrupt (0x10);
> }
>
> void SetText() {
> _AX = 0x0003;
> geninterrupt (0x10);
> }
>
> int main()
> {
> int row, col;
> unsigned char color;
>
> printf("Setting MCGA mode, press a key\n");
> getch();
> SetMCGA();
> getch();
> SetText();
> printf("Back in text mode\n");
> return (1);
> }
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
>
> =================================================================
> The GameProgrammer.Com mailing list is for the open discussion
> of any topic related to the art, science, and business of
> programming games. This list is especially tolerant of beginners.
> We were all beginners once
>
> To SUBSCRIBE or UNSUBSCRIBE please visit:
> http://gameprogrammer.com/mailinglist.html
>
--
Sent through Global Message Exchange - http://www.gmx.net
=================================================================
The GameProgrammer.Com mailing list is for the open discussion
of any topic related to the art, science, and business of
programming games. This list is especially tolerant of beginners.
We were all beginners once
To SUBSCRIBE or UNSUBSCRIBE please visit:
http://gameprogrammer.com/mailinglist.html
|
|